ale and idoc

Upload: saandip-dasguupta

Post on 03-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Ale and Idoc

    1/3

    some question on IDOC (Control Record/Data

    Record/Status Record)This question has been Answered.

    Daniel TuffyJun 30, 2011 4:33 AMDear 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 iswhen 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 willautomatically pull out from partner profile and system status message, am I correct?

    Thanks.Tuff

    Correct AnswerbyChendil Kumar on Jun 30, 2011 6:01 AMHi Tuff,

    As everything in SAP, with IDOCs too there are1) Standard IDOCs2) 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 areused 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 acorresponding business document is created/changed. So this will have messages like "IDOC sent to the port OK" etc which arestatus 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 receivingsystem. On the receiving system the IDOC's control record is validated against the partner profiles set, if an entry is found thenusing the process code it finds the associated FM which will decode the data from the IDOC data records as per the IDOC typeand 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,

    http://scn.sap.com/message/10402217#10402217http://scn.sap.com/message/10402217#10402217http://scn.sap.com/message/10402217#10402217http://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/daniel.tuffyhttp://scn.sap.com/message/10402217#10402217http://scn.sap.com/message/10402217#10402217
  • 7/28/2019 Ale and Idoc

    2/3

    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 iswhen 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 FMassociated 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 forstep 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 somecustomizations/enhancements then you might have to.For Ex: updating the control record accordingly for indicating that you have extended the standard IDOC. Or append custommessages 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,ChenSee the answer in context

    266 Views

    Average User Rating(0 ratings)

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

    Chendil KumarJun 30, 2011 6:01 AM (in response to Daniel Tuffy)Hi Tuff,

    As everything in SAP, with IDOCs too there are1) 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 areused 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 acorresponding business document is created/changed. So this will have messages like "IDOC sent to the port OK" etc which are

    http://scn.sap.com/thread/1985841#10402308http://scn.sap.com/thread/1985841#10402308http://scn.sap.com/message/10402308#10402308http://scn.sap.com/message/10402308#10402308http://scn.sap.com/message/10402308#10402308http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/thread/1985841#10402217http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/thread/1985841#10402217http://scn.sap.com/people/chendil.kumar2http://scn.sap.com/message/10402308#10402308http://scn.sap.com/thread/1985841#10402308
  • 7/28/2019 Ale and Idoc

    3/3

    status from the communication layer(ALE) to application specific messages like "Sales Order XXX created" or "InvalidMaterial" etc.

    You would have noticed something called as Process code in the partner profile, this is associated with a FM(or work flow tasketc) 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 receivingsystem. 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 typeand 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 iswhen 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 codeetc)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 forstep 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 wil l

    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 somecustomizations/enhancements then you might have to.For Ex: updating the control record accordingly for indicating that you have extended the standard IDOC. Or append custommessages 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