Skip to Content
0
Former Member
Jan 05, 2011 at 07:25 AM

MASTER_IDOC_DISTRIBUTE to generate idoc with extension

261 Views

Hi All,

I am a newbie to IDocs.

I am trying to trigger an IDOC once the process order is released and saved. I am using the exit EXIT_SAPLCOZV_001 which gets triggered after the save button is pressed in the process order transaction COR2.

In th exit I am using the function module MASTER_IDOC_DISTRIBUTE to generate the IDoc.

The standard IDoc type is LOIPRO01. I am using this with extension as the target system needs some more fields which are not present in the standard Idoc type LOIPRO01.

The problems i am facing with this are

1. Can the standard fields of the IDOC LOIPRO01 be populated in the idoc structure automatically? (I am filling all the segments manually currently)

2. Can i use the function module CLOI_MASTERIDOC_CREATE_LOIPRO instead of MASTER_IDOC_DISTRIBUTE? If yes then how do i populate the fields for the extension?

My actual requirement is to send process order details to multiple third party systems, and each system would require a different type of extension.

I have created the extensions and assigned to the standard idoc type LOIPRO01 and message type LOIPRO.

If there is any other solution please let me know.

Thanks in advance

AJ