Create order production from IDOC

Hi!!! how create production order from IDOC INBOUND??... function... BAPI?? thanks...

Hi
welcome to SDN forum
check this BAPi
COXT_BAPI_ORDER_CREATE
Regards
Anji

Similar Messages

  • Create billing document from IDOC INVOIC01

    Hi Experts,
    I created a function module to extend IDOC_INPUT_INVOIC_MRM. After created successfully the invoice from this inbound idoc, I tried to create a billing document by code below:
    get sale order number from purchase order *****************************
        CALL FUNCTION 'BAPI_PO_GETDETAIL'
          EXPORTING
            PURCHASEORDER                    = lw_tfrseg-ebeln
            ACCOUNT_ASSIGNMENT               = 'X'
         TABLES
            PO_ITEM_ACCOUNT_ASSIGNMENT       = lt_acc_***
    ****get sale order details*******************************************************
         CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
          EXPORTING
            I_BAPI_VIEW                   = lw_order_view
          I_MEMORY_READ                 =
          TABLES
            SALES_DOCUMENTS               = lt_sales_key
            ORDER_HEADERS_OUT             = lt_ord_headers
            ORDER_ITEMS_OUT               = lt_ord_items
            ORDER_SCHEDULES_OUT           = lt_ord_schedules
            ORDER_BUSINESS_OUT            = lt_ord_business
            ORDER_PARTNERS_OUT            = lt_ord_partners
            ORDER_ADDRESS_OUT             = lt_ord_address
          ORDER_STATUSHEADERS_OUT       =
          ORDER_STATUSITEMS_OUT         =
            ORDER_CONDITIONS_OUT          = lt_ord_cond
    ****Fill billing data in*******************************************************
               lt_bill_data-SALESORG = lt_ord_headers-sales_org.
             lt_bill_data-DISTR_CHAN = lt_ord_headers-DISTR_CHAN.
             lt_bill_data-DIVISION   = lt_ord_headers-DIVISION.
             lt_bill_data-DOC_TYPE   = lt_ord_headers-DOC_TYPE.
             lt_bill_data-ORDBILLTYP    = lt_ord_headers-ORDBILLTYP.
             lt_bill_data-BILL_DATE    = lt_ord_business-bill_date.
             lt_bill_data-SOLD_TO    = lt_ord_headers-SOLD_TO.
             lt_bill_data-ITEM_CATEG    = lt_ord_items-ITEM_CATEG.
             lt_bill_data-ACCTASGNMT    = lt_ord_business-ACCNT_ASGN.
             lt_bill_data-PRICE_DATE    = lt_ord_business-PRICE_DATE.
             lt_bill_data-COUNTRY    = 'US'.
             lt_bill_data-PLANT    = lt_ord_items-PLANT.
             lt_bill_data-BILL_TO    = lw_partner_bp-customer.
             lt_bill_data-PAYER    = lw_partner_py-customer.
             lt_bill_data-SHIP_TO    = lw_partner_sh-customer.
            REF_DOC    = lt_sales_orders-DIVISION.
             lt_bill_data-MATERIAL    = lt_ord_items-material.
             lt_bill_data-REQ_QTY    = lt_ord_items-req_qty.
             lt_bill_data-CURRENCY    = lt_ord_items-currency.
             lt_bill_data-SHORT_TEXT    = lt_ord_items-short_text.
             lt_bill_data-TAXCL_1MAT    = lt_ord_items-TAX_CLASS1.
            REF_ITEM    = lt_sales_orders-DIVISION.
            STAT_GROUP    = lt_sales_orders-DIVISION.
             lt_bill_data-NO_MATMAST    = 'X'.
             lt_bill_data-ADDR_NO    = lt_ord_address-ADDRESS.
            lt_bill_data-TITLE    = lt_ord_address-DIVISION.
             lt_bill_data-NAME    = lt_ord_address-NAME  .
             lt_bill_data-NAME_2    = lt_ord_address-NAME_2.
             lt_bill_data-POSTL_CODE    = lt_ord_address-POSTL_CODE.
             lt_bill_data-CONSUMCTRY    = lt_ord_address-COUNTRY.
             lt_bill_data-CITY    = lt_ord_address-CITY.
             lt_bill_data-DISTRICT    = lt_ord_address-DISTRICT.
             lt_bill_data-STREET    = lt_ord_address-STREET.
             lt_bill_data-REGION    = lt_ord_address-REGION.
             lt_bill_data-PROD_HIER    = lt_ord_items-PROD_HIER.
             lt_bill_data-SALES_UNIT    = lt_ord_items-SALES_UNIT.
             lt_bill_data-PROFIT_CTR    = lt_ord_items-PROFIT_CTR.
            TAXJURCODE    = lt_sales_orders-DIVISION.
             lt_bill_data-PURCH_ORD    = lt_ord_headers-PURCH_NO.
             lt_bill_data-DOC_NUMBER    = lt_ord_items-DOC_NUMBER.
             lt_bill_data-ITM_NUMBER    = lt_ord_items-ITM_NUMBER.
            ORIGINDOC    = lt_sales_orders-DIVISION.
            lt_bill_data-ITEM    = lt_sales_orders-DIVISION.
             lt_bill_data-CREATED_BY   = sy-uname.
            MATERIAL_EXTERNAL = lt_sales_orders-DIVISION.
            MATERIAL_GUID = lt_sales_orders-DIVISION.
            MATERIAL_VERSION = lt_sales_orders-DIVISION.
             lt_bill_data-INCOTERMS1  = lt_ord_business-INCOTERMS1.
             lt_bill_data-INCOTERMS2  = lt_ord_business-INCOTERMS2.
             lt_bill_data-EXCHANGE_RATE = lt_ord_business-EXCHG_RATE.
             lt_bill_data-PAYMENT_TERMS  = lt_ord_business-PMNTTRMS.
             lt_bill_data-HG_LV_ITEM   = lt_ord_items-HG_LV_ITEM .
    ******call bapi function to create billing document********************
      CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
       EXPORTING
         CREATORDATAIN         = lw_creator
         TESTRUN               = lc_testrun
         POSTING               = lc_posting
        TABLES
          BILLINGDATAIN         = lt_bill_data
        CONDITIONDATAIN       =
        CCARDDATAIN           =
        TEXTDATAIN            =
          ERRORS                = lt_bill_errs
          RETURN                = lt_bill_retu
          SUCCESS               = lt_bill_succ
    A return message in the table lt_bill_retu:
    "This item is not relevant for billing!"
    Anyone can tell me why? I think this problem be generated from the step "fill billing data" but I don't know where.
    Pls help me!!!
    Thanks,
    Gy

    Hi,
    In the condition data, I want to add new condition type as below:
    <<  Add new condition type
        CLEAR: lt_cond_data.
        lt_cond_data-COND_TYPE = 'ZHD0'.
        lt_cond_data-COND_VALUE = mrm_ship_charge-summe.  " amount of shipping charge
        lt_cond_data-COND_CURR = mrm_ship_charge-waerq. " USD
        append lt_cond_data.
    *>>
    But I created successfully billing document, this condition type is not appear in the billing view by transaction VF03.
    Could you help me to find out the fault?
    Thanks,
    Gy

  • Find Sales order number from IDOC number

    I have a bunch of SO idocs, in status 64. They are then posted and Sales orders are created.
    How can I programatically find the Sales order Number from the Sales Order idoc number once it is in status 53 (other than going to EDIDS and checking if status = '53' and grabbing the 'STAPA2' field there ).

    Look at table EDIDS for sales order idocs and you can see SO number in any of STAPA1/2/3/4 variable for specific message id and message number.

  • Create outbound delivery from IDOC

    i want to create outboud delivery from incomming idoc..is DELVRY02 idoc type and shpcom message type will do this ..after crating the delivery i aslo need to do PGI..
    please tell me this idopc type and message type will do this or not?
    Thanks,

    Hi,
    I also have the same issue - I would like to be able to create an outbound delivery via IDOC/BAPI although cannot find the means to accomplish this.  Is there a standard process available to generate an outbound delivery without reference (VL01NO)?  I would like to avoid writing custom code if possible.
    Thanks!

  • Create Order Template from quotationin b2b application.

    hi,
    My requirement is,if i open any already created quotation then on that screen (orderstatusdetail.jsp)we  have to add one button with name "Create Order Template".after clicking that button new Order Template page should open with all items and heder data.
    i had written code for button but not able to understand onclick even what i have to write?
    thanks in advance.
    jayesh talreja.

    Hi Jayesh,
    Call documentstatusaddtobasketaction on click at this button.like below
    method="post" action='<isa:webappsURL name ="/b2b/documentstatusaddtobasket.do"/>'>
    But this button is already available on orderstatus page, if its not visible to you it means there is
    something wrong that is happening in either java or abap code.
    Regards,
    Arshi

  • Automatic Sales order creation from IDOC generated in another SAP instance?

    Hi,
    I have been trying to create Sales ordes in a seperate SAP instance, through the Purchase order generated in another Instance.
    The Purchase order generated, passes the informtion through an IDOC to another SAP instance, I am getting the following error
    " VKORG, VTWEG, SPART cannot be determined for customer 0000001000 ,Vendor000200038 "  
    It is Message No VG204 , Status Record 51
    Please help to solve the problem.
    Regards,
    Chamandeep

    SAP Xpert friends,
    I really need help in figuring out this error I get when I send an IDoc from external system to SAP.
    Here is what I do....
    create empty idoc of type ORDERS01
    idoc.MESTYP = "ORDERS";
    idoc.SNDPRN = "1171";
    idoc.SNDPRT = "KU";
    idoc.MANDT = "400";
    idoc.SNDPFC = "AG";
    idoc.MESCOD = " ";
    idoc.MESFCT = " ";
    idoc.TEST = " ";
    create segment of type E1EDK01
    add field MENGE with a value
    add segment e1edp01  to idoc
    create segment of type E1EDP19
    add field QUALF with a value to segment
    add field IDTNR  with a value to segment
    add segment E1EDP19 to idoc
    send idoc
    When I check WE02 in SAP, I can see the idoc, but
    get this error
    Here are all the STATUS RECORDS
    <b>50  IDoc added
    64  IDoc ready to be transferred to application
    62  IDoc passed to application
    51  Error: Application document not posted
        <i>VKORG, VTWEG, SPART cannot be determined</i>
        for customer 0000001171 , vendor</b>
    I checked on Internet and found that VOE2 can be used to setup ... this is what I have in VOE2
    Customer    Vendor  SOrg     DChl   Dv
    1171        0000001171       1000   00
    Thanks for help...

  • Sales Order Creation from IDOC type ORDERS05

    Hi experts,
       I have tried to create sales order using IDOC, using FM input IDOC_INPUT_ORDERS. But when I include segment E1EDP05 - IDOC: Document Item Conditions. I got the following errors "Conditions in IDoc E1EDP05 transferred: Check data", with status 51, and application is post.
       Fields I filled in the segment:
    KSCHL
    KRATE
    UPRBS
    MEAUN
      Thanks.

    SAP Xpert friends,
    I really need help in figuring out this error I get when I send an IDoc from external system to SAP.
    Here is what I do....
    create empty idoc of type ORDERS01
    idoc.MESTYP = "ORDERS";
    idoc.SNDPRN = "1171";
    idoc.SNDPRT = "KU";
    idoc.MANDT = "400";
    idoc.SNDPFC = "AG";
    idoc.MESCOD = " ";
    idoc.MESFCT = " ";
    idoc.TEST = " ";
    create segment of type E1EDK01
    add field MENGE with a value
    add segment e1edp01  to idoc
    create segment of type E1EDP19
    add field QUALF with a value to segment
    add field IDTNR  with a value to segment
    add segment E1EDP19 to idoc
    send idoc
    When I check WE02 in SAP, I can see the idoc, but
    get this error
    Here are all the STATUS RECORDS
    <b>50  IDoc added
    64  IDoc ready to be transferred to application
    62  IDoc passed to application
    51  Error: Application document not posted
        <i>VKORG, VTWEG, SPART cannot be determined</i>
        for customer 0000001171 , vendor</b>
    I checked on Internet and found that VOE2 can be used to setup ... this is what I have in VOE2
    Customer    Vendor  SOrg     DChl   Dv
    1171        0000001171       1000   00
    Thanks for help...

  • Best practice to create order extract from CRM to Business Objects

    Is there a "best practice" to extract orders created/changed on a daily basis to Business Objects.  We have considered trying to use the standard CRM BI extractors, but we are not sure this is possible without actually running a SAP BI system.  Is there a way to extract data already captured in the BDOCs. 
    Any assistance would be appreciated.

    Is there a "best practice" to extract orders created/changed on a daily basis to Business Objects.  We have considered trying to use the standard CRM BI extractors, but we are not sure this is possible without actually running a SAP BI system.  Is there a way to extract data already captured in the BDOCs. 
    Any assistance would be appreciated.

  • Help to Create a Generic Material from Idoc

    Hi everyone, We have a problem to create a variant from Idoc, our problem is which segments to fill and how to do this?, For create an individual material is ok, we create a material from Idoc Artmas3 without any problem, but when we want to create a variant we had the following error
    Message MH197
    "No value assignment transferred for the variant-creating characteristic..."
    Someone of you had created generic materrials? How do you fill the segments? Which Idoc do you use?,please help us
    Regards

    Hi,
    Initially create a view or identify the table to create generic extractions, remaining process is same in all data bases such as CRM........
    GENERIC EXTARCTIONS:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/generic%2bextraction
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Generic Delta:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Assign points if these are useful.
    Rgs,
    I.R.K

  • IDOC/BAPI for Production order creation from Legacy system

    Hi all
    We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
    thanks a bunch

    Hi John,
    For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
    If there is an inbound IDoc available, I would recommend to use an IDoc.
    IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
    BAPI is also good approach to use and fast in term of  processing.
    For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
    Hope this will help.
    Regards,
    Ferry Lianto

  • IDOC - create SD Contract from a Purchase Order

    Hi,
    I need to know if exist an IDOCs to create a SD Contract from a Purchase Order and another IDOC to change a Purchase Order from a SD Contract.
    Regards,

    Hi again,
    1. PO will create ORDERS IDOC this is SAP Standard.
    2. ORDERS IDOC will be send
    3. IDOC Segment E1EDK14 qualifier 12 contains the order type. A contract is also a type of sales order. So we need to get the correct order type in the segment. One option is using the userexit proposed earlier another and even easier is asking the XI colleagues to do the change already in XI.
    4. During Inbound processing the contract will now be created.
    http://help.sap.com/saphelp_erp2004/helpdata/en/cf/ab3827940311d295e600a0c9306667/frameset.htm
    You will send a ORDRSP from your Contract (I made a mistake earlier and said ORDCHG this would be the update of the contract from the PO...)
    I think you will need to worry to much of the ORDRSP on the SD side as in fact the IDOC does not care if it is send from order or from a contract.
    Depending on your configuration in MM it will update the PO.
    http://help.sap.com/saphelp_erp2004/helpdata/en/1c/deffb0844f11d2b471006094b9476a/frameset.htm
    Bascally in regards to quantity you will need to do more on the MM side because usually it is not expected that the Vendor is chnaging quantities etc... So it is still possible:
    http://help.sap.com/saphelp_erp2004/helpdata/en/1c/deffb0844f11d2b471006094b9476a/frameset.htm
    By the way we are having the scenario with the contract in our SAP sending ORDRSP and ORDCHG for contracts and it is working fine.
    Hope it helps.

  • Mapping datas from idoc while creating a sales order.

    Hi Friends,
    From the idoc i want to fill the field 'YOUR REFERNCE' in the tag ORDER DATA at header level while creating a sales order. From which segment i can find the datas for that field.
    Your answers will be valuable.
    Thanks,
    Bestin
    Edited by: Be$t!N on Aug 26, 2009 4:41 PM

    Hi,
    You can find the Your Reference field in the segment E1EDKA1 and the field name is IHREZ.  This Your reference field is at the Partner level. This is a standard field.
    If you can let me know at which place you want this field to be populated then we can find another suitable field in the IDOC.
    Thanks,
    Mahesh.

  • Error while creating a production order from a sales order

    Hi
       Even though the product has BOM when i try to create order with a sales order reference it is showing a warning message " NO BOM FOUND" . How to correct this error .
    regards,
    PradeepM.

    Dear ,
    Goto -CS02-Enter FG -Goto Header -Staus Long Text -Check wether BOM status is set to 1 -Active .
    Check the usage of the BOM -Should  be 1-Production .
    Check wether BOM is locked and Deltion Flag set -Header Status Long txt tab
    Check the valididty of the BOM and Sales Order Schedule delivery date
    Try and come back
    Regards
    JH
    Edited by: Jiaul Haque on Jul 6, 2010 9:03 AM
    Edited by: Jiaul Haque on Jul 6, 2010 9:04 AM
    Edited by: Jiaul Haque on Jul 6, 2010 9:04 AM

  • Create a production order with variant configurator data

    Hello,
    Can anyone tell me the way to create a production order with variant configurator data. Is there a BAPI ? an IDOC ?
    Is there several steps ?
    I have to create an interface which creates automatically PP orders. The data input is a file.
    Thanks for your help

    Hi,
    There are fews BAPI's available for creation of Production Order. They are:
    BAPI_PRODORD_CREATE
    This bapi will suit to your requirement, as input will be provided from file.
    Others are
    BAPI_PRODORD_CREATE_FROM_PLORD " this converts planned order to production order
    BAPI_PRODORD_CREATE_FROM_REF      " this creats production order considering other production order as reference.
    Hope your query is answered.
    Regards,
    Brajvir

  • Inputs requried to create purchase order report from flat file

    inputs requried to create purchase order report from flat file

    At a guess, I'd say purchase order data.
    If you don't give us a clue what you are actually trying to do we can't really help you too much.
    Do you want to call a BAPI?  Do a BDC?  Use an IDOC?  Or just generally muck up the system by doing inserts into the purchasing tables?
    No doubt if you tell us, you'll get lots and lots of suggestions.
    Gareth.

Maybe you are looking for

  • Unable to read file from application server

    Hi guys, I am reading file(could be any extension) from application server,but some time i am successfuly able to read file and sometime unable to read,why its happening . my code is here OPEN DATASET E_FILE FOR INPUT IN  BINARY MODE . "   IF SY-SUBR

  • Multiple condition checking question

    Hi I have a newbie question - if ((temp == null) && (!temp.text.equals(""))) { statement; If temp really is null, would this give a compiler error? or would it simply break after the first condition? Thanks, Mike

  • Using a symbol in an operation

    Hello, Here is my problem: I have to do this operation for example: 2 * 3 I have: int a=2; int b=3; char c= *; What is the command to make 2*3 with a,b,c in Java 5.0? Thank you very much!!

  • Cannot Install iTunes 9 in Windows XP Pro 64-bit

    Okay, here's the situation: I was an early adopter of Vista, in its 32-bit form. Ran fine, lasted a long time. Needed more memory, so installed Vista 64-bit a few months back as part of an upgrade to a larger boot disc. Initially, the version (whatev

  • Remote Control Doesn't Work in Win-7 !!!

    After upgrade operating system to win-7 Remote Control Stop Working !! and the ENE CIR Already installed ... but it's still Don't Work My Remote Details : RC1762302/00 3139 228 50021 Hp SPS :435743-001 HP:HSTNN-PRO7 RC6 IR cp04 30801 j 064454 REVB an