ALE IDOC Training-Day 5
Embed Size (px)
description
Transcript of ALE IDOC Training-Day 5

Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. November 2006© 2006 Atos Origin
ALE / IDoc Training
Disha Jain
Mumbai,24th September, 2007

2 ALE./IDOC Technical Training
Outbound Processing
» Implementing Outbound Processing
» Development a FM for ALE Outbound Processing
» Structure Control / Data /Status Records
» Coding Example
» Customizing ALE Outbound Processing

3 ALE./IDOC Technical Training
Implementing Outbound Processing
» Configuring an outbound process that uses message control» Customizing ALE Outbound Processing
» Configuring an outbound process for stand alone programs» Structure Control / Data /Status Records» Coding example
» Configuring the change pointers for an outbound process

4 ALE./IDOC Technical Training
Configuring an outbound process that uses message control
» Create a new message type
» Link the IDoc type to the message type
» Create a new process code
» Create or change partner profile to add a message control record and an outbound record

5 ALE./IDOC Technical Training
Create a new message type
» Transaction : WE81
» Customer defined message type begins with “Z”
» E.g. ZMREPT

6 ALE./IDOC Technical Training
Link the IDoc type to the message type
» Transaction : WE82
» Assign the message type created to IDoc type
» E.g. ZMREPT to ZMPREPT02

7 ALE./IDOC Technical Training
Create a New Process Code
» Transaction : WE41
» Assigns process code to function module created for outbound process

8 ALE./IDOC Technical Training
Create/Change Partner Profile
» Transaction : WE20
» Message Control Record and an outbound record are created for each outbound message that operates under Message control
» E.g. ZMRP

9 ALE./IDOC Technical Training
Configuring an outbound process for standalone programs
» Create a new message type
» Link the IDoc to message type
» Add the message to ALE Distribution Model
» Create/change the partner profile
» Steps 1 and 2 are same as described earlier. Step 3 is new and 4 is different.

10 ALE./IDOC Technical Training
Add the message to the customer distribution model
» Transaction : BD64
» Add the message to the distribution model to be transmitted to different system.

11 ALE./IDOC Technical Training
Create/Change the partner profile
» Transaction : WE20
» In the partner profile, an outbound record is created for each outbound message generated from stand-alone programs.
» Note that the message control record is not created in this case because stand alone programs do not use the message control component.

12 ALE./IDOC Technical Training
Configuring the change pointers for an outbound process
» Create a new message type
» Link the IDoc type to the message type
» Make sure that the change pointers are globally activated
» Activate the change pointers for your message type
» Link the message to the function module
» Add the message to the ALE Distribution Model (optional).
» Create the partner profile
- Already seen step 1, 2,6,7 .

13 ALE./IDOC Technical Training
Verify global activation of change pointers
» Transaction : BD61

14 ALE./IDOC Technical Training
Activate the change pointers for the custom message
» BD50

15 ALE./IDOC Technical Training
Link the message type to the function module
» BD60

16 ALE./IDOC Technical Training
Some important Info.» IDOC_OUTPUT_ORDCHG
» RSNAST00 – this program is used to process entries in the NAST table
» RSNASTED – This processing program exists for each output medium. EDI_PROCESSING is the routine in the RSNASTED program to process EDI outputs.
» TNAPR – The relationship of the output type, output medium and processing program is established in the TNAPR table.
» MASTER_IDOC_DISTRIBUTE
» CHANGE_POINTERS_READ – Read the change pointers
» CHANGE_POINTERS_STATUS_WRITE – To write the status back to the change pointers for all processed pointers
» http://www.erpgenie.com/sapedi/idoc_abap.htm

17 ALE./IDOC Technical Training
Outbound program triggered from message control
» This is mainly used for creating IDocs for transactional data
» In a message control , the RSNASTED program is used to process outbound ALE and EDI messages.
» The RSNASTED program calls the appropriate IDOC generation program for a message.
» The FM builds the IDOC and the results are passed back to the RSNASTED program , which creates the physical IDoc in the SAP system.
» IDOC_OUTPUT_<MESSAGE_TYPE>

18 ALE./IDOC Technical Training
Outbound program triggered from message control
» Program logic contains the following blocks» Copy the incoming control record information to the outgoing control record.» Populate the remaining fields in the control record.» Select the application data from the database, using the object key passed in
the NAST record.» Populate the internal table of data records (INT_EDIDD) with the various
segments.» Return the control to the calling program. When the control comes back to the
message control component , an IDoc is created in the database.

19 ALE./IDOC Technical Training
Standalone program to generate IDocs
» Provide the selection screen to enable a user to specify the objects for which IDocs are to be generated.
» Determine the key of the application document from the object specified in step 1.
» Select the application data from the database , using the object key identified in step2.
» Populate the control record information.
» Populate an internal table of type EDIDD with the data records for the various segments.
» Call the ALE service layer (MASTER_IDOC_DISTRIBUTE) to create the IDocs in the database.
» Execute the commit work.
» E.g. RBDSEMAT

20 ALE./IDOC Technical Training
Outbound program Triggered from change Pointers
» Standard report RBDMIDOC can be executed to process entries in the change pointer table.
» To generate the IDOCS , this program calls a FM specific to each message.
» Logic is similar to stand alone programs except for additional logic to analyze the change pointers
» E.g : MASTERIDOC_CREATESMD_<MESSAGE>

21 ALE./IDOC Technical Training
Outbound program Triggered from change Pointers» Read the change pointers using the CHANGE_POINTERS_READ FM>
» Analyze the change pointers to determine which documents are valid.
» Determine the key of application document from step2.
» Select the application data from the database , using the object key identified in step 3.
» Populate the control record information.
» Populate an internal table of type EDIDD with the data records for the various segments.
» Call the ALE service layer (MASTER_IDOC_DISTRIBUTE) to create the IDocs in the database.
» UPDATE change pointer status using the FM -> CHANGE_POINTERS_STATUS_WRITE» Execute the commit work.

Atos, Atos and fish symbol, Atos Origin and fish symbol, Atos Consulting, and the fish itself are registered trademarks of Atos Origin SA. November 2006© 2006 Atos Origin
Thank You