Below is a documentation of setting of standard SAP ALE outbound iDOC communication. Main mission is focusing only on setting outbound iDOCs related to BECS integration only. Because this process is standard SAP configuration we strictly recommend to take all information about and SAP configuration or customization from official sources of SAP A.G. and understand this guide only as a help in relation with all SAP official information.
Brief description of SAP ALE
ALE technology is SAP's technology to support distributed yet integrated processes across several SAP systems. For more info please read the "Step By Step Guide For Setting of SAP ALE Outbound iDOCS communication documentation" at the bottom of this page.
Step by step guide for setting of standard iDOC
In this section, we will look at an end-to-end EDI transmission that utilizes outbound iDocs and Output Determination. Not only will we examine Outbound iDoc and Output Determination configuration steps in detail, but also discuss different outbound iDoc generating methods in SAP, as well as how to troubleshoot and test an outbound iDoc scenario.
Moreover, we will look at some common error messages of iDoc and Output control.
1 Outbound iDoc Triggering Methods in SAP
There are several methods to generate outbound iDocs in SAP. Each of them serves a different purpose.
The main methods of generating outbound iDocs in SAP are
- Using ALE Change Pointer mechanism
- Via Output Determination
- Using custom ABAP Program
1.1 Generating Outbound iDocs using Change Pointers
To transfer master data between different systems we can use the ALE/iDoc framework and, particularly, its Change Pointers functionality. In most organizational system landscapes, SAP is the central system that manages master data such as Customer master, Vendor master, Materials master, etc. Using iDocs issued by Change Pointers you can transfer master data from the central SAP system to other systems in the landscape and other integrated systems.
You can configure Change Pointers to flag master data changes (Create/Update/Delete) in SAP. Using these flags, outbound iDocs generated in SAP can be directed to different receiving systems. The flagged master data changes are stored in Change Pointers table BDCP2 in SAP S4 HANA.
With the help of program RBDMIDOC, entries stored in the BDCP2 table can be processed to generate outbound iDocs.
1.2 Creating Outbound iDocs via Output Determination
Similar to how we use Change Pointers for master data distribution, the Output determination technique can be used to generate iDocs for transactional data. To send transactional data such as sales orders, Purchase Orders, Delivery, Shipment Confirmations, etc., to partners and their systems, output types can be configured in SAP.
In certain business processors every time a Purchase Order is created in SAP, the PO should be sent to the vendor of the Purchase Order. Output determination can be configured to trigger an EDI Output Type to vendor when a Purchase Order is created in SAP. Outbound iDocs generated from these EDI Output Types can be transferred to the vendor or external system.
In this document, we will look at how to configure the Output Determination in Condition Record technique and how to trigger Outbound iDocs from the generated outputs.
1.3 Generate Outbound iDocs using ABAP Programs
Although not as common as Change Pointers or Output Determination methods, custom ABAP programs are sometimes used to create iDocs.
To generate Outbound iDocs from ABAP programs, first, you need to find the Outbound iDoc that creates Function Module of the iDoc Message type and iDoc Basic type. Go to transaction we57 to find the FM you can use in an ABAP program to generate outbound iDocs.
For example use the Function Module ‘IDOC_OUPUT_ORDRSP’ in your custom ABAP program to generate ORDRSP iDocs.
If the outbound iDoc is a master data iDoc, use the FM ‘MASTER_IDOC_DISTRIBUTE’ in the ABAP program to create iDocs.
2 Setting Outbound iDOC
2.1 Required Steps for standard iDOCs
This process can be used for setting all standard iDOC required for standard BECS integration.:
2.1.1 Define logical system using tCode “Sale”
2.1.2 Setup RFC connection and PORT – tCode “SM59”
2.1.3 Test connection with receiver
Check the connection success by pressing “Connection Test” in previous screen
2.1.4 Define IDOC port – tCode “we21”
2.1.5 Define partner profile – tCode “we20”
This step can be done automatically from distribution model – see screen below.
2.1.6 Define distribution model – tCode “BD64”
Generate partner profile (if not done manually in 5.1.5)
Refer below blog for details
https://sapintegrationhub.com/abap/ale-idoc/outbound-idoc-configuration-output-determination-techno-functional-sap/
2.2 Define custom iDOC
In respect of covering custom iDOC (for example for Maintenance Plan) please use following process:
2.2.1 Creation of Segment Types – tCode “we31”
Run T-code ‘WE31’ to create segment type, which has fields to contain the data and are added to the segment type in the same transaction. The data stored contained into the segment mesh is finally stored in EDISEGMENT table.
Add your custom fields as per business scenario.
To make it available to other transactions, release the segment created.
Go to Edit -> Set Release
2.2.2 Creation of iDoc type – tCode “we30”
Run T-code ‘WE30’ to create custom IDoc type. Enter the name of custom IDoc you want to create and click on red box for creation.
Now, it takes you to following screen. Here you can add description for your IDoc type. Also you can specify name of existing IDoc for Copy or Successor mode.
Now, you can maintain attributes of the custom IDoc, which consists of attaching segment type created above to the IDoc type. Also specifying the details of frequency of these segments getting filled i.e. Maximum and Minimum number. Fill the necessary details and release this IDoc type as well.
2.2.3 Creation of logical message types – tCode “we81”
Run T-code ‘WE81’ to create the logical message types. Go to Edit mode and click New Entry to go to following screen.
Save the entered data.
2.2.4 Linking Message type and IDoc type – tCode “we82”
Run T-Code ‘WE82’. Now we have to link these created IDoc types and Message types. Enter the message type name, Basic IDoc type (ZCUST_IDC) and release type to be linked. In the data transfer through ALE, these message types represent the IDOC structure.
Extension field above will be used as per the Extended IDoc type scenario i.e. in case of addition of few more fields into the existing IDoc type.
Hence, now our Creation of Custom IDoc is ready to use in ALE scenarios.
See Also
Step By Step Guide For Setting of SAP ALE Outbound iDOCS communication documentation