Creating Sales order With Respect To Purchase Order

Hi Friends,
     Requirement is that in source system for exp Company A
creating Purchase order now with respect to this purchase order...
In Target System.for Exp Company B Sales Order Should be created.................
For this in Source system........i m using message type orders
when i m creating Purchase Order Idoc Successfully send to reciever......but in reciever idoc coming with error(sales organization,dist channel not found for customer 1000).......
sales order not getting created automatically..............
and customer 1000 is automatically coming i dont know how....?
pls tell me what is the necessary configuration required for vendor,customer.....in source and destination side.....?

DIDC   1500000000000032795700 03        1A000000001KUS004
      E1EDK01                         INR   1.00000                                                               ZPOR0000600764
      E1EDK14                     0141000
      E1EDK14                     01410
      E1EDK14                     00900
      E1EDK14                     013ZPOR
      E1EDK14                     0111000
      E1EDK03                     01220080122
      E1EDK03                     01120080122
      E1EDKA1                     AG S004
      E1EDKA1                     LF 0006000023
      E1EDKA1                     WE                  D001             Food Park - Kalamboli
      E1EDK02                     0010000600764                               20080122190024
      E1EDP01                     00010 0010 50.000         EA 50.000         EA        5              1         250
          E1EDP20                     50.000         0.000          20080126
          E1EDP19                     001000000000006000006                 ,hjurv Godrej Eazy wash1(curt change)
          E1EDP19                     0031234567891012
      E1EDS01                     002250               INR
this is my segment detail i u told i hv created see bold char

Similar Messages

  • Create Sales order with reference to purchase order - Help needed

    Hi Gurus
    Purchase order is being created in Oracle system. SAP system will receive the purchase order and creates the sales order for the corresponding purchase order.
    Hoe to create sales order, Through BAPI or through IDOC. Please suggest and give some pointers of existing interface
    Thanks
    Andy.

    Hi,
        If you are working on ECC6.0 check for the BAPI BAPI_SALESORDER_CREATEFROMDAT1 .You can also pass the purchase order number .
    Check the sample code
    REPORT z_bapi_salesorder_create.
    Parameters
    Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    *Purchase order number
    header-PURCH_NO_C =  '4000006'.
    headerx-PURCH_NO_C = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    Reward points if it worked.
    Regards,
    Abhishek
    Edited by: Abhishek Raj on May 14, 2008 9:57 AM

  • Central Sales Tax Amount with respect to Purchase Orders

    Is there any way to get Central Sales Tax amount with respect to Purchase Order Numbers. I need this for report.
    Pls get me table numbers from which i can extract

    Hi,
    Refer report J1I2 - Sales Tax Register
    Here in the selection screen, enter Tax code, CST Condition type, etc...
    Also refer report S_ALR_87012357 - Advance Return for Tax on Sales/Purchases

  • How create sales order with respect to an idoc?

    hi ,
          does any one know how to create a sales order using an idoc number ?
    thanks
    mmn

    Hi refer below Reward if helps
    XI IDOC ORDERS04 create sales order update VBKD_BSARK
    For creating sales documents (sales order) through IDOCS you will have to use the T code WE19.  In that click basic type and enter order05(IDOC type) and select via message type then enter ORDERS(message type), click execute.
    You will get to see many fields.here you have to enter the datas that you enter in the VA01 screen in order to create sales order. The datas such as material name, date, qty, P.O no etc.  After entering all the datas, you click standard inbound the IDOC would be created by the system.You can see the created order by going in to VA03 screen.
    Next time when you create the IDOC, in same tcode WE19 screen, click existing IDOC and enter the IDOC which you created in the above step and just change the P.O no.Sytem will create new sales order through new IDOC
    Before doing all you need to maintain the partner profile in T code WE20.  For this Discuss with EDI consultant.

  • Create Sales order from Internal Purchase Order using IDOC

    Hello Friends,
    I have requirement to create Sales Order from Internal Purchase Order Using IDOC.
    Backgorund, we have already configured IDOC orders05 to create Sales Order from external Purchase order from Inbound IDOC, and it is working fine.
    Now we have new requirement to create Sales Order from our own Purchase order, i.e. When PO is created in one plant corresponidng sales order automatically must needs to create in another Plant with respect PO.
    I m trying to design a solution for above problem as follows,
    1.create an Inbound Idoc from PO, by creatiing one new message type on PO save.
    2.Process that Inbound  IDOC same as it is from external PO.
    3.Once processed Sales order will create.
    Please help me in step 1. to create Inbound IDOC from PO.
    If you want any further clarification please write me.
    Thanks,
    Mahesh

    I had done a similar scenario before and we achieved it through SAP XI. The problem is with the control record. When we create a ORDERS IDOC from a PO the control record will be for outbound transmission. We sent the file to XI and XI resent it back with some data parsing and a new inbound control record. This way it went neat outbound and inbound.
    I'm not sure what kind of architecture you have. If you have to do it within your ECC/R/3, then you could create the outbound IDOC to a new port and write a fresh RFC to pick it up from the same folder and create a new control record for inbound processing.
    I haven't tried this; but there is a "processing w. trigger (inbound)" option on the outbound process code. May be you can explore into that a bit more.
    I'm sure there could be better approaches to handle this within ECC so if you stumble on any, do write back. I would like to know to update my knowledge .

  • Create sales order with reference to service order

    Hi
    I need to create sales order based on the service order . Is there any BAPI function module available for this ?
    Please help...
    Regards
    Sujith

    ** プログラムID       : ZBAPI_SALESORDER_CREATE               *
    ** プログラム名称         : Upload Sales Order Creation                   *
    ** 処理概要           :                                       *
    ** 作成者           : Karthik.P                             *
    ** 作成日           : 2006/08/10                            *
    REPORT  ZBAPI_SALESORDER_CREATE LINE-SIZE 132 MESSAGE-ID ZMMBAPI .
           Internal table definition                                     *
    ****<<<<<Communication Fields: Sales and Distribution Document Header>>>>>>>>
    DATA: GT_ORDER_HEADER_IN LIKE BAPISDHD1,
    *******<<<Checkbox Fields for Sales and Distribution Document Header>>>>>>>>>
          GT_ORDER_HEADER_INX  LIKE    BAPISDHD1X,
    *****<<<<<Return Parameter>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
          GT_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,  " Return Messages
    *********<<<Communication Fields: Sales and Distribution Document Item<>>>>>
          GT_ORDER_ITEMS_IN LIKE BAPISDITM OCCURS 0 WITH HEADER LINE, " Item Data
    *********<<<Communication Fields: Sales and Distribution Document Item>>>>>>>
          GT_ORDER_ITEMS_INX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE, "Item Data Checkbox
    *********<<<Communication Fields: Sales and Distribution Document Item>>>>>>>
          GT_SALESDOCUMENT LIKE BAPIVBELN-VBELN , "Number of Generated Document
    *********<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
          GT_ORDER_PARTNERS  LIKE BAPIPARNR OCCURS 0 WITH HEADER LINE, "Document Partner
    ********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
          GT_ORDER_SCHEDULES_IN LIKE BAPISCHDL OCCURS 0 WITH HEADER LINE, "Schedule Line Data
    ****<<<<<<<<Checkbox List for Maintaining Sales Document Schedule Line>>>>>>>>
          GT_ORDER_SCHEDULES_INX LIKE BAPISCHDLX OCCURS 0 WITH HEADER LINE, " Checkbox Schedule Line Data
    *******Communication Fields for Maintaining Conditions in the Order
          GT_ORDER_CONDITIONS_IN  LIKE BAPICOND OCCURS 0 WITH HEADER LINE,
    ******Communication Fields for Maintaining Conditions in the Order
          GT_ORDER_CONDITIONS_INX LIKE BAPICONDX OCCURS 0 WITH HEADER LINE.
           Data definition                                               *
    DATA:  BEGIN OF GT_FT_SALES OCCURS 0,
           DOC_TYPE(4)  ,        "Sales Document Type
           SALES_ORG(4) ,        "Sales Organization
           DISTR_CHAN(2)  ,      "Distribution Channel
           DIVISION(2)   ,       "DIVISION(2)
           SALES_DIST(6)  ,      "Sales district
           INCOTERMS1(3)  ,      "Incoterms (part 1)
           INCOTERMS2(28)  ,     "Incoterms (part 2)
           PMNTTRMS(4)  ,        "Terms of payment key
           PRICE_DATE(8) ,       "Date for pricing and exchange rate
           PURCH_NO_C(35)  ,     "Customer purchase order number
           PURCH_NO_S(35)  ,     "Ship-to Party's Purchase Order Number
           EXCHG_RATE(8)  ,      "Directly quoted exchange rate for pricing and statistics
           CURRENCY(5) ,         "SD document currency
           MATERIAL(18),         "MATERIAL
           TARGET_QTY(13)  ,     "Target quantity in sales units
           ITEM_CATEG(4)  ,      "Sales document item category
           MATL_GROUP(8)  ,      "Material Group
           PURCH_NO_C1(35),      "Customer purchase order number
           SALES_DIST1(6)  ,     "Sales district
           INCOTERMS11(3)  ,     "Incoterms (part 1)
           INCOTERMS21(28),     "Incoterms (part 2)
           PMNTTRMS1(4)  ,     "Terms of payment key
           EXCHG_RATE1(8) ,    "Directly quoted exchange rate for pricing and statistics
           PRICE_DATE1(8) ,    "Date for pricing and exchange rate
           TRG_QTY_NO(5)    , "Factor for converting sales units to base units (target qty)
           DIVISION1(2)     ,                                   "DIVISION1
           SALQTYNUM(5)     , "Numerator (factor) for conversion of sales quantity into SKU
           GROSS_WGHT(3)    , "Gross Weight of the Item
           NET_WEIGHT(15)    , "Net Weight of the Item
           UNTOF_WGHT(3)    ,"Weight Unit
           PARTN_ROLE(2)   ,"Partner function
           PARTN_NUMB(10)   ,"Customer Number 1
    ********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
           ITM_NUMBER(6) ,"Item number of the SD document
           REQ_QTY(8)  , "Schedule line date
           DLV_DATE(8)  , "Schedule line date
           MS_DATE(8)  , "Material availability date
           LOAD_DATE(8) , "Loading time (local time with reference to a shipping point)
           GI_DATE(8), "Time of goods issue (local DATE, with reference to a plant)
           TP_DATE(8)  , "Transportation planning -time (local w/ref. to shipping pnt)
           ITM_NUMBER2(6) , "Condition item number
    END OF GT_FT_SALES,
           MSG(240) TYPE  C,  " Return Message
           E_REC(8) TYPE C,    " Error Records Counter
           REC_NO(8) TYPE C, " Records Number Indicator
           S_REC(8) TYPE C,   " Successful Records Counter
           T_REC(8) TYPE C.   " Total Records Counter
    selection block for EXCEL UPLOAD FILE>>>>>>>>>>>>>>>>>>>>>>>>
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
      PARAMETERS FILE TYPE  IBIPPARMS-PATH OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    *<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .>>>>>>>>>>>>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = FILE.
    **<<<<<<<<<<<<<<<<<START-OF-SELECTION.>>>>>>>>>>>>>>>>>>>>>>>>>>>
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'                                 "#EC *
        EXPORTING
          FILENAME                = FILE
          FILETYPE                = 'DAT'
        TABLES
          DATA_TAB                = GT_FT_SALES
        EXCEPTIONS
          CONVERSION_ERROR        = 1
          FILE_OPEN_ERROR         = 2
          FILE_READ_ERROR         = 3
          INVALID_TYPE            = 4
          NO_BATCH                = 5
          UNKNOWN_ERROR           = 6
          INVALID_TABLE_WIDTH     = 7
          GUI_REFUSE_FILETRANSFER = 8
          CUSTOMER_ERROR          = 9
          NO_AUTHORITY            = 10
          OTHERS                  = 11.
      IF  SY-SUBRC <> 0  .
        MESSAGE E000.
      ENDIF.
      SKIP 3.
      FORMAT COLOR COL_HEADING INVERSE ON.
        WRITE 40 TEXT-001.
      FORMAT COLOR COL_HEADING INVERSE OFF.
      SKIP 1.
      FORMAT COLOR COL_NEGATIVE INVERSE ON.
        WRITE :/ TEXT-002, 13 SY-MANDT , 104 TEXT-003, 111 SY-UNAME,
                  / TEXT-004, 13 SY-DATUM , 104 TEXT-005, 111 SY-UZEIT.
      FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      SKIP 3.
      LOOP AT GT_FT_SALES.
          PERFORM SLALE_UPLOAD_DATA.
      ENDLOOP.
      T_REC = E_REC + S_REC.
      SKIP 3.
      FORMAT COLOR COL_TOTAL INVERSE ON.
        WRITE: /38 TEXT-007, T_REC.
      FORMAT COLOR COL_TOTAL INVERSE OFF.
      FORMAT COLOR COL_NEGATIVE INVERSE ON.
        WRITE: /38 TEXT-008, E_REC.
      FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      FORMAT COLOR COL_TOTAL INVERSE ON.
        WRITE: /38 TEXT-009, S_REC.
      FORMAT COLOR COL_TOTAL INVERSE OFF.
    *&      Form  SLALE_UPLOAD_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM SLALE_UPLOAD_DATA .
    *******<<<<<<<<<<Communication Fields: Sales and Distribution Document Header>>>>>>
        GT_ORDER_HEADER_IN-DOC_TYPE =    'TA'.
        GT_ORDER_HEADER_IN-SALES_ORG =  GT_FT_SALES-SALES_ORG . "'0001'
        GT_ORDER_HEADER_IN-DISTR_CHAN = GT_FT_SALES-DISTR_CHAN. "'01'
        GT_ORDER_HEADER_IN-DIVISION  =   GT_FT_SALES-DIVISION.  " '01'
        GT_ORDER_HEADER_IN-SALES_DIST = GT_FT_SALES-SALES_DIST ."'000001'
        GT_ORDER_HEADER_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1.  "'CFR'
        GT_ORDER_HEADER_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'
        GT_ORDER_HEADER_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS .    "'0001'
        GT_ORDER_HEADER_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE ."'20060818'
        GT_ORDER_HEADER_IN-PURCH_NO_C =  '32'.
        GT_ORDER_HEADER_IN-PURCH_NO_S =   '32'.
        GT_ORDER_HEADER_IN-EXCHG_RATE =  GT_FT_SALES-EXCHG_RATE ."'1.00000'
        GT_ORDER_HEADER_IN-CURRENCY = GT_FT_SALES-CURRENCY . " 'EUR'
    ********<<<Checkbox Fields for Sales and Distribution Document Header>>>>>>>>>
        GT_ORDER_HEADER_INX-DOC_TYPE   = 'X'.
        GT_ORDER_HEADER_INX-SALES_ORG  = 'X'.
        GT_ORDER_HEADER_INX-DISTR_CHAN = 'X'.
        GT_ORDER_HEADER_INX-DIVISION   = 'X'.
        GT_ORDER_HEADER_INX-SALES_DIST = 'X'.
        GT_ORDER_HEADER_INX-INCOTERMS1 = 'X'.
        GT_ORDER_HEADER_INX-INCOTERMS2 = 'X'.
        GT_ORDER_HEADER_INX-PMNTTRMS =   'X'.
        GT_ORDER_HEADER_INX-PRICE_DATE = 'X'.
        GT_ORDER_HEADER_INX-PURCH_NO_C = 'X'.
        GT_ORDER_HEADER_INX-PURCH_NO_S = 'X'.
        GT_ORDER_HEADER_INX-EXCHG_RATE =  'X'.
        GT_ORDER_HEADER_INX-CURRENCY = 'X'.
    *****<<<<<<Communication Fields: Sales and Distribution Document Item>>>
        GT_ORDER_ITEMS_IN-ITM_NUMBER = '000010'.
        GT_ORDER_ITEMS_IN-MATERIAL  =  GT_FT_SALES-MATERIAL .
        GT_ORDER_ITEMS_IN-PO_ITM_NO = '32'.
        GT_ORDER_ITEMS_IN-CUST_MAT22 = 'AGNI-IV'.
        GT_ORDER_ITEMS_IN-BILL_DATE = '20060808'.
        GT_ORDER_ITEMS_IN-PLANT = '0001'.
    *GT_ORDER_ITEMS_IN-STORE_LOC = '0001'.
        GT_ORDER_ITEMS_IN-TARGET_QTY = GT_FT_SALES-TARGET_QTY . "'1000'
        GT_ORDER_ITEMS_IN-ITEM_CATEG = GT_FT_SALES-ITEM_CATEG . "'TAN'
        GT_ORDER_ITEMS_IN-MATL_GROUP = GT_FT_SALES-MATL_GROUP . "'01'
        GT_ORDER_ITEMS_IN-PURCH_NO_C = GT_FT_SALES-PURCH_NO_C . "'32'
        GT_ORDER_ITEMS_IN-SALES_DIST = GT_FT_SALES-SALES_DIST . "'000001'
        GT_ORDER_ITEMS_IN-INCOTERMS1 = GT_FT_SALES-INCOTERMS1 . "'CFR'
        GT_ORDER_ITEMS_IN-INCOTERMS2 = GT_FT_SALES-INCOTERMS2 . "'HAMBURG'
        GT_ORDER_ITEMS_IN-PMNTTRMS = GT_FT_SALES-PMNTTRMS  .    "'0001'.
        GT_ORDER_ITEMS_IN-EXCHG_RATE = GT_FT_SALES-EXCHG_RATE . "'1.00000'
        GT_ORDER_ITEMS_IN-PRICE_DATE = GT_FT_SALES-PRICE_DATE . "'20060808'
    *GT_ORDER_ITEMS_IN-SALES_UNIT = 'DZ'.
        GT_ORDER_ITEMS_IN-TRG_QTY_NO = GT_FT_SALES-TRG_QTY_NO . "'23'
        GT_ORDER_ITEMS_IN-DIVISION = GT_FT_SALES-DIVISION   .   "'01'
        GT_ORDER_ITEMS_IN-SALQTYNUM = GT_FT_SALES-SALQTYNUM .   "'32'
        GT_ORDER_ITEMS_IN-GROSS_WGHT = GT_FT_SALES-GROSS_WGHT.  " ' 25272000'
        GT_ORDER_ITEMS_IN-NET_WEIGHT = GT_FT_SALES-NET_WEIGHT.  "'24464000'
        GT_ORDER_ITEMS_IN-UNTOF_WGHT = GT_FT_SALES-UNTOF_WGHT . " 'KG'
    *GT_ORDER_ITEMS_IN-CURRENCY = 'EUR'.
        APPEND  GT_ORDER_ITEMS_IN.
    ****<<<<<<Communication Fields: Sales and Distribution Document Item>>>
        GT_ORDER_ITEMS_INX-ITM_NUMBER = '000010'.
        GT_ORDER_ITEMS_INX-MATERIAL = 'X'.
    *GT_ORDER_ITEMS_INX-PO_ITM_NO = 'X'.
        GT_ORDER_ITEMS_INX-CUST_MAT22 = 'X'.
        GT_ORDER_ITEMS_INX-BILL_DATE = 'X'.
        GT_ORDER_ITEMS_INX-PLANT = 'X'.
    *GT_ORDER_ITEMS_INX-STORE_LOC = 'X'.
        GT_ORDER_ITEMS_INX-TARGET_QTY = 'X'.
        GT_ORDER_ITEMS_INX-ITEM_CATEG = 'X'.
        GT_ORDER_ITEMS_INX-MATL_GROUP = 'X'.
        GT_ORDER_ITEMS_INX-PURCH_NO_C = 'X'.
        GT_ORDER_ITEMS_INX-SALES_DIST = 'X'.
        GT_ORDER_ITEMS_INX-INCOTERMS1 = 'X'.
        GT_ORDER_ITEMS_INX-INCOTERMS2 = 'X'.
        GT_ORDER_ITEMS_INX-PMNTTRMS = 'X'.
        GT_ORDER_ITEMS_INX-EXCHG_RATE = 'X'.
        GT_ORDER_ITEMS_INX-PRICE_DATE = 'X'.
    *GT_ORDER_ITEMS_INX-SALES_UNIT = 'X'.
        GT_ORDER_ITEMS_INX-TRG_QTY_NO = 'X'.
        GT_ORDER_ITEMS_INX-DIVISION = 'X'.
        GT_ORDER_ITEMS_INX-SALQTYNUM = 'X'.
        GT_ORDER_ITEMS_INX-GROSS_WGHT =  'X'.
        GT_ORDER_ITEMS_INX-NET_WEIGHT = 'X'.
        GT_ORDER_ITEMS_INX-UNTOF_WGHT = 'X'.
    *GT_ORDER_ITEMS_IN-CURRENCY = 'x'.
        APPEND  GT_ORDER_ITEMS_INX.
    *****<<<<<<Communications Fields: SD Document Partner: WWW
        GT_ORDER_PARTNERS-PARTN_ROLE =   'WE'.
        GT_ORDER_PARTNERS-PARTN_NUMB =  '0000000057'.
    ***GT_ORDER_PARTNERS-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER . " '000010'.
        APPEND  GT_ORDER_PARTNERS.
    *********<<<<Communications Fields: SD Document Partner: WWW>>>>>>>>>>>>>>>>>>
        GT_ORDER_SCHEDULES_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER." '000010'
        GT_ORDER_SCHEDULES_IN-REQ_QTY = GT_FT_SALES-REQ_QTY .   "'234'
        GT_ORDER_SCHEDULES_IN-DLV_DATE = GT_FT_SALES-DLV_DATE  ."  '20060824'.
        GT_ORDER_SCHEDULES_IN-MS_DATE =  GT_FT_SALES-MS_DATE .  "'20060808'
        GT_ORDER_SCHEDULES_IN-LOAD_DATE = GT_FT_SALES-LOAD_DATE.  " '20060822'
        GT_ORDER_SCHEDULES_IN-GI_DATE = GT_FT_SALES-GI_DATE . " '20060823'
        GT_ORDER_SCHEDULES_IN-TP_DATE = GT_FT_SALES-TP_DATE .   "'20060821'
        APPEND  gt_ORDER_SCHEDULES_IN.
    *********<<<<Communications Fields: SD Document Partner: WWW FLAG>>>>>>>>>>>>>>>>>>
        GT_ORDER_SCHEDULES_INX-ITM_NUMBER = '000010'.
        GT_ORDER_SCHEDULES_INX-REQ_QTY = 'X'.
        GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-MS_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-LOAD_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-GI_DATE = 'X'.
        GT_ORDER_SCHEDULES_INX-DLV_DATE = 'X'.
        APPEND  gt_ORDER_SCHEDULES_INX.
    ********Communication Fields for Maintaining Conditions in the Order
        GT_ORDER_CONDITIONS_IN-ITM_NUMBER = GT_FT_SALES-ITM_NUMBER ." '000010'
        APPEND GT_ORDER_CONDITIONS_IN.
    ***Communication Fields for Maintaining Conditions in the Order
        GT_ORDER_CONDITIONS_INX-ITM_NUMBER = '000010'.
        APPEND GT_ORDER_CONDITIONS_INX.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
       SALESDOCUMENTIN               =
            ORDER_HEADER_IN               = GT_ORDER_HEADER_IN
            ORDER_HEADER_INX              = GT_ORDER_HEADER_INX
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
         IMPORTING
           SALESDOCUMENT                  = GT_SALESDOCUMENT
          TABLES
           RETURN                         = GT_RETURN
            ORDER_ITEMS_IN                = GT_ORDER_ITEMS_IN
            ORDER_ITEMS_INX               = GT_ORDER_ITEMS_INX
            ORDER_PARTNERS                = GT_ORDER_PARTNERS
           ORDER_SCHEDULES_IN            =  GT_ORDER_SCHEDULES_IN
           ORDER_SCHEDULES_INX           =  GT_ORDER_SCHEDULES_INX
           ORDER_CONDITIONS_IN           =  GT_ORDER_CONDITIONS_IN
           ORDER_CONDITIONS_INX          =  GT_ORDER_CONDITIONS_INX
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
        IF GT_RETURN-TYPE EQ 'E' .
          E_REC = E_REC + 1.
          READ TABLE GT_RETURN WITH KEY ID = 'V1'.
          FORMAT COLOR COL_NEGATIVE INVERSE ON.
          REC_NO = E_REC + S_REC.
              CONCATENATE TEXT-006 REC_NO ':'
              GT_RETURN-MESSAGE INTO MSG SEPARATED BY SPACE .
              CONDENSE MSG.
              WRITE: / MSG.
          FORMAT COLOR COL_NEGATIVE INVERSE OFF.
      ELSEIF GT_RETURN-TYPE EQ 'S'.
          S_REC = S_REC + 1.
          FORMAT COLOR COL_POSITIVE INVERSE ON.
              MSG = GT_RETURN-MESSAGE.
              CONDENSE MSG.
              WRITE: / MSG .
          FORMAT COLOR COL_POSITIVE INVERSE OFF.
         PERFORM COMMIT_MM.
    ENDIF.
          CLEAR:  GT_RETURN[], MSG.
    ENDFORM.                    " SLALE_UPLOAD_DATA
    *&      Form  COMMIT_MM
          text
    -->  p1        text
    <--  p2        text
    FORM COMMIT_MM .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            WAIT   = 'X'
          IMPORTING
            RETURN = GT_RETURN.
      clear:      GT_ORDER_ITEMS_IN[],GT_ORDER_CONDITIONS_IN[].
    ENDFORM.                    " COMMIT_MM

  • Can we create outbound delivery with reference of purchase order

    Hi All,
    can we create outbound delivery with reference of purchase order?

    dear friend,
    as far as i know you can create it with the following references:
    -to sales order;
    -to STO;
    -to subcontract order;
    -to project;
    -without any ref
    are you talking about stock transport order ?
    regards,

  • Inspection lot creation during GR with respect to Purchase Order

    Dear Experts,
    Here is my Question
    Inspection lot creation during GR with respect to Purchase Order
    Inspection type 01 set in the material master
    inspection lot will be created during GR for a Purchase order
    from my understanding for every GR a inspection lot will be created
    No batch Management
    but the requirement is irrespective to GR qty and number of times of GR
    we need inspection only one inspection lot
    For Instance
    There is a PO for 1000 kg no batch management
    now i do GR for 100 kg for 10 times with different dates
    now i need to have only one inspection lot
    not 10 inspection lot for each 100 kg
    can any one suggest a solution, please advise my understanding is correct
    Many thanks
    Raj

    Dear Raju,
    There is a solution for that .The setting can be done two ways, either in the material master or in the configuration
    1) Material Master
    MM02> QM View> Inspection Setup> 01> Control Insplot> 'X' An inspection lot for each purchase order item/order item 0r  An inspection lot for each material document and material
    a) 'X' An inspection lot for each purchase order item/order item
    This Means
    This setting is limited for use with the inspection lot origins 01 and 04.
    An inspection lot is only created during the first goods receipt for each PO item or production order.
    b) '1' An inspection lot for each material document and material
    If you set this indicator, the system creates only one inspection lot for a material document (in a goods receipt transaction) for each material. This setting is useful, if several purchase orders or partial deliveries are processed for the same material in a goods receipt transaction.
    2) You can do this default in the config
    SPRO > Quality Management >  Quality Inspection > Inspection lot creation >  Define Default values for inspection type > 01> Control Insp lot
    Hope this helps
    Regards
    gajesh

  • Duplication of Purchase Order while creating sales orders for a customer

    when we try to create sales order for one customer it have to create by picking up the purchase order from the table linearly.
    But the problem is that here when we are trying to create multiple sales orders the same purchase order is being picked.
    for example..when we create sales order 1 the purchase order picked is PO1 and
    for creation of sales order 2 the same purchase order PO1 is being picked up instead of PO2.
    No idocs are being generated in this, even to check them..
    How shall i resolve this...? Please help me out ASAP

    Hi Kumar,
    Thanks for the reply. But actually the problem is that this is related to some customized table in the project. When a EDI Batch job runs in the background then automatically the SO is created and the PO is being picked from the table(custom table) and then posted against the respective SO. we are not aware of that job which is triggering this to debug. Once if we can know that particular batch job or pgm or edi or idoc what ever it is then we can debug.
    Do you have any idea how can we find that particular pgm/edi/idoc/job name which triggers this creation of SO?

  • Function module to create Inbound delivery with reference to Purchase Order

    Hi experts,
    I want to create Inbound delivery with refernce to Purchase Order. But I want to create item wise. For example If one purchase order is there with 10 line items. 10, 20, 30, 40, 50......100.
    If I am showing report for Purchase Order with select option and if I select first 5 line items 10, 20, 30, 40, 50 then my program should be create one Inbound delivery for selected line items only. I have tried BDC for Tcode VL31N, but its not worked. Is there any Function module to create Inbound delivery with reference to Purchase Order for selected line items????????

    Hi,
    Try FM RV_DELIVERY_CREATE or GN_DELIVERY_CREATE.
    For creating a delivery wrt PO u 1st need to have a sales order i guess.
    Regards,
    Amit

  • Bapi: create sales order with reference to Invoice.

    HI ,
    i am trying to create sales order(credit memo request) with respect to invoice.
    What  BAPI to use. also, please provide with sample code.
    I have passed invoice to BAPI_SALESDOCU_CREATEFROMDATA1 at header level(ref_doc).
    and i am  passing other details correctly. the pricing procedure attched to original invoice is not getting triggered for th newly creating sales order.
    Please help me with this.

    use   BAPI_SALESORDER_CREATEFROMDAT2
    search the forum for sample program

  • How to trace purchase order number with respect to Purchase requestion numb

    Hi friends,
    Can u please help me how to Trace purchase order number with respect to purchase Requetuion  number. Is there any standard report  available in R/3

    Hi Vamsi,
    Thats what!!!
    Goto SE16 - EBAN - Give PR number in the iput screen.
    In the output screen you will have to do field selection from Menu - Settings - formatlist - choose fields.
    There you choose Purchase Order.
    So the output will display for you POs for the PR that you entered.
    Regards,
    Vishal

  • Error while creating sales order with ref to contract

    while creating sales order, with refernce to contract system is giving a message
    Configuration not possible for material : Reason 3 --> Help
    Message no. V1360
    and the message is as follwed can any one explain
    Diagnosis
    This may have been caused by one of the following:
    1. The configuration profile for the material allows or requires the bill of materials to be exploded during order processing. However, a plant has not been specified in the item.
    2. The configuration profile of the material allows or requires the bill of materials to be exploded during order processing, but the order quantity in the item must be greater than 0.
    3. A configuration profile has not been maintained
    or
    A configuration is not permitted for the material
    or
    4. The configuration profile of the material allows or requires the bill ofmaterials to be exploded during order processing. However, the system could not determine a date because important data is missing from the item (see incompletion log).

    Hi
    I think you have both Variant configuration and BOM.
    Pls ensure the following.
    1. BOM masterdata is maintained for the variants
    2. Variant configuration is configured correctly
    Configuration profile is created for the material
    Knowledge base object and run time version are available
    3. Maintain materials as not relevant for delivery or dont give delivery quantity as 0
    Once you are sure that these are in proper shape, you can start creating order. The problem wont come.
    Reward points if it helps you.

  • Error while creating sales order with ref using SD_SALESDOCUMENT_CREATE

    Hi
    I am creating sales order with reference using function module SD_SALESDOCUMENT_CREATE , while creating i am getting error
    Document doesn't have document category even thougth i am passing document category in header as well as item lavel.
    In VBUK table there is no value for VGTYP.
    Can you please help me how to resolve it.
    Thanks & regards
    kiran

    Problem resolved by passing   REFDOC_CAT in the FM along with  SD_DOC_CAT.
    Thanks

  • Creating sales order document with reference to billing document

    I have to create sales order with reference to existing billing document. I have tried to following bapis.
    1. BAPI_SALESORDER_CREATEed
    I have successfully created document with following details.
    -->ORDER_HEADER_IN:
    DOC_TYPE = ZRK
    SALES_ORG = 3000
    DISTR_CHAN = 00
    DIVISION = 00
    ORD_REASON = 100
    SD_DOC_CAT = L
    CURRENCY = EUR
    REF_DOC = 100000028
    REF_DOC_CA = M
    -->ORDER_ITEMS_IN:
    ITM_NUMBER = 000010
    MATERIAL = 701791
    TARGET_QTY = 0000000001000
    CURRENCY = EUR
    REF_DOC = 100000028
    REF_DOC_CA = M
    -->ORDER_PARTNERS:
    PARTN_ROLE = SP
    PARTN_NUMB = W12001
    COUNTRY = NL
    by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in ORDER_ITEMS_IN
    COND_TYPE = PNET
    COND_VALUE = 14,56
    COND_D_UNT = PC.
    folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
    is it something related to configuration problem?
    2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
    I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
    Unpermitted combination of business object BUS2032 and sales doc. category L.
    When i created manually using transaction : VA01
    I could do the same by passing following inputs:
    DOC_TYPE = ZRK
    SALES_ORG = 3000
    DISTR_CHAN = 00
    DIVISION = 00
    Reference document number.
    Please suggest me right way of approach.

    Hi,
    In SAP, when the sub-sequent document is existing , we can not cancel the preceeding document. Therefore if you want to cancel the billing document you need to calcel the documents which are created with reference to that.
    Check and confirm.
    Regards,
    Ravi Duggirala

  • BAPI For CREATE SALES ORDER WITH REFERENCE TO ORDER

    Hi ,
    I want to develop a new RFC for 'Creating Sales Order' with reference to another sales order -
    Is there any BAPI available for the same ? (Version 4.7) - I know its available for new create and change
    but couldn't find for create with reference to Order ...
    Thanks in advance ...
    Regards
    Rajesh.

    Hi,
    You can use this FM "/SAPNEA/SMAPI_ORDER_CREATE". I haven;t tried this but you can still give it a try. Mention the Reference Order Type and other data in the header work area and pass it to the FM.
    Reward if it's useful.
    Thanks,
    Anil

Maybe you are looking for

  • How to create a folder in which email forms are stored which cab be used and usen again

    Hi folks of the free software comunity, in the olden days I used to use a mail program made by MARINET in England. This received an sent emails via a sattelite connection an nothing else. The program had a feature called pre-formed mails: In a specia

  • How to have buttons come in 2 seconds after menu??

    I have a sound effect and animation for the first 2 seconds of the DVD menu. I'd like the buttons to appear after that's done. Is that possible? How?

  • Talent management: talent information

    Hi gurus, I've used a day or two trying to locate this issue, can't seem to find anything, so hopefully some of you have experienced this before. Currently I'm working on what's supposed to display in talent information in portal, and the weird thing

  • Multicast address inside a solaris zone buggy ?

    I need to post to a multicast address from within a solaris 10 (06.06) zone but the routing is abnormal: On the global: 224.0.0.0 240.0.0.0 172.16.248.42 e1000g0 1500* 0 1 U 0 0 Inside the zone: 224.0.0.0 240.0.0.0 172.16.0.60 e1000g32001:1 1500* 0 1

  • JSP 2.0 Expression Language

    Quick question on EL: - I noticed in the J2EE 1.4 Tutorial that the Expression Language syntax can be used outside of any JSP tag, for example ${name.lastname}is valid, even if used anywhere in the page, i.e. outside of any tag. Is this a new feature