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

Similar Messages

  • 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>

  • 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

  • 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

  • "Receiver port not valid in control record"...idoc error

    Hi,
    The new materials are sent to SAP via a text file which is placed in the application server which EDI uses to populate the Idoc segments and creates the material master.
    Recently we upgraded from SAP 4.6 C to ERP 5.0.
    After upgrading we are getting a message as Port(HPLED) invalid in control record.
    I get an error message as  "receiver port HPLED  not valid in control record"...
    It is not able to find  the receiver port & hence cannot create the MM.
    We checked all the config and compared with Test and production and we could not find any noticable change.
    Did anyone come across any infor on this?
    Your valubale reply is really very important for me.
    Pls reply.
    Regards,
    Pri

    Hey Ramesh,
    I've already done the WE57 setting.
    You see the WE57 setting is always done on the reciever side and not on the sender side (There is no harm but it is not what SAP recomends) The Linking on the sender side is done in the Partner Profile, where we give the extension name.
    For the reciever this Partner profile setting of extension is not there therefore we need to go to WE57 and do it.
    I've done all the config and have tried all the things in both the systems but somehow nothing is working.
    That is why I asked that in my Inbound FM which is IDOC_INPUT_HRMD do I need to popluate one of it Parameters or fields where I mention the Extension name and all.
    Yesterday however I found an SAP NOTE (105148) which tells me that my naming convention of the Extension is wrong. I have made ZHRMD_A07 extending standard IDOC tupe HRMD_A07, actually it should be ZRMD_A07. Again this is speculative I need to try this out. But I do know that SAP has various checks which checks all the naming convention and all. I'll try this out and hopefully it might work.
    In the meantime any other suggestions are most invited. I am using Message type HRMD_A and using IDOC type HRM_A07
    Regards
    Abhishek Sahi

  • Version of EDI standard in control record of an IDOC

    Hello All,
      I want to know from where the Version of EDI(in details tab of control record) is being picked from.
    Thanks,
    Rakesh.

    Hello Amit,
      I checkd in WE30.I think release version is different from EDI version because for a vendor in the system the release is 46C whereas EDI version is V11.
    Thanks,
    Rakesh.

  • Multiple control records in inbound idoc FM

    HI, 
         I have one basic doubt.
    when we write
    LOOP AT idoc_contrl
    LOOP AT idoc_data where docnum = idoc_contrl-docnum.
    endloop.
    endloop.
    does it mean there can be multiple idocs being processed with single inbound fm call.
    where do we controll whether inbound fm is called for every new idoc or there will be collective processing.
    Regards,

    Mass Processing of IDOC's is possible but not in all the cases. Refer to the given below Link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/0b/2a670f507d11d18ee90000e8366fc2/content.htm
    http://help.sap.com/saphelp_me52/helpdata/EN/5f/45f93b4139b478e10000000a11402f/content.htm
    As far as Coding block you mentioned, I believe the same would be fired for each & every IDOC.

  • Control record mapping in IDOC

    Hi All,
    I am doing File to IDOC scenario. In this I am using MBGMCR03. In EDI_DC40 segment I have mapped constants to the sender n receiver port, partner frofile etc. And in IDOC receiver adaptor i have selected take sender from payload. It is working fine.
    However when i will transport my scenario to quality , How am i going to change all these constants with the new names?
    is there any better way of doing it? Like my sender details will be automatically determined by PI system.
    Thanks,
    Atul

    Hi Atul,
    1.if i use full export for transporting SLD from DEV to QA,can i use the same tecnical systems and business systems in QA?
    Can T.S and B.S also get transported from DEV to QA?
    You can use same technical systems and Business systems.
    1. Go to Dev SLD and Export all your SWCV, Products, Technical and Business Systems. This is nothing but saving of the SLD objects as a CIM file on your local machine. You would also need to export the Technical And Business System poitning to your XI integration server .
    2. Go to the QA SLD and then import these objects exported in Step 1 in QA SLD
    3. Now, create the QA Tech and Business Systems in the QA SLD
    4. Go to the Dev Business systems imported on the QS SLD and you will have an option Transport Targets. In this map the Source Business System to the Target Business Systems.
    Make sure that all Dev Business Systems have the correspodning Transport Targets for the QA Business SYstems
    5. Now if you import the ID objects in QA , the business systems name will be renamed automatically.
    2.In such case how to define business systems groups and transport targets?
    You need to create Transport Groups on your QA SLD. One for Dev and One for QA. You can create Transport Groups only for Integration Server Business Systems.
    And this is why you would need to export the Dev XI technical System and Business System from the SLD of Dev and Import it into the QA SLD.
    2. Create the transport groups and then assign all Dev Business Systems to Dev Group, all QA Business Systems to QA group and then create the transport targets.
    You use the Option related Integration server in the Business Systems to assign a Business System to a Group.
    Refer
    Problem regarding xi transport
    How to handle SLD for Tranporting Dev to Quality ser
    https://service.sap.com/~sapdownload/011000358700001684302005E/HowToSLDandXI.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0fa2c490-0201-0010-61b4-df12869c4753
    Overview of Transition from Dev to QA in XI
    /people/sravya.talanki2/blog/2005/11/02/overview-of-transition-from-dev-to-qa-in-xi
    /people/sap.india5/blog/2005/11/09/xi-software-logistics-ii-overview
    Thanks,
    Satya Kumar
    Reward if it is useful..

  • 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

  • BADI to Change control record from idoc

    I’m trying to use the BADI IDOC_CREATION_CHECK to change the control record from the idoc but im not able to do it because the parameter IDOC_CONTROL is an importing parameter not a changing parameter, I’ve tried to use the BADI IDOC_DATA_MAPPER but I this case I’m just able to change the data record, should I use another BADI?
    Regards
    Luis Constantino.

    hi.
    have you tried ABI_IDOC_PROC_MODIF?
    i did not read much thru the documentation...
    i hope this helps.

  • 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

  • Changing IDOC control record by XSL Mapping

    Hi,
    I am using scenario: legacy -> XI -> R/3.
    In the first step I am mapping XML -> IDOC. I have to map the field "SERIAL" in idoc control record in EDI_DC40 (idoc control record structure) with a constant. When I view the message in XI monitor. I cannot see the change and that field is not visible as before.
    Any suggestions would be highly appreciated !
    Regards,
    Faiq

    Hi,
    If you have set the Apply Control Record Values from Payload indicator in the receiver IDoc adapter, the following fields are filled from the IDoc-XML payload:
    MESCOD
       MESCFT
       TEST
       EXPRSS
       STD
       STDVRS
       STDMES
       SNDSAD
       SNDLAD
       RCVSAD
       RCVLAD
       REFINT
       REFGRP
       REFMES
       STATUS
       DIRECT
       OUTMOD
       CREDAT
       CRETIM
    You can change the contents of only above  fields by using a mapping and getting it replected in the SAP System.
    Regards,
    Bhavesh

  • IDoc Control Record

    We have an issue with one of our scenarios.
    We are sending an IDoc into our SAP system but we get the message
    "EDI: Partner profile not available"
    Now at first this made sense as our logical system in the Partner profiles was FMS but the SLD had the sending systems logical system name as BS_FMS_QA.
    We then changed it to match FMS so in the SLD under business systems the logical system is now FMS.
    The issue is that we still have the problem. When we go to check the control segment of the Idoc in WE05 in the receiver system it has the Partner as BS_FMS_QA. The same value is present in the monitoring of XI for the
    SAP:SNDPRN>BS_FMS_QA</SAP:SNDPRN
    We have changed th value in the SLD restarted the system but still get the same result.
    Could someone let me know where this value could also be kept AND where the IDoc control segment gets its values from because I thought it was the SLD.

    Hi Alex,
    after you changed the ALE data in the SLD for your business system, it might be necessary to reset the SLD cache on the XI IS.
    Check if you have success with following SLD related content of
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0332b2a-eb97-2910-b6ba-dbe52a01be34">How to Handle XPI Caches in SAP NetWeaver 7.0 (2004s)   (PDF 1.8MB)</a>
    Extract from unit 3.3 - Point 13:
    SLD data of the business system is cached in table LCRT_CLNTCACHE. To display the table, use transaction SE16.
    This table is populated with the data from the first request for this information.
    For manual invalidation, use the function module LCR_CLEAR_CACHE in transaction SE37.
    Hope this solves your issue.
    Best regards,
    Silvia

  • BADI/Exit: Changing IDoc Control Record

    HI,
    do you know a way to modify the IDoc Control Record for MASTERDATA IDocs like CREMAS/DEBMAS/ etc ?
    there are a lot of IDOC Badis and Exit´s but without changing the EDIDC.
    any ideas ?
    Regards,
    Gordon

    Hi Gordon,
    Did you find an answer to your question? I have the same issue and am looking for a BADI or user-exit that will allow me to change the IDOC control record.
    Thanks,
    Uma

Maybe you are looking for