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

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

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

Similar Messages

  • IDOC inbound ....Status record !

    IDOC_STATUS-MSGID = 'YM'.
    What is the above variable means ?
    Where from i will be able to know what is the MSGID of my  IDOC  which i have created ...using we31 ,we30 ,we81, we82.

    Hi Friend,
    Go to transaction WE02 and execute with IDOC number.
    Doubel click IDCO number on list, expand the status records.
    Double click on any status number, in STS DETAILS table you will get the message ID.
    Hope it will solbe the probelm.
    Regards
    Krishnendu

  • Recording Dates in Results Recording

    Hi.
    I have an inspection with a task list.  Several samples will be tested each time an inspection lot is created.  I have a number of MICs that are quantitative / calculated to determine results of lab testing - this is all working great.  The problem is that for each of my samples I need to be able to document general information about the sample.  The types of information that needs to be documented are, for example, dates and sample numbers (not serialized using SAP). 
    Primarily these dates need to be used to generate date range specific reports of the lab results.   It is for this reason that I do not want the users documenting dates in the inspection description field in results recording.
    Does anyone know if using the QM_INPUT_PROCEDURE BAdI can the result field of a quantitative MIC be formatted as a date?  Or has anyone had a similar problem that they have been able to solve?  Is Sample Management / Physical Samples the direction to take?
    Thank you very much in advance,
    Cristin

    Ok.  Here's one way around this.
    You can read this post: 
    http://sapfans.com/forums/viewtopic.php?f=27&t=14682&p=43885&hilit=datecharacteristicinspectionlot#p43885
    But basically you use numeric MIC and the date is recorded in the form yyyymmdd. So for today it would be 2010622.  You can even set a spec range at the begining of each year.  So the range would be 20100101 to 20101231.  This could help cut down on typos as well.
    This number then gets copied to the batch record to a linked hidden numeric characteristic.  A dependency is used to convert the number to the appropriate date.  The dependency then updates a second characteristic with the date.  It is this second date characteristic then that you can use in your reports.  If you want to make sure the date formatted characteristic is changed due to additional testing or sampling you can include an  IF NULL or an IF INITIAL statement in the dependency so once the characteristic has a value, it wouldn't be updated if the dependency was called again.
    I am guessing each blood donation is being set up as a separate batch number.
    FF

  • Question on the status record of Idocs.

    Hi all,
    Where does the status of the idoc update::
    1) In the idoc in the sap system/Idoc Archive
    OR
    2)The one we transfer to the OS as a flat file (for the translators(EDI subsystem) to work on)?
    OR
    both of the above?
    Thanks,
    Charles.

    Hi,
    Whenever the IDOC is generated there are one to many status record updated to idoc depending on it is inbound / outbound and various process / system is goes through.
    Check transaction <b>WE47</b> to see all IDOC related status.
    This is the range of status for IDOC.
    OUTBOUND Idoc - Status between 1 to 49
    INBOUND Idoc  - Status between 50 to 74
    Also you can check the View <b>V_STACUST</b>. If you want to check status(s) of any idoc check table EDIDS.
    Regarding two scenario you are talking about.
    1. In the idoc in the sap system/Idoc Archive.
    - When IDOC is generated, it get status record
    - When you archive already created IDOC, the neither the status records are updated / changed or new status record are created
    2. The one we transfer to the OS as a flat file (for the translators(EDI subsystem) to work on)?
    - If you mean that you are sending IDOC to fine port then yes in that case also IDOC has status records.
    Can you explain your second question in more detail?
    Let me know if you have any other question.
    Regards,
    RS

  • Can IDocs Hold only status records?

    Hello,
    Can IDOCS (inbound/outbound) hold only status records ? If yes, then pls give details.
    Many Thanks,
    Kishan

    I understand the question like...
    1.You recieve an Inbound Idoc in to the system.
    2.Now, you need to send the status value of the above inbound Idoc to the middleware system(biztalk)
    3.You can create custom Idoc with the segment having field as Status values and send it as outbound Idoc to the target system
    (OR)
    4.Run the stadard program which I have metioned above and you will get a ALEAUD Idoc generated automatically and it will be sent to the destination based on the partner profile assignment that you have done in WE20.
    5. For partner profile assignment, go to we20 select the target logical system and add the ALEAUD message type as outbound Idoc
    Hope everything is clear. You can get all the above details by giving a search in ABAP Data transfers section in SDN.
    Thanq

  • General questions on IDOCs and IDOCs for 2 Accounting Interface BAPIs

    This post involves several questions pertaining to the topic of IDOC creation. I downloaded a couple of PDFs and tried googling for material on that, but things are far from being clear in my mind.
    I tried to put my questions in some order, so we can follow a line of reasoning. Here we go, then:
    I have one code where I there are calls to 2 BAPIs:
    - BAPI_ACC_ACT_POSTINGS_REVERSE and
    - BAPI_ACC_GL_POSTING_REV_POST
    I am supposed to prepare/create an IDOC to perform the activities these BAPIs are responsible for, for the sole purpose of providing us much more details on the activities being executed in the system - this is one of the IDOC's features, if I got it right, its highly detailed logging of everything that is going on behind.
    Now, the 1st question arises:
    From the material I read, I understood that IDOCs are nothing more than data containers, whose sole purpose is to provide a means of communication between two different systems/parties - one of them would usually be SAP. If this is right, than what sort of IDOC would be this one I am supposed to build - if there's not going to be any inter-system communication ? Doesn't it sound strange that pure "data containers" can work as "logging functions" ? Please share some light here.
    The 2nd question - after I understand what an IDOC really is - is
    then connected to the job I have to do. I found 2 IDOCs which I think have the proper/correspondent basic types for the 2 aforementioned BAPIs. They are, respectively:
    - ACC_DOCUMENT_REVERSE01 and
    - ACC_GL_POSTING_REVERSE01
    Getting back to my understanding of IDOCs, I got that every IDOC is generally made of one control record, data record(s), and status record(s). 3rd question: Where do the segments fit in ? Are the segments definitions of the Data Records ? And why is it that some IDOC types have header segments only and others doesn't have one ? (header segments are not the same as control records, right ?)
    Finally, what is the general process flow for creating/preparing an IDOC ? I looked over a couple of forum posts about this but some of them differ one from another in the order of the steps, some don't mention this or that step, so I am still confused.
    4th and last question: what comes first ? The definition of a partner, the bonding of a message type with an IDOC basic type, definitions of the inbound/outbound interfaces ?
    Any help here would be highly appreciated.
    Thanks in advance,
    Avraham

    Hi Jaya,
    Answer 1. Class is a template for creating objects. Object can also be called as instance.
    Interfaces allow you to use different classes in a uniform way (polymorphism).
    Answer 2. Normal abap is a procedural programming where as by using abap objects we can achieve object oriented programing.
    Answer 6. Source code:
    In below code i have created a interface and a class which is implementing the interface. I have declared a reference variable of type interface and created a object. Then i have called a method.
    REPORT  ZABAPOBJECTS_INTERF.
          INTERFACE I1
    INTERFACE I1.
      METHODS METH1.
    ENDINTERFACE.                    "I1
          CLASS C1 DEFINITION
    CLASS C1 DEFINITION.
      PUBLIC SECTION.
        METHODS: METH2.
        INTERFACES: I1.
    ENDCLASS.                    "C1 DEFINITION
          CLASS C1 IMPLEMENTATION
    CLASS C1 IMPLEMENTATION.
      METHOD I1~METH1.
        WRITE: / 'This is a method one'.
      ENDMETHOD.                                                "I1~METH1
      METHOD METH2.
        WRITE: / 'This is a method two'.
      ENDMETHOD.                                                "METH2
    ENDCLASS.                    "C1 IMPLEMENTATION
    START-OF-SELECTION.
      DATA : REF1 TYPE REF TO I1.
      CREATE OBJECT REF1 TYPE C1.
      CALL METHOD REF1->METH1.
    Question 7: Yes we need to create a class but most probably we use the existing classes.
    Regarding BAPi's go through the below links,
    http://www.sapgenie.com/abap/bapi/example.htm
    http://www.sapdevelopment.co.uk/bapirfc/bapirfchome.htm
    Regards,
    Azaz Ali.

  • Re STATUS Record-HR

    Hi,
    I have created FM for Hiring Action(HR) using BDC session,
    Inbound Process
    When i am trying to pass the FM to IDOC it is giving me Status Record 51 which specifies 'No status record was passed to ALE by the application',
    What exactly i have to do in my FM for this error,
    Can u reply with Code.
    Thanks
    Abhay

    Hi,
    using transaction PA40 in batch-input always causes problems, so maybe u can try to do it using PA30.
    Regards,

  • Control Record - Data fetch in IDOC

    Hi Folks,
    Can you please tell me from where the Control Record data for ORDERS and ORDCHG gets populated. ? I have checked the FM - IDOC_OUTPUT_ORDERS which has one of the import parameters as control_record_in which is already populated when it reaches this FM. I am triggering the IDOC using - NACE settings.
    Since there are many output types and message variants involved in my system i will have to find out from where the Partner profile are loaded. ?
    Thanks
    Balakumar

    Hi Balakumar
    Have you checked in NACE->Output Types->Processing routines, if the output type you are using is indeed configured to use RSNASTED?
    If it is using RSNASTED, then in that program it will call a function to read the partner.
    It basically checks table EDP12 based on your output type, partner number, etc, and then retrieves the IDoc Message Variant, Function, Process Code. This then gets populated into the IDoc Control Record.
    Table EDP12 basically is populated when you configure partner profile in WE20 -> Outbound Parameters -> Message Control.
    Rgds
    Eng Swee

  • IDoc (Control Record) RCVPOR

    Hi,
    I'm posting an IDoc from XI to R/3 and field RCVPOR is coming out blank.
    In the documentation, it says that it should be populated from the Port value in the receiver IDoc adapter.
    Any Idea why it's blank? It is there in the receiver IDoc adapter settings.
    Same problem with SNDPFC?  (This one I don't know were the value would come from).
    All the other fields in the Control Record are being populated correctly since I have the
    (Apply Control record Value from Payload) checked in the IDoc adapter.
    Other question, if (Apply Control record Value from Payload) is checked, is there a way to overwrite some of the values or it's all or nothing?
    Rgds,
    Yves

    Hi Yves
    > Any Idea why it's blank? It is there in the receiver
    > IDoc adapter settings.
    Check you have configured the port in IDX1 transaction. Should be something like SAP<SID>.
    > Same problem with SNDPFC?  (This one I don't know
    > were the value would come from).
    Do you really need this? It's rarely used. Usually just the partner type is used, not the partner function... (but read below).
    > All the other fields in the Control Record are being
    > populated correctly since I have the
    > (Apply Control record Value from Payload) checked in
    > the IDoc adapter.
    > Other question, if (Apply Control record Value from
    > Payload) is checked, is there a way to overwrite some
    > of the values or it's all or nothing?
    In my config I also have "Apply Control record Value from Payload" checked. In the mapping I do NOT disable the control rec, but put empty constants on mandatory fields. Then you can set whatever you want, including the SNDPFC.
    Let me know.
    Alex

  • Inbound Idoc - control record settings

    Hi,
    we have a JDBC to Idoc scenario. We get data from JDBC interface (outbound), map some fields and send it to a receiver SAP system as an Idoc (inbound). We did a similar scenario before and PI filled out automatically the control record settings. So in our mapping to the idoc XML format the must fieds in the control records are set to constant="pi dummy entry".
    It worked for the former scenario well. For this new scenario it doesn't! When i monitor the payload, SNDPOR as example is set with our dummy value of the mapping ("pi dummy entry").
    specials:
    - CC checkbox "Apply Control Values from Payload" is NOT set!
    - The destination SAP Business System is configured as a Party in Integration Directory (not such configurations in SLD)
    - We use PI 7.0
    Any suggestions?
    Thanks in advance
    Michael

    Hi Michael,
    >>So the control record will not be send. I was expecting, that PI the control record data according to the configuration fills. Maybe this is a wrong assumption.
    Yes you need to disable the control record in message mapping, because you want PI to make it at run time based on the configuration done in PI.  So apart from disabling it you need to do some more settings.
    If you have used parties in SAP PI, then select the
    1.Apply control records in IDOC communication channel
    2. Update the Identifier tab in the IDoc receiver channel with the correct information for sender/receiver
    now when you see the IDoc Outbound (in SOap Header) then you will see the correct sender and receiver details.
    Regards
    Suraj

  • Passing Idoc Control Record information  to JMS header

    Hi All,
    We have a requirement where we need to pass the 'MESCOD' and 'MESFCT" in the EDIDC_40 - Control record for the idoc to the Header of a JMS message.
    Basically we are trying to pass IDOC Control segment to the JMS header.
    I was looking at the options we have in the JMS adapter, and i am not sure how can this be achieved.
    Would appreciate any info on how this can be done.
    Thanks,
    Karthik

    Hi Karthik,
    As suggested by Ravi, you can hardcode this values in XI mapping before pushing data to JMS.
    Otherway round would be...check for User Exit where you can populate EDIDC_40 with MESCOD and MESFCT.
    Nilesh

  • Changing IDOC Control Record for EDI inbound Orders Creatiion

    Hi,
         When I try to process the Inbound orders Idocs file through the GENTRAN EDI System.IDOC's were errored out, because of the Partner function was not defined for the Customer ( Legacy ) ( Type KU ) in the SAP.
            Is there any user exit/badi/Configuration to change the Legacy Partner(Customer) to the SAP Partner(Customer) mapping and update the IDOC Control record with the SAP Partner. I am calling EDI_DATA_INCOMING Function module and IDOC_INPUT_ORDERS.IDOCs errored out with Message EO-332 ( Partner function not defined ). 
    Advance Thanks,
    Balaji.

    It's been a long time since I have done any IDOC processing. 
    Go to SE37 and enter the function module IDOC_INPUT_ORDERS.  Display the source code.  Search for "CALL CUSTOMER".  You should see several "CALL CUSTOMER-FUNCTION" lines.  These are enhancements where you can manipulate the IDOC data.  If you locate the correct one (where the data is read from the IDOC but not yet validated), you should be able to map the partner function value.  Double-clicking on the number in quotes will bring you to an "EXIT_" function module.  A "ZX" INCLUDE program is referenced.  If you haven't used the exit yet, double-clicking on the ZX INCLUDE will create it.  The values passed into the function module are available in the INCLUDE.
    Ideally, you should create a project in transaction CMOD that references the chosen enhancement.  This way you can activate/deactivate without commenting/uncommenting the code in the INCLUDE.

  • IDOC control record mapping - Sender Partner number defaulted to log. sys.

    My PI scenario is file to IDOC scenario.
    I have ticked "apply values from payload" checkbox, so Sender Partner Number is being defaulted to logical system assigned to my business system.
    Logical system name has to be unique in PI. My understanding is that I can not have more than 1 business system with  the same logical system assigned to it.
    In SAP, I need to have idocs, coming from different businees systems through PI, set to have the same sender partner number,
    which is not possible when "apply values from payload = 'X' and messages are coming from different business systems.
    Calling all PI Gurus, have you got a workaround ?

    Hi,
    Idoc will be processed in SAP ECC based on the sender details (snprn,sndpor,sndpfc...) of idoc control record..
    instead of different partners name sending in the sender details of control record ...pass the value of the PI logical system name in SNDPRN.... (use only one and this is common for all partners...) any how data records of idoc will have the needed partner details...
    In SAP ECC you need to have this logical system ...to process the received idocs..
    thats it... Hope you got
    Regards
    Rajesh

  • Problem with IDOC Control Record

    Hi All,
    mine is File to Idoc scenario, everything is fine, but Idoc is posted with 56 status.Even I'm giving control record at Mapping and check the option at Idoc adapter "Apply control data from payload". Sender port is not populated at Idoc and Sender and receiver partner numbers are taken other than what I had provided at mapping. Can any one explain what can I do now.

    Hi Ajay,
       It depends whther u wnt to go for automatic filling of control record or filling it from the payload.
    In the first case, it will fill the control record with the ALE config u hv done i.e. partner profiles and port defn in we20 & we21.
    In the second case also, it will do exactly the same, but in this case there shud be a corresponding ale config to wht u r filling in the mapping. The sender, receiver ports, partners, msgtype values populated in mapping shud be exactly same as tht in ur ALE config.
    So, in ur case, compare the values filled in the mappin with tht of the ALE configuration.
    Regards,
    Akshay

  • Inbound IDOC:First record is not an IDoc control record

    Dear Experts,
    I am currently testing an inbound IDOC with program RSEINB00. Unfortunatelly I always get the errror "First record is not an IDoc control record (please check file)".
    So apparently it picks up the file, but there are some format errors I guess?
    Does anybody have an idea what to do?
    this is file uplaoded:
    <?xml version="1.0" encoding="UTF-8"?>
    <EXCHANGE_RATE01>
         <IDOC BEGIN="1">
              <EDI_DC40 SEGMENT="1">
                   <TABNAM>EDI_DC40</TABNAM>
                   <IDOCTYP>EXCHANGE_RATE01</IDOCTYP>
                   <MESTYP>EXCHANGE_RATE</MESTYP>
                   <MESCOD>010</MESCOD>
                   <SNDPOR>XML_2_IDOC</SNDPOR>
                   <SNDPRT>LS</SNDPRT>
                   <SNDPRN>INCENTAGE</SNDPRN>
                   <RCVPOR>SAPQH3</RCVPOR>
                   <RCVPRT>LS</RCVPRT>
                   <RCVPRN>QH3CLNT100</RCVPRN>
                   <CREDAT>20110526</CREDAT>
                   <CRETIM>204404</CRETIM>
              </EDI_DC40>
              <E1ECXHANGE_RATE SEGMENT="1">
                   <LOG_SYSTEM>QH3CLNT100</LOG_SYSTEM>
                   <UPD_ALLOW>X</UPD_ALLOW>
                   <DEV_ALLOW>000</DEV_ALLOW>
                   <E1BP1093_0 SEGMENT="1">
                        <RATE_TYPE>RUFX</RATE_TYPE>
                        <FROM_CURR>USD</FROM_CURR>
                        <TO_CURRNCY>RUB</TO_CURRNCY>
                        <VALID_FROM>20120105</VALID_FROM>
                        <EXCH_RATE>5000</EXCH_RATE>
                        <FROM_FACTOR>100</FROM_FACTOR>
                        <TO_FACTOR>1</TO_FACTOR>
                        <EXCH_RATE_V>0.00000</EXCH_RATE_V>
                        <FROM_FACTOR_V>0</FROM_FACTOR_V>
                        <TO_FACTOR_V>0</TO_FACTOR_V>
                   </E1BP1093_0>
                   </E1ECXHANGE_RATE>
         </ IDOC>
    </EXCHANGE_RATE01>
    kr,
    Stef

    Hi Stef,
    I have just generated a file from my system, to give you an idea of how a file should look for the program RSEINB00 to import:
    EDI_DC40_U1000000000000865239700 3012  DEBMAS06                                                    DEBMAS                                           SAPBCI    LS  BCICLNT100                                                                                GG_TEST   LS  TVNBTS                                                                                20120111135033                                                                                20120111135032     
    E2KNA1M005                    1000000000000865239000001000000010050000000001Ms.                                                                000000000000        0                                              DEBI  US 0000000100             Mercedes Lee                                                                                HAWTHORNE                          MINERAL                            1030                89415     NV        A5   B2C LEE    E12312312                     1520 1520 Fifth Street                            775-949-2668                    +481111111                                                   323232323                     0000000003                                                                               0000     0000000000                          0               2902100601                                                 00  EN                                                                          
    E2KNA11002                    100000000000086523900000200000102                                                                               
    Hope this helps,
    Grzegorz

Maybe you are looking for