Professional Documents
Culture Documents
These are Special type of FM’S which are used to communicate with remote
servers.
The remote servers can be SAP-SAP Servers or SAP to NON SAP servers.
Once RFC destinations are created, we can use the RFC function modules
with below syntax.
Click on Create
Click on save.
Go to Tcode SE37
Output:
Go to Tcode SE11
Output:
BAPI’S
BAPI: stands for
BAPI ARCHITEURE:
BUS1001
Methods are :
BAPI_Material _Get detail
BAPI_Material_GETLIST
BUS2012
Methods are :
BAPI_PO_GETDETAIL
BAPI_PO_GETITEMS
Develop a Custom BAPI to display the Material details which can be
used by NON-SAP.
Step 1: Create structures for Importing and Exporting Parameters.
Step2: Create a function module and make it as remote enabled.
Step3 : Create a BO.
Step4 : Embed or insert RFC into BO so that it will be converted into BAPI.
STEP 1:
Create a function.
Go to TcodeSE37.
STEP 2:
Go to Attributes.
Select on Remote-Enabled Module.
Go to Source code.
Write as below logic.
Tcode SWO1.
Give any name.
Click on Create Button.
STEP 4:
Add RFC Function into BO
Go to Utilities.
Select API Methods Under Select Add Method
Click on SAVE.
Click on BACK Button.
Select MENU.
Click on Object Type.
Select Change release status to under Select Implemented.
Select MENU.
Click on Object Type.
Select Change release status to under Select Released.
Click on Execute.
Result is displayed as Exporting Values.
2) Using ‘SE37’ Tcode:
Generally ABAP teams use this option.
SE37 Give the name as: BABI*SOMEDESCTION*
Click on F4 the list is Displayed.
Choose the BABI as per your Requirement.
Choose the BAPI as per your Requirement.
The BAPI with Sample Text Data.
USING BAPI’S TO POST THE DATA INSTEAD OF USING BDC CALL
TRANSCTION/SESSON:
Call transaction/session in based on recording.
This recording screen may not work when you upgrade to version because
screen may change in new version of SAP.
SAP recommends avoiding using call transaction/session.
Instead we have to use BAPI’S.
Suppose if BAPI is not available for our requirement, then we have to use
call transaction/session.
TABLES
DATA_TAB = ITAB.
WA_CD-FUNCTION = 'INS'.
WA_CD-MATERIAL = WA-MATNR.
WA_CD-MATL_GROUP = WA-MATKL.
WA_CD-BASE_UOM = WA-MEINS.
APPEND WA_CD TO I_CD.
WA_CDX-FUNCTION = 'INS'.
WA_CDX-MATERIAL = WA-MATNR.
WA_CDX-MATL_GROUP = 'X'.
WA_CDX-BASE_UOM = 'X'.
APPEND WA_CDX TO I_CDX.
WA_DESE-FUNCTION = 'INS'.
WA_DESE-MATERIAL = WA-MATNR.
WA_DESE-LANGU = SYST-LANGU.
WA_DESE-MATL_DESC = WA-MAKTX.
APPEND WA_DESE TO I_DESE.
ENDLOOP.
CLEAR : WA,WA_HD,WA_CD,WA_CDX,WA_DESE,WA_RET.
REFRESH : I_HD,I_CD,I_CDX,I_DESE,I_RET.
1 ULINE.
ENDLOOP.
FLAT FILE:
OUTPUT:
IMPORTING
CLIENTDATA = WA_CD
TABLES
MATERIALDESCRIPTION = ITAB_DESC.
WRITE : / WA_CD-MATERIAL,WA_CD-IND_SECTOR,WA_CD-MATL_TYPE.
ULINE.
OUTPUT:
Difference between RFC & BAPI?
S.n RFC BAPI
o
1 The RFC is a remote BAPI is a remote enable
enable function. function along with API Layer
to communicate between
SAP to NON-SAP.
2 RFC is used between BAPI is used SAP to NON-
SAP TO SAP SAP.
3 RFC does not have any BAPI is a part of Business
Business Objects. It is just Objects. BAPI is called as a
a Function. method inside Business
Objects.
4 RFC does not have any BAPI has return Messages.
return Messages.
5 RFC does not use commit BAPI uses commit or
or Rollback. Rollback.
ALE – IDOC’S
ALE :
ALE is a technology which is used to communicate between the servers
available at different geographical locations.
To send the data and receive the data from one server to another server, we
need a dedicated network which is called as ALE(Application Link
Enabling).
Application means customer Master Appl, Material Master Appl,
Sales Order Appl.
Link means a network or connection.
o Enabling means enable the link.
Since IDOC is an SAP tool , only SAP system can understand IDOC’s.
Non-SAP system cannot understand the IDOC’s .
So we use the middleware technologies like TIBCO or XI to communicate
between SAP to Non-SAP.
The IDOC is converted into XML and it is given to TIBCO or XI.
The middleware technologies will again convert the data into a format which
can be understood by the receiver system.
IDOC’S
IDOC: - It is an intermediate document which contains the data.
All the standard SAP segments will start with letter E1.
All the custom segments must start with the letter Z1.
DEBMAS is an IDOC
1) Control record.
2) Data record.
3) Status record as per above diagram.
Expand the Basic settings, Select Logical Systems and Double Click icon .
It gives the below screen, Find the Logical System .Replace our logical system
name.
It gives the below screen, Find the Logical System .Replace our logical system
name.
Enter Receiver Logical System name.
Click on Back.
Go to Tcode- SM59.
Click on save.
Sender System Step 5: Then maintain the distribution outbound partner profile .
Go to WE20
Select the folder partner type LS folder then click on create
Click on save.
Select Transfer IDOC Immediately and give port number.
Then click on save.
Then go to receiver 810 client -- Maintain the Inbound Partner Profile
Login in to 810 client Go to WE20
Give the short text and Technical name and click on Enter.
After creating display the name and click on save.
- Go to BD10 Tcode
- Specify material no , message type , logical system and select checkbox as below
- Go to WE02
- Give
Give the screen a below
- Click on execute of F8
Then the IDOC information is displayed below
Double Click on IDoc, Expand DATA RECORDS,STATUS RECORDS FOLDER TO check data
Checking the Status of receiver system810
- Go to WE02
- Click on execute of F8
- Then the IDOC information is displayed below (Double click it)
-
- Double click on error record number 51
-
- Then click on Application log button
- This error is related to functional, so, functional team will take care of this error.
- Go to MM01
Press enter select the BASIC DATA 1 check box press enter
TESTING:
Create 5 materials in MM01.
Create 2 materials of type ‘coupons’ and 3 materials of type ‘finished
products’.
Run the outbound program BD10.
Give the material no range . EX: 1437 to 1441.
Execute the programs.
Goto receivers 810 client and check the status.
Only materials of type FERT will be received because of filter value
“FERT” maintained at the distribution model.
2)SEGMENT FILTERING
Filtering the unwanted segments in an IDoc is called segment filtering.
We need to specify the list of segments as segment filters, so that IDoc will
be generated from all the segments except the segment filters.
STEPS:
Specify the list of the segments which are to be filtered out.
Ex: Let us filter the segment ‘EIMARMM’ of message type MATMAS.
Go to BD56.
Specify the message type as MATMAS.
Press enter.
clicking on new entries.
Give the segment type as Z1KNA1.
Click on the button create.
Give short description.
Give the list of the fields as below.
A pop-up is raised.
Give the segment name as Z1KNA1.
Give the minimum and maximum no. as ‘1’, because customer master will
have single record.
Select the check box if we want to make the segment as mandatory segment.
Press enter.
Now, Put the cursor on Z1KNA1, click on the button create.
A pop-up is raised.
Select the first radio button and press enter.
Give the segment type Z1KNBK.
Give the minimum no. as 1, maximum no. as 99999 because each customer
will have more than 1 bank account.
Press enter.
Finally, the hierarchy should look as below.
OR
Step2: Create Extended Idoc TYPE
Goto WE30.
Give IDoc name as ZDEBMAS05.
Select Extended Idoc radiobutton.
Click on create.
Give linked basic type as DEMAS05.
Press enter.
By default all the standard segments are copied.
Put the cursor on any segment. EX: EIKNAIM.
Click on create button.
Give the custom segment name
Min No=1
Max No=1
Press enter
Click on save.
Reduced IDoc Type:
It is an IDoc which consists of only the required segments and fields.
All the unwanted segments and filters are completely removed.
‘BD53’ is the Tcode for reduced IDoc.
STEPS:
Goto BD53.
Press enter.
Give short description.
Now double click on the segment, select the checkboxes for the required
Fields and click on the select button.
The color will turn from RED to WHITE which indicates that it is a required
field.
Activate change pointer for message type à BD50 is the TCode.
Activate change pointer for particular fields à BD52 is the TCode.
Already the fields will be available.
If you want new fields to be added, then click on New Entries
button and add the fieldname. But it is optional
Run the TCode BD21 or the program RBDMIDOC.
NOTE: - The changes are generally stored in 2 tables : CDHDR,
CDPOS.