Purchase order IDOC relationship

Hi IDOCers,
in ME23N in the object services, I can click the refernce button and it will show me the the IDOC number and type in a small ALV grid.
Question: How can I retrieve the IDOC number for an order and/or vice versa?
TIA,
Clemens

... found it:
Involved tables are srrelroles and idocrel. Tables have to be joined back and forth.
* prepare reference table complete
  loop at pt_alv assigning <alv>.
    lv_objkey                             = <alv>-docnum.
* collect object keys
    insert lv_objkey into table lt_objkey.
    at last.
* at least one key - no empty select 4 all entries
      select srrelroles_idoc~objkey srrelroles_ekko~objkey
        into (lv_objkey_docnum, lv_objkey_ebeln)
        from srrelroles as srrelroles_idoc
        join idocrel
          on idocrel~role_a                   = srrelroles_idoc~roleid
        join srrelroles as srrelroles_ekko
          on srrelroles_ekko~roleid           = idocrel~role_b
* just to make sure
        join ekko on ekko~ebeln               = srrelroles_ekko~objkey
        for all entries in lt_objkey
        where srrelroles_idoc~objkey          = lt_objkey-table_line
          and srrelroles_idoc~objtype         = 'IDOC'
          and srrelroles_idoc~roletype        = 'INIDOC'.
        ls_docnum_ebeln-ebeln                 = lv_objkey_ebeln.
        ls_docnum_ebeln-docnum                = lv_objkey_docnum.
        insert ls_docnum_ebeln into table lt_docnum_ebeln.
      endselect.
    endat.
  endloop." at pt_alv assigning <alv>.
Regards,
Clemens

Similar Messages

  • Splitting Purchase Order Idoc based on qty

    Hi All,
    I am having a requirement wherein i have to insert multiple line items in purchase order idoc  based on quatity .Eg if the line item qty is 3 then the same line item has to be repated for 3 times and purchase order idoc has to created with 3 line items.I am trying to do this User exit EXIT_SAPLEINM_002 which is used Customer Enhancements to Data Segments: Purchasing Document (Outbound ).Can anybody tell me how can i go ahead inserting multiple lineitems in purchase order idoc based on the qty.So, Can anybody know how to handle this scenario? Also, can you please let me know whether is there any standard procedure for handling this scenario
    Thanks in advance
    Regards
    Saravana

    Hi,
    Use t.code ME2M or ME2N , enter account assignment category A & then choose selection parameter WE101 (open goods receipt) and execute.
    Regards,
    Biju K

  • Same message code & function for both Sales & Purchase order idoc.

    The same message code and function be used to send both sales order and purchase order idoc?

    Hello,
    You can use the same message code and function to send for both sales orders and purchase orders provided if you use different message types i.e., output types in the outbound partner profile configuration for processing these transactional data.

  • Purchase order IDOC: output

    Hi
    I did configure a the following.
    1.Outbound message type <b>ORDERS</b>
    2.Outbound receiver port : TRfc
    3.Basictype <b>ORDERS05</b>
    4.Message control: Application <b>EF</b> Message type <b>NEU</b> . Process code <u>ME10</u>
    What do i need to configure additionally so that the purchase order idoc get exported?

    Naresh
    This is what i did already.
    When i create the order ,  i user NEU AS as output and "distribution ALE" as medium. I then select LS (logical system) as Partner function and SAPBC as partner.
    I get a warning message "Partner SAPBC does not exist for partner function LS".
    When i go back to the messages, it is unprocessed. When i display the communication method, i get the error "No communication data has been defined for transmission medium A"
    Any idea why?

  • Purchase Order  IDoc

    Hin all,
    can any body help me in IDOCs
    where can i find the standard  Purchase order  IDOC
    plase help me
    thanks

    Hi,
    for outbound u have the FM( IDOC_OUTPUT_ORDERS)
    for inbound u have the FM (IDOC_INPUT_ORDERS).
    also in WE30 u can check ORDERS05
    Regards,
    Nagaraj

  • Generating purchase order idoc, when a sales order is created

    Hi folks,
           we need to send purchase order idoc from SAP to some external system. Once sales order is created, it should automatically generate the purchase order idoc and send to the external system....Any document showing step by step configuration to do so? I have basic knowldege of ALE and IDOC...please suggest me the configuration steps in detail...
               Thanks in advance,
                 Shyam.

    Hi,
    1. Configure the IDoc with message type ORDERS and basic IDoc type as ORDERS05 (You have to follow common step-by-step approach)
    2. Configure Message Control to automatically generate IDoc whenever a Sales Order is created. (I mean output type)
    So whenever a Sales Order is created, output type will generate an IDoc.
    Hope this information is useful.
    Regards,
    AK

  • Customer Sales Order number to display in Purchase Order idoc

    Hi experts,
    I have the Customer Sales Order number in the PO item level under "account assignment" tab.
    But it does not show in the idoc xml ouput of the PO.
    Could you let me know if it is not standard field to display in the ORDERS05 idoc type of the PO?
    If not what print program or form that can be used to show the sales order number.
    Also I want to show the Customer PO number into the Purchase Order idoc VBKD-BSTKD and the PO date will be in VBKD-BSTDK.
    This is very urgent !  Will reward.
    Rgds,
    Pri

    Hi experts,
    I have the Customer Sales Order number in the PO item level under "account assignment" tab.
    But it does not show in the idoc xml ouput of the PO.
    Could you let me know if it is not standard field to display in the ORDERS05 idoc type of the PO?
    If not what print program or form that can be used to show the sales order number.
    Also I want to show the Customer PO number into the Purchase Order idoc VBKD-BSTKD and the PO date will be in VBKD-BSTDK.
    This is very urgent !  Will reward.
    Rgds,
    Pri

  • PORDCH01-change purchase order Idoc

    Hi all,
           I require some suggestion pertaining to PORDCH01-change purchase order Idoc. The vendor raises a claim purchase order in his system and eventually a return sale order is created at the central system and i am using a custom program to generate idoc's of type PORDCH01 and propagate it back to the vendor , while doing so I need to change the value of the field LFRET(Delivery Type for Returns to Vendors) , the Idoc doesnu2019t seem to have this field in any of its segments and even if i extend this idoc , i donu2019t have appropriate exits in the inbound function module which let me map this data field to  the required field EKPO- LFRET.I donu2019t want to go for a custom solution so Your help is much appreciated .
    Regards,
    Rethish..
    Edited by: Rethish Radhakrishnan on Sep 6, 2011 10:40 AM

    Hello Raja,
    Just a further question in that case
    Can I used Message type ORDRSP and basic type ORDERS05 on both the sides i.e. SD side and MM side?
    Any changes made in sales order should update the PO.
    As with the current situation i can not use PORDCH idoc on SD module side. Pls let me know.
    //Guru

  • MM Purchase Order IDOC NEU output type configuration

    Hi All,
    after creation of Purchase Order in ME21N in ECC 6.0 server, i want an IDOC for Purchase order to be created...........
    i saw there is a standard output type NEU and it has EDI and Distribution Model as medium..........
    when i went to ME21N and specified in message button output type of NEU, then the PO which i created had a NEU in messages but on opening  a new session and running ME21N and creating a second PO, then in this PO there is no output type for NEU....
    So i want to know in SPRO where is the exact location which specifies which output type will be triggered for IDOC creation on PO creation in ECC for message control...............
    plz help guys...........

    Hi,
    If it configured for EDI and Distribution Model , now check condition record in T.code:MN06{ if you are geeting for one PO, you should get for other PO also)
    Also check the following confi. details for Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select: 
    Purchasing Doc. Type,
    Purch. Organization,
    Vendor
    2. Access Sequences
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order{NEU}
    4. Message Determination Schemas
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data->Messages-> Purchase Order-> MN04-> Create ,,,use medium '6' 
    Now you create PO (ME21N) and save it and then release.
    Also check in NACE t.code for standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines and for the output type for default values, a communication strategy needs to be maintained in the Customizing that supports . You can find the definition of the communication strategy in the Customizing via the following path: (SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy).
    Regards,
    Biju K

  • Purchase order idoc issue

    Hi,
        I am facing a issue with an inbound purchase order change IDOC (message type: PORDCH).
    I am getting the following error: FM VENDOR_MASTER_DATA_SELECT_15 ; no partner functions found for vendor VENDOR_MASTER_DATA_SELECT_15 1.
    The vendors are configured such that they dont need a partner function. The suprising part is that the same message type idoc from the same vendor got succesfully posted a few days back and a few days after the issue was found, which means the error doesnt occur every time.
    Any input is highly appreciated.
    Thanks,
    Aparna.

    Hi Aparna,
    I want to make changes in an existing PO through an inbound idoc. I am using idoc type PORDCH01 and message type PORDCH, process code BAPI. But I am getting an error "Characteristic does not exist in operating concern".
    Can you please explain how u are using idoc type PORDCH01??
    Thanx in advance,
    Shaleen

  • Send Purchase Order IDOC to create Sales Order in other R3 system

    Hi everybody,
    I need to setup our R3 system so that when one user creates a Purchase Order in the R3, an ORDERS idoc is sent to another R3 system in order to create the related Sales Order (we have 2 R3 systems to support the business of 2 different companies
    - for simplicity, consider company A has a R3 X1 and company B has R3 X2 system).
    I've setup the EDI on both systems to communicate an ORDERS idoc between them.
    The problem is that when the X2 system receives the ORDERS Idoc from X1 system, it is processed with errors saying 'VKORG, VTWEG, SPART cannot be determined for client xpto'.
    Since our R3 X2 system also receive ORDERS idocs from other companies and are processed correctly, I've realized that the content of the IDOCs received on both situations is very different.
    In the EDI partner profile, I tried to use a different inbound process code but have no success.
    How can I setup this functionality for out R3 systems? Do I need to create a new inbound process code (and use a custom function module)? Is there any other more standard solutions?
    Thanks in advance,
    Manuel Dias

    Hi Manuel,
    Org Elements are not maintain for your customer in receiving system. Please maintain organizational data for customer ... using transaction code <b>VOE2</b>.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Purchase order IDoc PORDCH generation error

    Hi all,
    I have made all the settings in the partner profiles to trigger PORDCH IDoc when I create or change purchase order through output message type.
    But the error it gives in WE05 is the following:
    The segment E1EDK01 does not occur at the current level of the basic type PORDCR01 (extension ).
    This error can have several reasons:
    The segment E1EDK01 is assigned to a group whose header segment does not occur.
    The segment E1EDK01 does not exist in the syntax description of the basic type PORDCR01 (extension ).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Since the generated IDoc is of ORDERS05 structure this is giving an error.
    Can anybody help me out with this.

    Jwalith
    It seems, you are using wrong Process Code/Inbound Function Module .... Create new process code or modify your Z-Process Code to link it to function module IDOC_INPUT_PORDCH, which is valid for Message Type PORDCH.
    This should solve the problem.
    Thanks
    Amol Lohade

  • External Vendor number conversion - purchase order IDocs

    Hi,
    I am specifying requirements to create purchase orders via IDoc type PORDCR direct from an external SRM system. The vendor masters references in the source system are different to the ones in R/3 therefore conversion is required.
    Is there any std SAP table similar to EDPAR in sales, which can be used to convert external vendor codes in purchasing?
    So far I can only see that EDPAR is relevant for sales order processing, not purchase order processing. If there is no standard conversion table available for this function I assume the conversion must be done from within the integration tool?
    Many Thanks

    Thanks - however the EDPAR table will not accept a vendor or logical system to be entered into the 'customer' field. It does a check to ensure the record is in KNA1 therefore I wanted to see if anybody had used this table to convert vendor codes in purchasing
    do you know the names of these function modules?

  • Item Deletion in Purchase order(IDOC)

    Hi all,
    I need to generate idoc for deleting the line item in purchase order,im able to create and change,if i go for deletion,the change indicator in CDHDR table is showing U(change) only not D(delete).
    valuable inputs will be rewarded....

    Deletion functionality never work for WGSREQ since it has several design errors in source code of FM VWWS_STORD_DISPATCHER and VWWS_STORD_DELETE_DOCUMENT. I hope that SAP will do correction soon.

  • Partial Payments on Purchase Orders - IDOC Scenario

    Hi all,
    I have been asked to look into an integration scenario where a purchase order is set up in ECC 6.0 and payments are called off against this over the financial year.
    Payment files are generated in another system and the idea is that we pick up these files with PI and create payment documents in SAP that are associated with this purchase order.
    I have previously used FIDDCP2 to create payment/invoice documents in SAP - but these had no link or association with purchase orders.
    Anyone had this scenario before? Can I use FIDDCP2 to call off payments against a purchase order like this?
    Or are there other, better (easier?) ways to achieve this?
    Advice and thoughts welcome...
    Regards
    Ian

    Hi Ian,
    I guess that if you post this question in an R3/ECC (ABAP) forum you could get more help, because they should know more about Idoc types for different purposes.
    Regards, 
      Juan.

Maybe you are looking for

  • Error while creating a new DAC connection using connection type MSSQL

    Hi, I am trying to create a new DAC connection i.e. a new DAC repository in the SQL Server 2008 database. DAC version : 10.1.3.4.1 Database : SQL Server 2008 I have downloaded the sqljdbc4.jar file from the below link and placed it in the D:\orahome\

  • How do I attach my iSight camera to my Apple Cinema Display?

    I've just bought two iSight cameras, and found nothing in the accessory kit with them that would allow me to attach the camera to my Apple Cinema Display. This is because the back of the Cinema Display is beveled rather than flat, so the flat base of

  • Discoverer 10g, it returns no data

    Hi all, I have a doubt can any one clarifies. Currently I work migration projects from 4i to 10g discoverer reports (Upgraded 11i to R12). Previously in 4i discoverer reports many views used and data also populated. Same query in discoverer 10g, it r

  • Can you retrieve an Apple ID with just credit card and phone number details?

    My partner, a self-confessed technophobe, has had his iPhone for 18 months - it was set up by his mobile network provider (Orange UK) whose customer support has been worse than useless, keeping him on hold for around 2 hours so far and cutting him of

  • Parent-Child Join on tables in Database Adapter

    Hi, We are doing a join on two tables(T1 and T2) in Database adapter for an Insert operation. There is no Reference Integrity between these two tables in Database, but join is done through bpel database adapter. Here is a scenario - when we try to in