Creating a PO using OREDERS05 IDOC

Hi All,
I need to create a PO using the OREDRS05 Idoc, insted of that a standard SO is getting created as I am using ORDE process code. I dnt find any process code for creating a PO related to ORDERS05.
Is there any process code for creating a PO or we need to it any other way.
Please let me know how to reslove this. Its an urgent requirment needs to be resolved ASAP.
Thanks,
Srikanth

Hi,
Here is the sample code to do that...
*---> po header data
  wa_poheader-vendor    =  your vendor..
  wa_poheader-doc_type  =  Your doc type..check with Functional contact....
  wa_poheader-purch_org =  Purchasing Org..
  wa_poheader-pur_group =  Purchasing Group
*---> po header data (change toolbar)
  wa_poheaderx-vendor    =  'X'.
  wa_poheaderx-doc_type  =  'X'.
  wa_poheaderx-purch_org =  'X'.
  wa_poheaderx-pur_group =  'X'.
*---> poitem data
data: item like ekpo-ebelp.
item = '0010'.
loop at t_parts.
  it_poitem-po_item  =  '00010'.
  IT_POITEM-PLANT    =  Plant..
  IT_POITEM-STGE_LOC =  Sloc...
*---> poitemx (item data change toolbar)
  it_poitemx-po_item  =  '0010'.
  it_poitemx-po_itemx  =  'X'.
  IT_POITEMX-PLANT    =  'X'.
  IT_POITEMX-STGE_LOC =  'X'.
*---> add record's to internal table
  APPEND:  it_poitem,
         it_poitemx.
endloop.
*call bapi_po_create1
  CLEAR v_ebeln.
  CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
      poheader         = wa_poheader
      poheaderx        = wa_poheaderx
    IMPORTING
      exppurchaseorder = v_ebeln
    TABLES
      return           = it_return
      poitem           = it_poitem
      poitemx          = it_poitemx.
*---> check the return table for error message
  READ TABLE it_return WITH KEY type = 'E'.
  IF sy-subrc NE 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
  endif.
Thanks,
Murali

Similar Messages

  • How to create the material using outbound IDOC

    Hi all,
    how to create the material using outbound IDOC.

    Hi..
    follow the steps...
    1) create a partner profile for material
    2) create a material
    3) go to transaction BD10 , give material no  and then execute.
    4) go to transaction WE02 to chk the status.
    if you want to send Outbound idoc automatically once the material is cretaed then use change pointers concept.
    please get back  to me if you need any assisstance further.
    Regards,
    Lokeswari.

  • Problem in creating Invoice receipt using ALE-IDoc?

    Hi all,
    I implemented the auto creation of invoice receipt when billing document created using ALE-Idoc. It is working fine in PRD also.
    But today , there occurred a problem in this . The problem is  when the billing document is created the Invoice receipt is not creating directly , but a job is creating. But till yesterday it created the invoice receipt immediately as we required.
    So please help me on changing the creation of invoice receipt directly from current job creation? 
    No configuration has been changed ,  but my user tried to create the more than one billing document at a time.so i think  this is the reason for it. But now though he is creating only  one billing document , it is creating a job.
    Please reply ASAP.
    Thanks,
    Vamshi.

    Solved .

  • How to create inbound PO using EDI & IDOC???

    hi friends,
    I dont know abt IDOCs and EDI. Can any body give solution how to create po by using in bound process. plz give step by step. because I ever worked on EDI and IDOCs.

    Hi there,
    Please have a look at the following link.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
    Hope this helps,
    Kind Regards,
    Matthew

  • Creating Sales order using the IDocs.

    Hi All,
    I am looking to create a Sales Oredr from outside SAP syatem making use of the ALE-IDocs.
    What should be the structure of the data to be recived from legacy system and what should be the settings (ALE).
    Thanks In Advance....
    Abhi.....

    How to input the data file from non-SAP into SAP, from which the Idocs will be generated......  there is a FM for this purpose.

  • How to create Inbound Delivery using SHPMNT03 Idoc details...

    Hi,
         I need to create <b><b>Inbound delivery</b> using idoc SHPMNT03</b> details. I am getting all the data required to create Inbound delivery is from this idoc. for that I need to create a custom function module.
    I tried with FM  IDOC_INPUT_DESADV1. But it is for only if you use DELVRY03.
    I haven't (yet) found a way to create automatically an inbound delivery when you post the goods issue from the outbound delivery.
    Does anyone experienced the use of inbound deliveries with STO and what are your recommendation?
    Thanks a lot,
    Ranjith.

    Hi there,
    Please have a look at the following link.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
    Hope this helps,
    Kind Regards,
    Matthew

  • Create Sales order using ORDERS05 idoc

    Hi Experts,
      i need to create sales order from an external system using Idocs. we are using ORDERS05. We needs to save data in some custom fields. hence we have extended the idoc. But the Z* fields are not at the screen level. The function module 'IDOC_INPUT_ORDERS' uses call transaction and hence we are unable to save data in the Z fields.
    Please advice some alternate approach.
    We are looking into the possibility of using a custom function module and calling the create BAPI. Please advice is there is a better approach.
    Thanks & Regards,
    Amit

    The process code ORDE does not use BAPIs. It uses call transaction to VA01. This is the reason i am facing the problem. The custom fields which i have are not in the VA01 screen.
    The BAPi is called by IDOC_INPUT_SALESORDER_CREATEFR for message type SALESORDER_CREATEFROMDAT202. But i am not sure if this works.
    Regards,
    Amit

  • Creating Sales Order using inbound IDOC

    hi,
    Using test tool WE19 if i create sales order in foregound no error occurs and order is created successfully but if i try to create in backgound it gives error "No batch input data for screen SAPMSSY0 0120".
    please suggest a way out .

    I hope you do not have any popup windows during your order create, popups should be suppressed for batch-input.
    try to run it in foreground and check if there is any warning message which forces you to press Enter once more to bypass it.
    try to process it in "foreground after error" to see if it stops on any error/warning message.

  • Update STXH text while creating a PO using IDOC's  PORDCR103

    Hi,
    Can we upload the shipping instructions while creating a STO using Inbound IDOC -  PORDCR103
    Regards,
    Shariq.

    Hi,
    For uploading shipping text you need to call function module SAVE_TEXT.
    Thanks
    Ankit Attrish

  • Inbound delivery creation using shipment Idoc details

    Hi,
       My requirement is that I need to create inbound delivery using SHPMNT05 idoc sending from a different plant.
    Below are the fields I am getting from the SHPMNT05 Idoc. So I need to create  Inbound delivery in Receiving plant.
    SAP - Field     IDoc Segment- Position - Field Name
    LIKP-LFART     E1EDL21 – 001 – LFART
    LIKP-LIFEX     E1EDT01 – 001 – VBELN
    LIKP-LIFNR     E1EDT44 – 009 – LIFNR
    LIKP-MBDAT     E1EDL24 – 039 = ABRDT
    LIPS-LFIMG     E1EDL24 – 013 – LFIMG
    LIPS-MATNR     E1EDL24 – 002 – MATNR
    LIPS-VGPOS     E1EDL41 – 006 – POSEX
    LIPS-PSTYV     E1EDL26 – 001 – PSTYV
    LIPS-VGBEL     E1EDL41 – 002 – BSTNR
    LIPS-VRKME     E1EDL24 – 014 – VRKME
    VEKP-EXIDV     E1EDL37 – 001 – EXIDV
    VEKP-VHILM     E1EDL37 – 017 – VHILM
    VEPO-MATNR     E1EDL44 – 007 – MATNR
    VEPO-POSNR     E1EDL44 – 003 - POSNR
    VEPO-VBELN     E1EDL44 – 002 - VBELN
    VEPO-VELIN     E1EDL44 – 001 – VELIN
    VEPO-VEMEH     E1EDL44 – 006 – VEMEH
    VEPO-VEMNG     E1EDL44 – 005 – VEMNG
    Could you please help me to find some workaround to solve this ?
    Thanks in advance.
    Regards.
    Ranjith

    Hi Ranjith,
    I guess there is a BAPI " /SPE/INB_DELIVERY_REPLACE " which can be used to create an inbound delivery.
    Documentation-
    FU /SPE/INB_DELIVERY_REPLACE
    Short Text
    Create inbound delivery
    Functionality
    You can use this method to distribute inbound deliveries from an ERP system to a WM system.
    The following parameters are required:
    HEADER_DATA Inbound delivery header data
    SENDER_SYSTEM System of the sender
    HEADER_PARTNER Header data of the partners
    HEADER_DEADLINES Header data of the dates
    ITEM_DATA Item data of the inbound delivery
    ITEM_ORG Organisation data of the inbound delivery
    Notes
    The required parameters have the following required fields:
    Import parameter HEADER_DATA
    INB_DELVRY_NO
    DLV_TYPE
    Import parameter SENDER_SYSTEM
    SENDERSYSTEM
    Table parameter HEADER_PARTNER
    PARTN_ROLE = 'LF'   Vendor is required partner
    PARTNER_NO
    Table parameter HEADER_DEADLINES
    TIMETYPE = 'WSHDRLFDAT' Delivery date
    Table parameter ITEM_DATA
    INB_DELVRY_NO
    ITM_NUMBER
    MATERIAL
    DLV_QTY
    SALES_UNIT_ISO oder SALES_UNIT
    Table parameter ITEM_DATA_ORG
    PLANT
    Further information
    HEADER_PARTNER
    Since the partners in the delivery are not managed on an item basis, the ITM_NUMBER field in the BAPIDLVPARTNER segment is left blank and not analyzed.
    HANDLING_UNIT_ITEM
    If the BAPI is used as an external interface for an external system, the packing hierarchy should be described as usual by using external identification numbers for shipping materials (HDL_UNIT_EXID_INTO/HDL_UNIT_EXID).
    Parameters
    HEADER_DATA
    SENDER_SYSTEM
    TECHN_CONTROL
    HEADER_DATA_SPL
    HEADER_CONTROL_SPL
    HEADER_PARTNER
    HEADER_PARTNER_ADDR
    HEADER_DEADLINES
    ITEM_DATA
    ITEM_ORG
    ITEM_STOCK_TRANS
    ITEM_CODING_BLOCK
    ITEM_REF_PURCHASE_ORDER
    ITEM_SERIAL_NO
    ITEM_DATA_SPL
    TEXT_HEADER
    TEXT_LINES
    HANDLING_UNIT_HEADER
    HANDLING_UNIT_ITEM
    HANDLING_UNIT_SERNO
    HANDLING_UNIT_ITEM_SPL
    HANDLING_UNIT_HEADER_CROSS
    HANDLING_UNIT_IDENTIFIERS
    EXTENSION1
    EXTENSION2
    RETURN
    TOKENREFERENCE
    Exceptions
    Function Group
    /SPE/INB_DELIVERY
    Check if this helps.
    Reward helpful answers.
    Regards
    Parag

  • Creating a Purchase Order using ORDERS05 Idoc

    Hi Experts,
    I need to create a purchase order using ORDERS05 Idoc, with the data I am using a sales order is gettig created but I need to create a PO insted of SO.
    Please let me know what is difference between a PO and SO while using ORDERS05. Also please let me know what are all the fields that needs to chaged in the Idoc.
    Thanks,
    Suma

    Hi,
       I'm looking at a similar problem, can we use ORDERS05 IDOC basic type to create a Purchase Order?
       What is the inbound processing FM?  I tried IDOC_INPUT_ORDRSP, but it seem to only allow changes to a PO, and not creation of a PO.
       For IDOC_INPUT_ORDERS FM this one seem to only create Sales Orders?
       Which inbound FM should i be using?
    Regards.

  • Find status of a sales order created using EDI IDOC

    Hello everyone,
       I have IDOC created for incoming sales order using FM 'IDOC_INPUT_ORDERS'.
    When a sales order is created manually iva VA01, it prevents the order from being saved when a specific error is hit unless user resolved it first.   However, when the order is created via EDI IDOC, the error is hit and it cannot be created.  In the sapmv45a program, i will to say that if it is an EDI IDoc transacion for the order, let it bypass the error and create the order.  
         Can anyone pls tell me how to check the status of a sales order being created using EDI IDOC ?
    Sy-batch does not work.
    Thank you in advance.
    Joyce

    Joyce,
    If you pay attention the code in FM it is exporting value of da_edi_sign to memory id "SD_EDI_ACTIVE" stored in constant "da_memory_id". ('CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.)
    In your program you have two you have two options.
    1. Declare a constant as in the FM and use that as mentioned below:  
    CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.
    IMPORT v_memid FROM MEMORY ID da_memory_id.
    2. Hardcode memory id as below:
    IMPORT v_memid FROM MEMORY ID 'SD_EDI_ACTIVE'.
    Hope this resolves your problem.
    Gajendra

  • Create Material using MATMAS05 IDOC

    Hi Gurus,
    Please tell me what are the mandatory fields and tables for those fields to create a Material using MATMAS05 standard IDOC.

    Hi,
    Fields are  never mandatory while sending the idocs. Its the segment which is mandatory.
    If you see the definition of MATMAS05 idoc in transaction WE30 you will find E1MARAM  and E1MAKTM,  as a mandatory segment. It means that you can't send an Idoc without this segment. If you go in segment details than even if you populate a single field in the segment E1MARAM and E1MAKTM then you can send the idocs.
    KR Jaideep,

  • Output type not created for outbound delivery while using SHMNT05 idoc type

    Hi Experts,
    Please help me to solve the below issue.
    Problem:- I want to to generate an IDOC(using type SHPMNT06) once the PGI is done for an outbound delivery.
    Already it is working fine when used DESADV.DESADV01 or DESADV.DELVRY07. But now the output type is not getting created when used SHMNT.SHPMNT06. I have created a separate output type ZPJ7 just as a mirror copy of the earlier output type(ZPJ6) used for DESADV.DELVRY07.
    Question:- Is it possible to use idoc SHPMNT06 instead for DESADV01 or DELVRY07? If yes then what are steps to be followed?
    The reason why SHPMNT06 idoc is planned:- We have a scenario to send outbound delivery to 3rd party system via XI. If the outbound delivery is for National(Not for Export) and PGI is completed then send the idoc straight forward to XI otherwise DO NOT generate the idoc, but just create the delivery. Collect all the deliveries in a transport and send it in a shipment. The shipment details can be sent using SHPMNT idoc. Now from XI perspective, if we can utlitze the same SHPMNT idoc for the National delivery(1st case) then perhaps this will require less effort. Hence shipment idoc is required to be generated when the delivery is created and PGI is done.
    Also it would be great if you can advice some better way to solve above mentioned scenario.
    Many Thanks,
    Sanjay

    There could be several reasons. Go to the document and in the extras-output check output determination analysis in the processing log.
    If the output has been created successfully then you need to see your printer determination. Ask basis to check it up. If the problem is that even the print preview is not coming. Check your communication in the output analysis and ensure LOCL is selected. Any other printer will need to be configured.
    If thats done already then check whether you have maintianed the condition record.
    If that too is done then check whether your output type has been assigned to the output procedure and that the output type is listed in the procedure.
    regds
    Jude

  • Create new LSMW using Idoc for HR master Data

    Hi Guys,
    I was wondering id someone could help me. I have started developing an LSMW, of which I have already
    created the Object. I have also created the Maintain attributes and I have supplied the Message Type, Basic Type and activated the IDOC inbound processing after providing the appropriate information.
    The question I have is in the "Maintain source structure" do I need to create a structure for data records
    and a structure for header?
    Can I do a recording for transaction     -
    "PA30" --->  update infotype 6
                                                           |
    IDOC   -
    > infotype 0,1,2,6
    I have previously created HR LSMW using recording, but I have not used the IDOC facility and I'm not
    sure of the differences.
    Does anyone have any documentation.
    Regards,
    Frank

    Dear Frank,
    For Idoc method need to do setting first.
    Creating  pratner profile,.....................etc.
    then rest of the thing are same.
    Best Regards,
    Flavya

Maybe you are looking for