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

Similar Messages

  • 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

  • Control record in File to Idoc

    hi guys,
    i am new to XI and now learning File to Idoc scenario.
    after going thru some forums and blogs i found that while mapping the control record EDI_DC40 in the idoc should be disabled.
    my question is will this control record be disabled forever or should the proper data be filled at the runtime.
    help me in understanding this concept plz.
    Points will be awarded
    Regards
    BHASKER

    Hi Bhasker,
    The control record acts as router. This control record has information like which is message type, Idoc type, sender port etc. [http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm ]
    The control records need to filled since data in the Idoc has to be filled accurately. But again it is not necessary, XI has option to fill the control records by itself at runtime using receiver determination
    This blog will help you understand more
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    regards
    Ramesh P

  • Passing Control Record Data in IDOC to R/3 3.1i system

    Hi,
    We have PI 7.0.9 installed in-house and are currently attemptng to point to an R/3 3.1i system (we are in the process of upgrading to ECC5).
    When I enable the check-box to "Apply Control Record Values from Payload" in the receiver comm. channel for the IDOC adapter, it ignores the directive.
    If I look at the Payload in the XML Message in the call to the IDOC adapter, the fields are all filled - however the IDoc adapter simply builds its own values when sending to the back-end. The only difference to idocs for newer SAP systems is we use EDI_DC rather than EDI_DC40.
    Does anyone have any knowledge of this problem and a solution?
    Thanks
    Brian

    Hi Brian,
    About "Apply Control Record Values from Payload"
    If you set the indicator, the conversion of communication parties to the IDoc partner is only possible for systems that are not logical systems.
    If you do not set the indicator, all combinations of communication parties and services are handled as services without party.
    If the IDoc XML structure contains a control record during outbound processing on the Integration Server, it is rejected and created again by the IDoc adapter. If you want to include additional values in the control record, set the indicator and provide an appropriate mapping for the values
    If in the receiver Communication Channel, you do NOT choose option "Apply Record control value from Payload", then EDI_DC40 will contain the values mapped during Mapping in Message Monitoring and SXMB_MONI - Response Payload, but when the IDOC is sent out , control record is filled with the value from the SLD
    If you are looking for, where to find the place where the logical system name for the XI system is defined, it can seen in 2 places....IN transaction SALE on XI, under "Basic Settings --> Logical Systems --> Assign Logical System to Client"...double click on the client no you want to check for...
    Also it can be seen in the SLD in the corresponding business system details.
    Do you want this value as the SNDPRN in the control record ? then you need not do anyhting
    Also take a look at these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    Also have a look at this thread...
    Re: SLD - Logical System Management
    I hope it helps....
    Regards,
    Abhy

  • How can we configure or control records go into single idoc thru BODS?

    Hi,
    Our case is -
    IDOC format has three segment. Each segments has child nodes -
    1. CONTROL SEGMENT - This is required only once per idoc.
    child1
    child2
    2. SEGMENT1 - sinlge source record to be broken into two segments.
    child1
    child2
    3. SEGMENT2 - sinlge source record to be broken into two segments.
    child1
    child2
    we have a single source (lest say having 100 records).
    In the current design which does generates IDOCS but as many as the no of records in source. Currently we use a row generation transform as dummy (with row count as 1) to pass to the IDOC parent nodes's from clause to escape the error - invalid input to the parent nodes.
    Child nodes are either mapped to the source table or are null.
    Question - How can we configure this in a way that we control how many records go into single idoc. Ex - lets say 50 per idoc so only 2 idoc should be created if 100 records are there.

    HI,
    this sounds to me like Data Services. If so I would suggest to post this into the Data Service forum.
    regards
    Ingo HIlgefort

  • Mapping of Control records in file to idoc scenario

    Hi,
    In the mapping part of file to idoc scenario is it necessary to provide the exact control record details
    or will it pick what ever is mentioned ? Can any one please explain regarding the same?
    Many Thanks,
    Sharath

    hi,
    in case of apply control records from payload
    It is indeed very simple to do it and the feature is available from SP10. I have seen lot of posts on the forum for the same and that is the reason for this blog. We can manipulate the control record in the mapping editor and map the EDI_DC40 segment of Idoc as required. Most of the times we need to map only SNDPRN, RCVPRN, SNDPRT, RCVPRT for posting Idocs with appropriate partner profiles in SAP R/3 destination systems. We can disable the rest of the fields as shown below. We need to manually change the control record of idoc for populating partner profiles in the control records while dealing with non-sap sender system, which will be used by receiver SAP system for posting idocs with appropriate ALE configurations.
    check this blog
    /people/sravya.talanki2/blog/2005/12/02/manipulating-idoc-control-records-from-payload
    regards
    chandra

  • Error values in Idoc Control Records in File to Idoc Scenarios

    Hi All,
       I am posting 2 different types of Idocs in 2 different File-to-Idoc Scenarios. In many cases both these files may get picked at the same time. One is an Orders Idoc and the other one is Shipment Idoc. The Orders Idoc has a control record value in the Sender Partner Fn as 'ZC' while as for Shipment Idoc that value is not passed. The other Sender parameters are passed and are different for both these idocs. But when the files are processed, the value 'ZC' get populated for the Shipment Idoc also. When 100 files are sent with 90 orders and 10 shipments, the shipments get created with 'ZC' partner fn. This is visible in the Call Adapter Pipeline Step under the node IDocOutbound. . I have 2 different Idoc receiver adapters.Can anybody help me out here?
    Thanks,
    Geetha

    Hey,
    >'ZC' while as for Shipment Idoc that value is not passed
    Check whether the Source/ Mapping  populates the 'ZC' , Did you checked Apply Control record in Receiver Adapter for Shipment, What is the name  you have mentioned for the in the SLD -Logical system  for Sender system
    Cheers
    Agasthuri

  • 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

  • IDoc Control Record and Status Record Code,  where is it!!!

    Hi,
      Where can i see the code for generation of control record and status record of IDoc.
       Thanks in advance for your answers

    hi ,
    1.first create an segment with the fields u want tcode we31 relase it .
    2. create an idoc and assign segment to it tcode we30.
    3.crate a message type  tcode we81
    4.assign that message to idoc  tcode we 82.
    do the ale configarations .
    now u can write the code in our sender system
    *1.     Create parameters/select-options for input data. i.e., message type, logical system.
    parameters : p_mestyp like edmsg-msgtyp default 'ZKKUMSG',
                 p_logsys like tbdlst-logsys obligatory.
    *2.     Create Data objects for control record, data record and database table.
    data : c_segment like edidd-segnam value 'ZKKUSEG',        "Data record (IDoc)-Segment type
           c_idoctp like edidc-idoctp value 'ZKKUIDOC'.            "Control record (IDoc)-Basic type
    data : begin of i_tab occurs 0,
              ZKSNO   like ZKSTD-ZKSNO,
              ZKSNAME like ZKSTD-ZKSNAME,
           end of i_tab.
    data : w_itab like i_tab.
    data : s_segment like ZKKUSEG.
    data : i_edidd like edidd occurs 0 with header line.
    data : i_control_record like edidc.
    data : i_comm_idoc like edidc occurs 0 with header line.
    *3.     Select the data from responding tables into internal table for a defined condition.
    here you have take ur internal table
    *select single zsno zsname from zkiran into corresponding fields of itab where zsno = p_sno.
    *4.     create control record into internal table.
    i_control_record-mestyp = p_mestyp.         "Message Type
    i_control_record-idoctp = c_idoctp.         "Basic type
    i_control_record-rcvprt = 'LS'.             "Partner Type of Receiver
    i_control_record-rcvprn = p_logsys.         "Partner Number of Recipient
    *5.     create data record into internal table.
    *i_edidd-segnam =   c_segment.
    loop at i_tab into w_itab.
    s_segment-zksno    = w_itab-ZKSNO.                     "Application Data
    s_segment-zksname  = w_itab-ZKSNAME.
    i_edidd-sdata     = s_segment.
    i_edidd-segnam    = c_segment.
    clear w_itab.
    append i_edidd.
    endloop.
    *6.     Process ALE Service Layer using the function module  MASTER_IDOC_DISTRIBUTE.  It returns the corresponding IDoc No.s.
    call function 'MASTER_IDOC_DISTRIBUTE'
      exporting
        master_idoc_control            = i_control_record
      tables
        communication_idoc_control     = i_comm_idoc
        master_idoc_data               = i_edidd
      exceptions
        error_in_idoc_control          = 1
        error_writing_idoc_status      = 2
        error_in_idoc_data             = 3
        sending_logical_system_unknown = 4
        others                         = 5.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    *7.     Display Communication IDocs.
    loop at i_comm_idoc.
      write : / 'Communication IDoc No. is : ', i_comm_idoc-docnum.
    endloop.
    *8.     Commit Work.
    commit work.
    i hope this sample code help u .
    thanks

  • Passing control records to Idoc

    Hi,
    how can we pass control record data to Idoc?can we do that in mapping(GUI) in XI ,lets say if I am doing <b>file to Idoc</b> scenario.I know we can disable the control record field and use apply from payload.my concern is if we don't use apply from payload.
    I have read in SDN XI takes from sender or reciever business systems as they are  related to Logical systems(ref link:XI IDoc  control record data source?) ,does it mean that we don't map these cotrol record fileds in the mapping(GUI)?
    and also please tell me how XI can pass data from flat file to a particular IDOC?
    thank you.

    hi,
    have a look at blog to see what is being filled and how:
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    you can also check my book in which I describe IDOC scenario configurations 
    <a href="/people/michal.krawczyk2/blog/2006/10/11/xi-new-book-mastering-idoc-business-scenarios-with-sap-xi"><b>Mastering IDoc Business Scenarios with SAP XI</b></a>
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Updating control record from EXIT_SAPLVEDF_001

    My ultimate goal is to update SNDPRN of the control record with identifier based on the org structure in an IDoc for outbound invoices. Our organizations share the same sold-to records so our EDI subsystem needs a way to distinguish between organizations.
      So far, I have a function to look up an ID from a custom table but now I need to add the code to ZXEDFU01 to modify the control record. I know I'll have to loop through the IDoc data to find E1EDK14 SEGNAM for the org data first and pass VKORG, VTWEG and SPART to my function.
      What I am not clear on though is how I actually access the IDoc data in my include(ZXEDFU01}? How do I investigate this? Does anyone have a similar example or know of a good source of information?

    Hi Greg;
       I see by that user exit program that you do not have access to the segments of the IDoc, only the control record in the importing parameter CONTROL_RECORD_OUT.  However, it looks like you may also get the org data you are looking for in the importing parameter DVBDKR.  Did you check to see if the fields there have the data you are looking for?
       If that does not work, you can access the segment data of the IDoc from the control record data using a couple of function modules shown below:
         i_edidc type edidc,
         i_edidd type standard table of edidd.
         CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_PROCESS'
             EXPORTING
                  document_number          = CONTROL_RECORD_OUT-docnum
             IMPORTING
                  idoc_control             = i_edidc
             EXCEPTIONS
                  document_foreign_lock    = 1
                  document_not_exist       = 2
                  document_number_invalid  = 3
                  document_is_already_open = 4
                  OTHERS                   = 5.
    and
    CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
             EXPORTING
                  document_number         = i_edidc-docnum
             TABLES
                  idoc_containers         = i_edidd
             EXCEPTIONS
                  document_number_invalid = 1
                  end_of_document         = 2
                  OTHERS                  = 3.
    Cheers,
    John
    Message was edited by: John Carlson

  • EDI: Field REFINT in control record

    I am trying to send orders.orders05 idoc from ecc to xi
    the message that I get in we02 in ECC is
    EDI: Field REFINT in control record with value 'T080902134731A ' is invalid
    Does somebody knows where this field is configured ?
    when I edited this idoc in we02 and erased this value the process was sucessfuly
    but when I try using we19 it assigns this value automatically
    thx
    Shai

    hi
    it depends on use
    As a reference, this field contains the number of the interchange file, as entered in the EDI standards.
    An interchange file can therefore only exist in the external EDI subsystem. Depending on the transmission direction, this number should:
    either inform the R/3 System via status confirmation: in this case, the last returned number is saved in the control record of the relevant outbound IDoc (from R/3).
    or in inbound processing (from R/3), write to the field in the control record of the inbound IDoc.
    cheers

  • Want to put  data  in control record of IDOC (Inbound Idoc)

    Hi All
    For some business reasons so many Idocs are not getting posted into SAP. They are just simply failing.So my client wants report that will give me a list of Idocs that are failed . I want to put document number in the control field so that i can display that filed in the report which sucks data from EDIDC table.
    Can i put data in the control record ?
    it is an INBOUND idoc
    Can i use these fields?
    Or will SAP use these fields for any sort of processing?
    EDIDC-REFMES(reference message)
    EDIDC-REFINT(Reference to interchange file)
    EDIDC-REFGRP(message group)

    Hi Prashant,
    I understand that your requirement is to store name of picked up file in SAP system.
    Can you I use ARCKEY, SNDLAD or RCVLAD fields or there is some restriction to use these fields, means will it impact something?
    You can use them if you are sure that it would not affect routing routines and message processing in SAP ECC.
    Regards,
    Radek

  • SapErrorMessage=Inconsistent IDocs passed: Data records or control records

    Dear Friends
    I am not a basis guy but am doing that work, since we don't have any basis admin in our company. One of our clients using our server in the lab is doing some testing of sending IDOCs from one server to another and are getting the following error message
    SapErrorMessage=Inconsistent IDocs passed: Data records or control records missing..
    AdapterErrorMessage=Error occurred while calling function module "INBOUND_IDOC_PROCESS" in R/3
    Is there any log files or some thing that I can see to get more info on this problem. I don't know where the log files related to this kind of problems get stored. Any feedback will be highly appreciated.
    Thanks
    Ram

    Hi,
    thanks all for your help, great progress has been made!
    There was no idoc record in sap as the document had not made it that far
    A large part of the problem was my lack of understanding of sap versioning. My previous understanding was that you had a major version of the document: ORDERS01, ..., ORDERS05 and each of these have a version that relates to the software version, e.g. 47, 62, 64 etc.. which appears in the control record.
    So I apparently have:
    ORDERS05   64    V2
    ORDERS05   64    V3
    Can anyone explain this versioning model?
    I would assume that V3 is the newer version but ...
    thanks and regards
    m

  • How to put data in MESCOD field of in IDOC Control Record ?

    We have a File->XI->IDOC scenario.
    Two different types of files have to been mapped to the  same IDOC (WMMBXY).
    We want to use the field MESCOD in order to differ idocs from one type file or the other.
    In the Message Mapping, I have the EDI_DC40 record dissabled, to permit that it is fulfilled by XI.
    How can I put information in MESCOD field?. Is the only solution to enable EDI_DC40 record ? (I don't like this solution because automatic fulfilled is lost ).
    I've seen that a Header Mapping exists in Receiver Agreement, but this is only available to Sender&Receiver.
    Thank you.
    Francisco.

    hi Francisco,
    take a look at this:
    http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm
    section:
    The following table provides information about
    how the fields of the control record are filled by the
    receiver IDoc adapter.
    now you see which fileds are supplied by receiver idoc adapter
    then:
    If you have not set the Apply Control Record Values from
    Payload indicator in the receiver IDoc adapter, the
    fields are filled as follows:
    now you see which fields are taken from ID
    so enable EDI_DC40 and just fill MESCOD
    this will be much easier than any other routing
    (if such exists if you disable it)
    Regards,
    michal
    Regards,
    michal

Maybe you are looking for

  • Can't open PDF portfolio in Adobe Reader 11.0.10

    I've seen this question asked a few times on the Forums, but I haven't seen an answer. I received a PDF portfolio, but I can't open it on my Mac (OSX 10.10.2) using Adobe Reader 11.0.10. When I try to open it, I get the message, "For the best experie

  • Iweb update wont install

    When I chatted with Tech Support because my website that I have been running for 3+ years wouldn't publish they had me download iweb update 3.0.2 When I downloaded it and tryed to install it I get the following error in the Destination Select portion

  • How To Overcome When User Incorrectly Opened The First Inventory Accounting Period As Next Month

    Hi, User has opened the wrong first inventory account period. Instead of Aug-14, next period Sep-14 has been opened. There are transactions which need to be posted in Aug-14. How can I rectify this? During my search in oracle support, I found below i

  • Apple TV screen is smaller than TV size

    Hello. We just installed a sound bar on our TV and now the HDMI cable for the Apple TV is plugged directly into the receiver, vs the TV. Now the Apple TV screen is a smaller box centered in the middle of the TV, about half the size as the actual TV.

  • Unable to open any web links.

    whenever I click on link, it opens a new tab but then it throws up the error saying the safari is not able to connect to the server. But, if I logoff from my account and login back thru guest account, I am able to open the same link. Any ideas why th