Program for Outbound IDOC
Posted by
ABOUT-SAP on
Mar 21, 2012 |
Leave a Comment
Program for Outbound IDOC
All IDoc data records are exchanged in a fixed format, regardless of the segment type. The segment’s true structure is stored in R/3’s repository as a DDic structure of the same name. The segment info tells the IDoc processor how the current segment data is structured and should be interpreted. The information, which is usually the only interest, is the name of the segment EDID4-SEGNAM.
The segment name corresponds to a data dictionary structure with the same name, which has been created automatically when defining the IDoc segment definition with transaction WE31 .
For most applications, the remaining information in the segment info can be ignored as being redundant. Some older, non-SAP-compliant partners may require it. E.g. the IDoc segment info will also store the unique segment number for systems, which require numeric segment identification.
To have the segment made up for processing in an ABAP, it is usually wise to move the segment data into a structure, which matches the segment definition. For a segment of type e1maram the following coding is commonly used:
TABLES: e1maram.
. . .
MOVE edidd-sdata TO e1maram.
Then you can access the fields of the IDoc segment EDIDD-SDATA as fields of the structure e1maram .
WRITE: e1maram-matnr.
The following coding sample, shows how you may read a MATMAS IDoc and extract the data for the MARA and MARC segments to some internal variables and tables.
DATA: xmara LIKE e1maram.
DATA: tmarc AS STANDARD TABLE OF e1marcm
WITH HEADER LINE.
LOOP AT edidd.
CASE edidd-segnam.
WHEN ‘E1MARAM’.
MOVE edidd-sdata TO xmara.
WHEN ‘E1MARCM’.
MOVE edidd-sdata TO tmarc.
APPEND tmarc.
ENDCASE.
ENDLOOP.
now do something with xmara and tmarc.
By : Amit Khari
SAP BC TIPS – Download table data from se16 to excel
Posted by
ABOUT-SAP on
Mar 10, 2012 |
Leave a Comment
Try this – the table DD03M contains all the information shown in SE11. Using SE16 go to table DD03M and enter the name of your table. You can select the columns you want to save, then select settings->user parameterss click on the tab “Data Browser” switch to the ALV Grid display and click the green check mark. Once you are in the ALV grid display, you can click on the excel icon and save as an excel spreadsheet.
Enjoy it
Tags: sap, sap bc, sap bc tips, se16 download
SAP BC TIPS – Execute a Function Module without using SE37
Posted by
ABOUT-SAP on
Feb 22, 2012 |
Leave a Comment
A number of companies restrict the execution of function modules in quality, pre-prod and prod environments, for good reason. Therefore you may find you do not have access to the transaction code SE37. Generally experienced developers may however have access to SE38.
So how do you execute or test a function module in a system/client but wish to get around the authorization issue? Simply use SE38 with program RSFUNCTIONBUILDER.
TIP – You can sometimes use the same technique by using SE93 with the problem transaction and using the program name however do not expect to be able to bypass all authorizations.
By: SAPtricks
Tags: sap, sap abap, sap bc
SAP RANDOM Tips – SQVI – Create quick report
Posted by
ABOUT-SAP on
Sep 27, 2011 |
1 Comment
I’m going to show you how you can quickly build a custom report for reporting Sales Schedule Lines based on different filter criteria and multiple tables (VBAK, VBAP and VBEP: header, item and schedule line data resp.):
1) Go to transaction SQVI: In the section ‘Quickviews for …’ you may see some prepared reports already. Since you are new to this it is likely to be empty. Since we are going to create a new report enter a name for the report in the Quickview name field and press < Create>.

2) In the selection window enter descriptions and choose ‘Table join’ as ‘Data source’. This means we are going to connect and use multiple tables. Press <Enter> to continue.
3) In the screen ‘Choose data source’ press the ‘Insert table’ button. In the window that pops up enter the name of the table that you need.

4) Repeat the previous step for all required tables. Your screen will now look like below:

5) Press ‘F3′ to go to the configuration screen. In the left side of the screen you can select per table which fields are for selection and/or list purpose. E.g. if you only select a field as ‘List field’ it will show up in the report results, but will not appear in the selection screen of the report as a filter criterium. For the header I choose: document number, doc date, sales organization, distribution channel and sold-to party (all list and selection). On item level I select: Material Number and Reason for rejection (to be able to exclude rejected lines). Both List and Selection. For Schedule I pick: Item, Schedule Line, Schedule line category, Schedule line date and Confirmed qty. Only Schedule line category and date both List and Selection. The others only List. Now your screen will look like below.

6) Now it’s time to test drive your report! Press <Execute>. It takes a short time for SAP to build te report. You are taken to the selection screen of the report. Now it is important that you have an idea of what data you are going to find. Enter filter criteria based on this idea. I mention this because you need to validate the data you will be presented in the report. Do not just accept the quantities. Analyze the results and if the numbers are off find out why and adjust your report’s filter criteria and/or add extra filters to remove redundant data.

7) If you are satisfied with the quality of the report save it for future use. It is possible to link it to a transaction code and make it accesible for users through authorization. I will post a guide on this in the future.
By: SAP Mental Notes
Tags: query, sap, sap bc, sap bc tips, sap tips, SQVI
SAP BC TIPS – Date and Time validation
Posted by
ABOUT-SAP on
Aug 31, 2011 |
Leave a Comment
Sometimes, we need to validate some inputs from users that are inserted by external sources (like files).
For this purpose, we found very useful function modules like CONVERT_DATE_TO_INTERNAL and CONVERT_TIME_INPUT to validate external dates formats and external times formats (ex: dates like ’24.06.1978′ or times like ’11:00:00′)
This functions are also very useful to convert the external information to internal information.
If you need more conversions of this kind, take a look at utility class CL_ABAP_DATFM.
Check if is helpful for you too, or if you have any other suggestions feel free to share with us!
Tags: sap, sap bc, sap bc tips
SAP BC TIPS – Inbound IDOC Background and Parallel Processing
Posted by
ABOUT-SAP on
Aug 31, 2011 |
Leave a Comment
When processing loads of iDocs, use program RBDAPP01 to process in parallel.
Be careful with locks, has they can occur, when processing concurrent records.
Tags: Idocs, sap, sap bc tips
SAP BC TIPS – SAP R/3 Enhancements
Posted by
ABOUT-SAP on
Oct 03, 2010 |
Leave a Comment
Some special features allow you wide modifications without changing standard SAP R/3 objects. Those techniques are not as widespread as they should be. In fact they are powerful tools.
* Field exit
After entering a value in a field, it can be checked through a field exit. The system makes the field value available to be checked and changed in an ABAP/4 function.
* User exit
Points previously set in the system that let you evaluate data. The fields available are also previously defined by SAP. All fields value available can be checked in an ABAP/4 program.
* Validation
It allows solid data entry regarding special rules. According to previous rules, the system can evaluate an entry and a message can appear on the user’s terminal if a check statement is not met. A validation step contains prerequisite statement and check statement. Both of them are defined using Boolean Logic or calling an ABAP/4 form.
* Substitution
Fields contents can be changed using substitution. When data are being entered, the data can be substituted by another value regarding rules previously defined. A substitution step contains prerequisite statement, substitution value and substitution exit. All of them are defined using Boolean Logic or calling an ABAP/4 form.
* Set
Values or ranges of values are specified under a set name. Sets are easier to create and maintain instead of using tables. They give you more flexibility when maintaining your system.
* Key words
It allows changes on field description according to data element. The short key word used on most screen to identify the corresponding field contents can be changed too.
* Requirements & formulas
ABAP/4 forms that can be used to handle pricing procedures, rounding rules, copy and data transport Sales activities.
By: erpgenie.com
Tags: sap, sap bc, sap bc tips
SAP BC TIPS – Difference Between BADI and User Exits
Posted by
ABOUT-SAP on
Sep 18, 2010 |
Leave a Comment
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.
What is difference between badi and user-exists?
What is difference between enhancements and user-exists? and what is the full form of BADI?
I have another doubt in BDC IN BDC WE HAVE MSEGCALL (i did not remember the > correct name) where the error logs are stored, MSEGCALL is a table or structure.
What is the system landscape?
1) Difference between BADI and USER-EXIT.
i) BADI’s can be used any number of times, where as USER-EXITS can be used only one time.
Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
ii) BADI’s are oops based.
2) About ‘BDCMSGCOLL’ it is a structure. Used for finding error records.
3) Full form of BADI ‘Business addins’.
3) System land scape will be depends on your project
Ex:- ‘Development server’–>’Quality server’—> ‘Production server’……
By : Sreeram Prasad
Tags: badi, sap, sap bc, sap bc tips, user exit
SAP BC TIPS – Difference Between RFC and BAPI
Posted by
ABOUT-SAP on
Sep 18, 2010 |
Leave a Comment
RFC Vs BAPI – by Madhukirann
BAPI are RFC enabled function modules. The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. In this case you only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call.
Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.
Whenever possible, a standardized BAPI must be used in preference to an individual BAPI. It is not possible to connect SAP to Non-SAP systems to retrieve data using RFC alone. RFC can acces the SAP from outside only through BAPI and same is for vice versa access.
RFC is the protocol used by SAP for remote communication, that is, for communications between remote (independent) systems.
RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system.
Using the RFC interfaces you can extend the functionality of R/3 applications from an external program.
Tags: bapi, rfc, sap, sap bc, sap bc tips
SAP BC TIPS – How User Exits Can Be Used
Posted by
ABOUT-SAP on
Sep 18, 2010 |
Leave a Comment
What is and how user exits can be used?
What is the transaction code to see all available user exits?
Method of using this?
User exit is a place where we can write our own logic inside SAP programs. Instead of modification of SAP code, we can place our custom logic in User Exit.
There are three types of User exits:
1. Function Exits
2. Menu Exits
3. User Exits
Finding User Exits:
1. Take VA03 as example. Go to System status; select the program (double click); Find by the key word ‘Call Customer-function’; Double click on the ‘Call Function’ to go to the code; Double click on the customer function no.
It will take to the function exit in which SAP provides a Include program, where we can write down our own logic.
2. Run transaction SE84 and click on ‘Enhancement’ on left screen. Then click on ‘Customer Exits’. Then double click on ‘Enhancements’.
3. In transaction CMOD, type the name of your project and press the CREATE pushbutton; Once you SAVE your project, you can add as many enhancements as you want by pressing the SAP enhancements pushbutton; Add the enhancements
you want to add to the Project.
4. There are some exit provided by SAP in the program as subroutines. For example, go to transaction VA02; Double click on the program. It will take to the program; Some includes are provided by SAP as user exit. Double click on the include name, then it will take inside the include. Double click on MV45AFZZ (Program)include; Here we have different forms which acts as user exits. In these forms we can include our custom logic
5. Open the program through SE80 transaction; Click on the ‘Screen’ and all the available screens will be displayed. Then search if any Exit screen is available. Normally short text of the screen gives an idea whether Exit screen or not.
6. Finding BADIs : Double click on the ‘Program’; Search by string ‘cl_exithandler=>get_instance’
;Search result is displayed. Double click on any one in the list.
By: Nanjund
Tags: sap, sap bc, sap bc tips, user exit