Hi guys, as we known we have 3 ways to send data from SAP to external system by using IDOC. It is:
- Using ALE change pointer mechanism.
- Via Output Determination
- Using custom ABAP Program
I. Generation IDOCs using ALE change pointer
SAP will manage all information master data as customer, vendor, material master. By using IDOCs outbound, we can transfer these information to external system, example POS.
We can configure change pointer to flag master data changes (Create, edit, update) in SAP. The flagged data change will be stored in Change Pointer Table BDCP2 in S/4 HANA.
By using ABAP Program RBDMIDOC, all entries in table BDCP2 will be generated to IDOCs and send to external system
II. Generation IDOCs using Output Determination
As Change Pointer will be used to send master data to external system, What’s about transaction data ?
With transaction data such as Sales Orders, Purchase Orders, Delivery, Shipment Confirmations, etc…, we want to send to external system by IDOCs, we will be use Output Determination – Output Type
III. Generation IDOCs using ABAP programs
Sometime, we can use ABAP Program to generate IDOCs and send to external system
Go to T-Code WE57, we can find function modules (FM) which can use in ABAP program to send IDOC to external system.
Step by step generate IDOCs by using Output determination – Output Type.
Contract will be created in S/4 HANA. We will use standard message type ORDERS and configure output type contract to send data contract to external system.
In our example, we will create new output type with name is ZCTR to send contract with 2 scenarios
- Send all contract
- Send contract with filter contract type.
Step 1 – Define logical system. (T-CODE: SALE / BD54)
Step 2 – Create new Output Type
Go to T-CODE: NACE
Choose Output Types
In this screen, have some important field of Output Type
- Access Sequence : This is the main parameter that determinates the condition tables and sequence of condition tables. In order words, when contract is created, system will check records maintained in these access sequences tables to determinate whether to trigger the output or not. Reference to table T682I in SE16N
Example 01 :
- All contract with contract type is ZCON and Sales Organization will send to Output
All contract with contract type is ZCON will send to output, then we choose 0002 – Order type
Base above concept, we will get table condition as below
As you see, table B001 is condition table. Take a look this table
- Access to Conditions: Next, If you want the system to determine the appropriate output based on Condition tables and access sequence, mark this parameter. If this parameter is flagged, when a sales order is created or changed, the system will automatically read the table B001 and determine if the output should be triggered.
- Multiple Issuing:
- If “Multiple Issuing” is marked, the system allows the same Output to be triggered to the same partner multiple times from the same SAP document (sales order).
- You can mark this parameter, for example, if you want to trigger the IDoc/Output to the external partner for each change of sales order, or if you want users to be able to manually trigger the same output multiple times.
- Do not write a processing log:
- If you have system storage restrictions and disk space issues, you can mark this parameter. If it’s flagged, output determination and IDoc log won’t be saved in the database. The recommended method is to save the processing log, hence we will leave it blank.
- The processing log of the output includes important information, such as different processing statues of the output with IDoc number.
Step 3 – Maintain Default Values, Transmission Medium, and Partner Function
- Default Values
- Dispatch Time : The dispatch time parameter defines when the output is sent to the external system. In other words, when the output should be processed from yellow (Not yet Processed) status to green (Output Sent).
- Send Immediately : Contract saved into database, output will be generate send direct to partner
- Send with the periodically scheduled job: Output will be yellow status until batch job RSNAST00 will pickup it and send to partner
- Transmission Medium: using IDOC, we will choose EDI
- Partner Function: LS
Step 4 – Configure Processing Routine
RSNASTED is the output processing program for different output mediums.
EDI_PROCESSING is the ABAP processing routine for EDI output types.
Step 5 – Set Partner Functions
Step 6 – Assign output determination procedures and configure Output Procedure
Step 6.1 – Create Procedures (Required)
GO to T-CODE: NACE
Choose Application. Ex: V1
Choose New Entries
Choose Procedures -> Control
Step 6.2 – Assign
Go to T-CODE: SPRO
Sales & Distribute -> Basic Functions -> Output control -> Output determination -> Maintain output determination for Sales Documents -> Assign Output Determination Procedures
Step 7 – Configuration Condition Record.
This step will configure data in table condition.
Because this output type choose Access Sequence is 002 – Order type, so in this section we have to set Order type to send output. Example we choose order type is ZREN for output.
Go to T-CODE : SE16N
Check table B007 – Condition for Order Type
Step 8 – Configuration Partner Profile
Go to Partner Type: LS
Choose System which need send output.
In Outbound parameter choose Create Outbound Parameter
– In this step, you must be choose Partner ROLE is LS for output type, If no, cannot send data to external by output.
– When you choose LS for ROLE, you will receiver warning at left bottom corner. Do not worry, just press ENTER key.
Go to tab Message control
Add new message control.
Message Type: This is output type.
Process code: SD10
For data in process code, We can go to
- WE41 – Outbound process code
- WE42 – Inbound process code
Or can to to table TMSG1 to find
Case 01 – Configuration OUTPUT TYPE for MESSAGE TYPE = ORDRSP, BASIC TYPE = ORDERS05
- Go to VA03
- Get document with Sales Document Type = ZREN
- Choose Output Type = ZREN
Case 2 – Configuration OUTPUT TYPE for MESSAGE TYPE = ORDERS, BASIC TYPE = ORDERS05. Outbound contract
- Define Output Type
- Output Type = ZCTR
- Access Sequence = 0002 – Order Type ( ZCON)
- Procedures : V10100
- Configuration Partner Profile with Output Type ZCTR
- Check output in VA42
VN032: Maintain outgoing EDI-connection data for partner
This error message is shown when generating the Output if you have not configured the Message Control in the Outbound profile of the partner.
E0342 – Maintain a Valid Partner Number
The logical system should be maintained in bd54 before it can be used as an EDI partner in we20.
So long article, but no problem because we can see all scenario, trouble shooting for configure Outbound IDOC with Output Type as well. Thanks for your reading and any comment or advise, kindly leave your comment on this. Thanks.
Thanks for sharing .very helpful