Determination Idoc Control data - Outbound

Hi Guru's
I would like to know how to get the idoc control data, like receiver port and receiver partner. For example:
I have an ABAP program which collects the IDOC data at the end I want to send out the IDOC, but what is the best way to determine the receiver information? Or how does it work in relation with partner profiles?
Best regards,
Guido Koopmann

You don't need to specify all of the information - your distribution model will take care of it.  Do something like this snippet of code for the control record for output-based processing:
* Populate the control record
  gs_ctrlout = gs_ctrlin.
  CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      own_logical_system             = lv_logsys
    EXCEPTIONS
      own_logical_system_not_defined = 1
      OTHERS                         = 2.
  IF sy-subrc EQ 0.
    gs_ctrlout-sndprt = 'LS'.
    gs_ctrlout-sndprn = lv_logsys.
  ELSE.
  ENDIF.
  gs_ctrlout-serial(8)   = sy-datum.
  gs_ctrlout-serial+8(6) = sy-uzeit.
If you have a standalone program, before calling MASTER_IDOC_DISTRIBUTE, you just need to fill the message type and IDOC type in the control record.

Similar Messages

  • Get wrong IDoc control data

    Hi, experts, I create a extension base on baisc type SISDEL01 for delivery.  And I have add the control data in WE82. But now i found when i get idoc control data, the field of extension has no value. Could somebody give me some advices? Thanks.

    Hi Rick
    After released the IDOC did you re imported?. Are you able to use the extended structure in PI?.
    Check this as well
    XI IDoc  control record data source?
    Thanks
    Gaurav

  • RE: IDOC CONTROL DATA FOR ISU_IDOC_INPUT_ISU_EL40

    HI,
    CAN ANY BODY PLEASE TELL ME CONTROL DATA FOR ISU_IDOC_INPUT_ISU_EL40
    THANKS,
    Sarang

    Hi raj,
    i want to pass data to standard function module which genrates idoc.
    function module name is ISU_IDOC_INPUT_ISU_EL40.
    now i want to pass control data to IDOC_CONTRL parameter.
    my itab consist of 4 fields.
    first field is passed to one segment and remaining fields are passed to other segment.
    So I want to know how to pass data to different segments and what should be the control data(like partner type etc.)
    waiting for ur reply
    Thanks,
    Sarang

  • PI  AAE = IDOC control data to ECC

    Hi All,
    I am using the JAVA IDOC receiver adapter to send idoc's to CRM as a test to just send idocs
    Need help on the control records.
    Things done
    1. Passing data manually.
    2. Idoc begin =1 and all segments = 1
    3. Created Logical system in WE20 in CRM and created partner profile with inbound parameters.
    4. Checked business system in ID and it reflects the logical system ; albiet same as the one created in ECC.
    5. Created a dummy partner profile in ECC to act as XI sender
    Now, can tyou please guide me how to fill the fields in EDIDC_40?
    <EDI_DC40 SEGMENT="1">
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>100</MANDT>
             <DOCNUM>Should i give?</DOCNUM>
             <DOCREL>1</DOCREL>
             <STATUS>1</STATUS>
             <DIRECT>2</DIRECT>
             <OUTMOD>1</OUTMOD>
             <EXPRSS>1</EXPRSS>
             <TEST>1</TEST>
             <IDOCTYP>CRMXIF_ORDER_SAVE_M01</IDOCTYP>
             <CIMTYP>1</CIMTYP>
             <MESTYP>CRMXIF_ORDER_SAVE_M</MESTYP>
             <MESCOD>1</MESCOD>
             <MESFCT>1</MESFCT>
             <STD>1</STD>
             <STDVRS>1</STDVRS>
             <STDMES>1</STDMES>
             <SNDPOR>SAPXX1 ( DOne as part of document available- XX1 SID of pi)</SNDPOR>
             <SNDPRT>LS</SNDPRT>
             <SNDPFC>1</SNDPFC>
             <SNDPRN>XX1CLNT001 ( dUMMY CREATED IN CRM</SNDPRN>
             <SNDSAD>1</SNDSAD>
             <SNDLAD>1</SNDLAD>
             <RCVPOR>SAPXX1_SBX ( Port created in CRM)</RCVPOR>
             <RCVPRT>LS</RCVPRT>
             <RCVPFC>1</RCVPFC>
             <RCVPRN>CX1CLNT100 ( Partner profile created and inbound parameter assigned; also reflecting in the business system)</RCVPRN>
             <RCVSAD>1</RCVSAD>
             <RCVLAD>1</RCVLAD>
             <CREDAT>20140303<CREDAT/>
             <CRETIM>191016<CRETIM/>
             <REFINT/>1<REFINT/>
             <REFGRP>1<REFGRP/>
             <REFMES><REFMES/>
             <ARCKEY>1<ARCKEY/>
             <SERIAL>1<SERIAL/>
          </EDI_DC40>
    I ahve something urgent to be delivered and need your help very badly

    Hi All,
    Exception caught by adapter framework: Sender Partner Number is not available
    This is the error i get when i try to process my idoc for the receiver AAE IDOC adapter
    Which value do i put in here and here is the config i have made.
    1. WE20 in ECC with inbound parameters.
    2. Logical system field in SLD filled for the business system i am using.
    3. ICO config with Sender and receiver business components checked with the respective business systems.
    4. I have also noticed that the sender business system in ID , where you check for adapter specific attributes is blank even though i have provided a logical system in SLD for the BS.Tried Clear SLD cache but still not reflecting. COULD THIS BE THE PROBLEM?
    Kindly help as even if it fails i have to send over an idoc as part of my POC and i am dead late .

  • Regarding IDOC control data

    Hi All,
    Please let me there is any function module available for getting control record information if I pass message type to the function module.
    Regards
    Mahesh

    Hi Mahesh,
    There is no such function module available in SAP to get you the control record when you give the Message Type as input.
    The simple reason is that you might be using the same message type for both inbound and outbound and for many business partners, so you cann't get the control record details that way.
    If you wanted to know the basic type associated with that message type then you can use WE82 transaction for getting the corresponding basic type for that message type.
    Thanks,
    Mahesh.

  • Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED

    Hi Experts,
                          Hi In ALE ,IDOC  HOW  CONTROL DATA IS TRANSFERRED .
    Thanks & Regards
    Bhaskar Rao.M

    Hi Bhaskar Rao,
    Good Check out the following documentation.
    /people/kevin.wilson2/blog/2006/11/13/ale-scenario-development-guide
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1230385,00.html
    Some good links on ALE/IDOC
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    Please check this online document for ALE and IDoc.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    Also check this links for additional information.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    Good Luck and thanks
    AK

  • 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

  • Idoc is recieved on port but only control data

    Hi all,
    I hav created a program to send data on file port. Idoc gives status 03. but we we see data on recieving port (when file is generated)then data is abent only control data is recieved . No data records are there.I'm using FM EDI_OUTPUT_NEW to send data
    If I send that idoc again directly running The  FM EDI_OUTPUT_NEW then then conrol data and data records are recieved successfully.
    Plz help me
    Regards
    Richa

    Hi!
    The data section is missing mostly in that case, if all the data fields within it is empty. IDoc sending is skipping empty fields.
    In WE19, I think you entered all data within the fields.
    Check your sender program, you might accidentally clear the IDoc data strucure before the MASTER_IDOC_DISTRIBUTE fm call.
    Regards
    Tamá

  • How to trigger outbound IDOC when data changed in BP through Inbound IDOC.

    Hi,
        In our system whenever we create a new Business Partner, these data is send across to SAP R/3 (as BDOC) and to Mainframe system  (as outbound IDOC). Whenever we change any Business Partner record the data is send across to SAP R/3 (BDOC) and to Mainframe system (as outbound IDOC).
        This functionality is working fine.
        Currently we are getting a value for one standard field (Customer_Group3) of Business Partner as an inbound IDOC. The value of the inbound IDOC is reflecting in the field (Customer_Group3) in Business Partner Transaction. Once the inbound IDOC is received, the modified value is send across to SAP R/3 as BDOC. But the modified value is not send across to Mainframe system (outbound IDOC). The outbound IDOC is not getting triggered.
    Kindly help

    Is your mainframe system configured as Site in SMOEAC. If so are you using XIF Adapter.

  • 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

  • STO Partner Copy Control to Outbound Delivery Document (NL)

    Hi -
    Partner Schema CR for 0003 UB Type has been maintained in configuration, which allows CR (Freight Forwarder) partner function to be manually added to UB Document Types (Partner Determination Process u2013 0003 Stock Transfr PurOrd).
    However, even with this configuration the CR partner does not copy to the Outbound Delivery Document.
    After some analysis, I found the following:
    In program SAPLMEPO (MM06EF0P_PARTNERS) FORM PARTNERS in line 97 u201Ccheck EKKO-BSAKZ equal to spaceu201D; if purchase orders have EKKO-BSAKZ = 'T' then never determine partners. I have checked the EKKO table for field BSAKZ and all STOu2019s have a T in that field. If the code is looking for <blank> in order to apply the partner it looks like the program will not attempt to retrieve the Partner Functions with BSAKZ = T.
    All other partners are getting copied to the outbound Delivery, such as PI (Invoicing Party), DP (Delivering Plant), SH (Ship-To)etc.
    Is there a way to have Freight Forwarder partner copy control to Outbound Delivery document at time of Delivery create from either Vendor Master or Customer Master for STO (UB Purchase Order type) / Delivery type NL?
    Thank you,
    Karen

    remark: for me the check is in line 113 (SAPKH60407).
    Please read OSS note 842829:
    2. The system does not transfer the partner data from the STO to the replenishment delivery. This particularly applies to the forwarding agent. The replenishment delivery uses only the customer of the receiving plant (EKPO-WERKS) as a partner. In the replenishment delivery, this customer (EKPV-KUNNR) is the direct goods recipient. The customer is not the sold-to party or a general debtor, for whom the system would determine a (different) goods recipient using the customer master in the replenishment delivery. If the PO header contains a vendor, you can use a modification to transfer the vendor as a partner to the replenishment delivery, if required. However, this is not the standard system behavior. There is no known modification for transferring the forwarding agent.

  • Populating idoc with data

    Hi,
    i am trying to send invoice idoc to destination . Can anyone please tell me how to populate the basic idoc type invoice02 with data ? Is there an sap standard program i need to use ?? I am using ALE to send my idoc .
    Thank you

    Hi Alisha
    where are you trying to trigger the idoc from?if you are triggering it from a transaction,you should define a output type for that transaction.
    there are various other things you need to take care of while sending an idoc from origin to destination.
    1.RFC Destination of receiver-define in SM58
    2.port definition-attaching the rfc destination to the outgoing R/3 port in WE21
    3.partner profiles-outbound parameters for the idoc like the port,type,message type etc. in WE20
    here under the message control u have to specify parameters like application,msg type and process code.this process code will link to a FM..IDOC_OUTPUT_INVOIC which consists of the code to populate the idoc.
    4.attaching the basic idoc type to a message type in WE82
    so as soon as u save the txn...the output control will trigger the FM and the idoc will be generated.if the control data like partner profiles,port definitions are set correctly the idoc will reach the destination as desired.
    hope this helps.

  • Determination of First Date in Sales Order

    Hello SAP Friends, 
    Below is the issue we realised during the testing. The issue is with First date in the Sales Order which is not updated as per Unloading Point Calendar .
    As per details I received, it should refer Unloading Point Calendar for ShiptoParty and populate the next working day as First date into Sales Order.
    How is First Date determined in the sales order?  Is there any config settings which is based on Route to do this? Or Is it controlled purely based on settings done in Tcode: VOV8, Leadtime days? I do not think VOV8 settings is controlling that in our APO system.
    I have checked MAD, Pick/Pack, GI date all are populated correctly, But First Date did not follow the logic Unloading Point Calendar of ShiptoParty.
    Please let know your inputs in this regard.
    Thank you
    Satish Waghmare

    Satish,
    I unfortunately don't have a solution for you.  However, here are a few observations, and a question.
    My experience is that 'First Date' in R/3 is not determined.  In every sales order I have ever seen, First Date is proposed (matches the requested delivery date in the Sales order header) by the system, but can be overridden by any changes that the user may elect to make.
    Generally, then, after First Date is entered, the R/3 system then may be configured to determine certain master data:  Shipping Point, Unloading Point, Route, Route Schedule.  From this master data, if you are performing ATP in R/3, the system will then also calculate various dates (if configured) for the confirmed schedule proposal:  Normally these calculated dates are Delivery Date, Goods Issue Date, Loading Date, Material Availability date, Transportation Planning Date.  If you have configured Route Schedules in R/3, other dates may be determined.
    If you are performing ATP in APO, then any such scheduling must be performed in APO.  Relevant Master data that was determined in R/3 is carried across to APO during the ATP check and is then used to calculate appropriate durations.  This does not happen automatically, you have to configure the scheduling technique you wish to use in APO.
    So, my first question:  Are you performing ATP in APO?  If not, then you should probably close this post, and re-enter in one of the SD forums, since it is an SD issue.  If you are performing ATP in APO, then what scheduling technique are you using?
    Best regards,
    DB49

  • Automatic determination of billing date on order related billing

    Dear all,
    Some background:
    We are using resource related billing: create standing sales order with WBS as reference.
    Costs are posted to the WBS (serves as a bucket to collect costs).
    Whenever needed, the costs on the WBS are billed. This is done via transaction DP91, creating a billing request for the standing sales order which generates a new sales order which takes the amount from the WBS element. This sales order can then be billed.
    In other words: Each period, the standing sales order can be billed (based on the WBS element it contains) in a new sales order.
    Problem:
    The billing date is derived from the 'requested delivery date' on the sales order.
    We would like to have by default proposed by the system as billing date: the date when the (2nd) sales order and/or billing document is generated. So either date of billing should be the billing date or the requested delivery date (which will then automatically determine the billing date)
    How can this be achieved?
    What I tried:
    1). I have ticket the flag "Propose delivery date", but this doesn't seem to be the solution.
    2). Factory calender is only to be used in case a specific date should be used (e.g. last day of the week/month). I don't think we need this, as we could just go for "todays date" during (2nd) sales order/billing document creation.
    3). I checked the copy control properties, but this is not really an option I think.
    Many thanks!

    HI, Boiler 
    I suggest you to check the copy control again.
    As I known, there is a Routin setting for data transfer (Data VBRK/VBRP) in the item level. And you can use standard routin 11 means Bill. date= Today.
    Hope it can help you.
    Wink Young

  • Control Over Outbound Delivery/ System based release strategy for Outbound

    Hi All,
    I am working on one scenario to control the outbound delivery
    AS IS : Sales Employee  A accepted Order on 6th ,Decu201908 for customer B and order quantity 2 Product ABC to deliver on 15th u2019Decu201908 .
    in between Sales Employee B accepted Order on 10th ,Decu201908 for customer C and order quantity 2 Product ABC to deliver on 12th u2019Decu201908.
    In this circumstance the Sales Employee B delivering the products to Customer C on 12th u2019Decu201908 ,which the products  kept for Customer B. and Sales employee A not able to deliver the goods to Customer B on promised date.
    TO BE : How do I control the Sales Employee B should not pick the goods which are reserved by Employee A for customer B.
    I would request you to give me the possibilities to control the OBD
    Thanks in advance.
    Regards,
    Padma
    Edited by: Padma Priya on Jan 6, 2009 7:50 AM
    Edited by: Padma Priya on Jan 6, 2009 7:52 AM

    Dear Padma
    Go to material master and check what availability check you have maintained.  Then go to OVZ9, select that availability check with the combination of  "A" and execute.  There tick the box Include sales reqmts  so that stock will be reserved whoever creates the order first. 
    In your case, if Sales Employee A creates the sale order first and stock is available, then stock will be reserved for that order only and it cannot be diverted to subsequent orders, unless the first created sale order is deleted.
    In this, there is also one constraint.  Even if order is not confirmed by customer, some sales people will create a dummy sale order and reserve the stock for them.  So in that way, some control should be there in such a way that orders can be created by any sales persons but the deletion option can be given to some higher officials.  This basis can very well do.
    thanks
    G. Lakshmipathi

Maybe you are looking for