Professional Documents
Culture Documents
These are Special type of FMS 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:
BAPIS
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 BAPIS 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 BAPIS.
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:
Check 810 Client and see the Result:
IMPORTING
CLIENTDATA = WA_CD
TABLES
MATERIALDESCRIPTION = ITAB_DESC.
WRITE : / WA_CD-MATERIAL,WA_CD-IND_SECTOR,WA_CD-MATL_TYPE.
ULINE.
Since IDOC is an SAP tool , only SAP system can understand IDOCs.
Non-SAP system cannot understand the IDOCs .
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.
IDOCS
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
Double Click on IDoc, Expand DATA RECORDS,STATUS RECORDS FOLDER TO check data
-
- Double click on error record number 51
-
- Then click on Application log button
- The errors will be clearly defined as below
- Here the error is plant does not exist.
- This error is related to functional, so, functional team will take care of this error.
UNIT Test Case 1 for correct data :
Lets create a new material and send it.
- Go to MM01
Press enter select the BASIC DATA 1 check box press enter
Then click on save button.
A material will be created
Then go to SENDOR SYSTEM (800) Execute the BD10 TCODE
Give the material number as 1417
Then go to WE02 click on execute
FILTERING:
Whenever we send the data from source system to receivers
system, by default all the IDocs and segments are received.
Suppose if we want to receive only few IDocs or segments based
on a particular value which is called as a filter value then it is
called as filtering.
Filtering is of two types:
1)IDoc filter
2)Segment filter.
IDoc filter:
Filtering the unwanted IDOCS is called IDOC filtering.
We need to specify a filter value in the distribution model(BD64), now
IDocs will be generated only for that filter type which is called as IDoc
filtering.
STEPS:
Go to BD64
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.
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.
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.
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.
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