You are on page 1of 3

some question on IDOC (Control Record/Data Record/Status Record)

This question has been Answered.

Daniel Tuffy Jun 30, 2011 4:33 AM


Dear all, I am new in this area, and would like to enquire some question on this topic. When I view a IDOC via WE02, each of the IDOC record will consist of Control Record/Data Record/Status Record). Questions: I notice that the data records consists of many segment (i.e. E1EDK01, etc) which are use to store application data. 1 - My question is do I have to manually create all these segment and do a mapping to my application field one by one (i.e. that is when I want to create a brand new message type from scratch)? 2 - If question no. 1 is Yes, how to do it, what are the transaction code to create it? can you show me the step by step. 3 - I don't have to create the Control record and the status record for my new message type right ? because those field value will automatically pull out from partner profile and system status message, am I correct? Thanks. Tuff

Correct Answer by Chendil Kumar on Jun 30, 2011 6:01 AM Hi Tuff, As everything in SAP, with IDOCs too there are 1) Standard IDOCs 2) Standard IDOCs(Extending - Enhancement to an IDOC, to accomodate for custom values) 3) Custom IDOCs And every IDOC has, Control record - EDIDC Structure - This mostly reflects the partner profile information, along with few more details which are used for IDOC extension, Sequencing etc Data Records - EDID4 Structure - These records contain the actual business data of the document in concern. So for ORDERS05 it would contain order details, INVOIC02 - Invoice details so on... Status Records - These records capture the status of an IDOC from the time it is received/sent from your system and a corresponding business document is created/changed. So this will have messages like "IDOC sent to the port OK" etc which are status from the communication layer(ALE) to application specific messages like "Sales Order XXX created" or "Invalid Material" etc. You would have noticed something called as Process code in the partner profile, this is associated with a FM(or work flow task etc) which has the business logic coded in. So in case of an Inbound IDOC, the sending system updates the IDOC - Control and Data records, and sends it to the receiving system. On the receiving system the IDOC's control record is validated against the partner profiles set, if an entry is found then using the process code it finds the associated FM which will decode the data from the IDOC data records as per the IDOC type and then use it to post data into SAP (VIA BDC, Batch Input, BAPI etc). And all this while the Status records are being updated accordingly. So with the above context will try to answer your questions,

1 - My question is do I have to manually create all these segment and do a mapping to my application field one by one (i.e. that is when I want to create a brand new message type from scratch)? In case of a custom IDOC, yes you will have to. In case of a standard IDOC, you wouldn't have you just have set up the necessary configuration (Partner Profile, Process code etc) In case of a standard IDOC extended to accommodate for some custom values(for which there are no fields in standard IDOC Let us say you have added some new fields on VA01) - In this case you can still use the standard Process code and Standard FM associated with it, SAP provides several Function exits in these FM's which you can leverage to add your custom logic.

2 - If question no. 1 is Yes, how to do it, what are the transaction code to create it? can you show me the step by step. There are several documents available on the net and on SDN detailing step by step approach for all the above three cases, just search for step by step guide for IDOCS - sap.

3 - I don't have to create the Control record and the status record for my new message type right ? because those field value will automatically pull out from partner profile and system status message, am I correct? Again it depends, in case of using a standard IDOC you wouldn't have to. But in case you have some customizations/enhancements then you might have to. For Ex: updating the control record accordingly for indicating that you have extended the standard IDOC. Or append custom messages to the status record as per the business logic. Try out the examples you find on the net and post any specific questions you might have. Regards, Chen
See the answer in context

266 Views
Average User Rating (0 ratings)

Correct AnswerRe: some question on IDOC (Control Record/Data Record/Status Record)

Chendil Kumar Jun 30, 2011 6:01 AM (in response to Daniel Tuffy)
Hi Tuff, As everything in SAP, with IDOCs too there are 1) Standard IDOCs 2) Standard IDOCs(Extending - Enhancement to an IDOC, to accomodate for custom values) 3) Custom IDOCs And every IDOC has, Control record - EDIDC Structure - This mostly reflects the partner profile information, along with few more details which are used for IDOC extension, Sequencing etc Data Records - EDID4 Structure - These records contain the actual business data of the document in concern. So for ORDERS05 it would contain order details, INVOIC02 - Invoice details so on... Status Records - These records capture the status of an IDOC from the time it is received/sent from your system and a corresponding business document is created/changed. So this will have messages like "IDOC sent to the port OK" etc which are

status from the communication layer(ALE) to application specific messages like "Sales Order XXX created" or "Invalid Material" etc. You would have noticed something called as Process code in the partner profile, this is associated with a FM(or work flow task etc) which has the business logic coded in. So in case of an Inbound IDOC, the sending system updates the IDOC - Control and Data records, and sends it to the receiving system. On the receiving system the IDOC's control record is validated against the partner profiles set, if an entry is found then using the process code it finds the associated FM which will decode the data from the IDOC data records as per the IDOC type and then use it to post data into SAP (VIA BDC, Batch Input, BAPI etc). And all this while the Status records are being updated accordingly. So with the above context will try to answer your questions, 1 - My question is do I have to manually create all these segment and do a mapping to my application field one by one (i.e. that is when I want to create a brand new message type from scratch)? In case of a custom IDOC, yes you will have to. In case of a standard IDOC, you wouldn't have you just have set up the necessary configuration (Partner Profile, Process code etc) In case of a standard IDOC extended to accommodate for some custom values(for which there are no fields in standard IDOC Let us say you have added some new fields on VA01) - In this case you can still use the standard Process code and Standard FM associated with it, SAP provides several Function exits in these FM's which you can leverage to add your custom logic.

2 - If question no. 1 is Yes, how to do it, what are the transaction code to create it? can you show me the step by step. There are several documents available on the net and on SDN detailing step by step approach for all the above three cases, just search for step by step guide for IDOCS - sap.

3 - I don't have to create the Control record and the status record for my new message type right ? because those field value will automatically pull out from partner profile and system status message, am I correct? Again it depends, in case of using a standard IDOC you wouldn't have to. But in case you have some customizations/enhancements then you might have to. For Ex: updating the control record accordingly for indicating that you have extended the standard IDOC. Or append custom messages to the status record as per the business logic. Try out the examples you find on the net and post any specific questions you might have. Regards, Chen