One-time ship to Party on Item Level

Dear SD Experts,
Can you throw some light on the
scenario below?
Scenario: Customer order 2 pcs of MATERIAL A, 1 pc of MATERIAL B to be
delivered to 2 different ship to parties.
Sold to: 1000
Material A           1pc        One-time Ship-to-Party 2000  Name AA
Material B           1pc        One-time Ship-to-Party 2000  Name AA
Material A           1pc        One-time Ship-to-Party 2000  Name BB
Problem: If I enter item 1 and 2 and enter the same name of Ship to party,
same address. It is still generating 3 deliveries.
It should generate 2 deliveries only.
Looking forward to your answers.
Thanks &
Regards,
Basavaraddi. S. N

check the  plant  which u put at the line item  for shipto party 2000 name A
for 1st material and again check the plant for line item for ship to party 2000 Name B for 2nd material.
See if the shipping point is different it will create different deliveries and plant is the important factor for determining the shipping point .
I presume u put different ship to party at the line item level in sales order.
Hope this help

Similar Messages

  • Management One time Ship-To-Party for a Sales Document

    Hello SAP folks,
    I have a current requirement for mapping a one time Ship-To-Party address details to Sales Order. Here there is absolutely no issue but when we shall process a subsequent Document i.e. a Rental Contract,
    Could we prevent the flow of the new address for Ship-To-Party updated with respect to Sales Order to the Rental Contract ?
    The current business need is to process the Contract with address maintained in Customer Master Record.
    Eagerly awaiting to hear from you guys on this requirement !!
    Regards,
    Sarthak

    Dear Sathak,
    For the Rental Contracts, do you always want the system to pick the address from customer master?
    If so you can use a user exit to meet your requirement. Please talk to you Abaper.
    Thanks
    Murtuza

  • VA01 DBC for One-time Ship to party

    Hi All,
    I am creating a  BDC program for Sale Order (VA01), only for those customers which have one-time account ship to party. When I creates sale order manually for these types for customer, a Customer address from master data for ship party screen pop-up where user enters ship to party address . But while I am doing DBC recording for the same, than this address from master data for ship party  pop-up screen not showing in BDC recording. Is there any way to do this
    With Regards
    Jitendra Singh

    Hi,
    BDC is not recommended at all when there is an existing BAPI, that is the case here I guess. Is there a reason why you use BDC? With a BAPI, you'll avoid this kind of issue (workarounds are usually to make sure of the issue by testing with the A display mode, else force the NO batch input option (NOBINPT)).
    Sandra

  • BAPI_SALESORDER_CHANGE - Want to change the Ship-to-party at header level

    Hi
    I want to change the Ship-to-party at header level in the Sales Order created. I tried using the BAPI BAPI_SALESORDER_CHANGE  as shown below.
    When I run the program I get the log as Sales Order 45 saved succesfully. However, I don't find the SO changed. Apart from this I get an Express Message saying the Updation failure. Not sure of what'z wrong here.
    Pls help
    thanks
    girish
    REPORT  ZBAPI_SALESORD_CHANGE.
    data : zBAPISDHD       type BAPISDH1,
           zSALESDOCUMENT  type BAPIVBELN-VBELN.
    data : zORDER_ITEMS_IN     like /AFS/BAPISDITM occurs 0 with header line,
           zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
           zORDER_PARTNERS like BAPIPARNR      occurs 0 with header line,
           zRETURN         like BAPIRET2 occurs 0 with header line,
           so_no           type BAPIVBELN-VBELN,
           zORDER_HEADER_INX    TYPE BAPISDH1X,
           zPARTNERCHANGES like  BAPIPARNRC occurs 0 with header line.
    clear : zBAPISDHD.
    so_no = '0000000045'.
    data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
    l_comp_qty = 10.
    zBAPISDHD-SALES_ORG = 'BP01'.
    zBAPISDHD-DISTR_CHAN = '02'.
    zBAPISDHD-DIVISION = '01'.
    zORDER_HEADER_INX-UPDATEFLAG = 'U'.
    zORDER_HEADER_INX-SALES_ORG  = 'X'.
    zORDER_HEADER_INX-DISTR_CHAN = 'X'.
    zORDER_HEADER_INX-DIVISION = 'X'.
    Ship to pary
    zORDER_PARTNERS-PARTN_ROLE = 'WE'.
    zORDER_PARTNERS-PARTN_NUMB = 'BPAFS0007'.
    append zORDER_PARTNERS.
    zPARTNERCHANGES-DOCUMENT = '45'.
    zPARTNERCHANGES-ITM_NUMBER = '10'.
    zPARTNERCHANGES-UPDATEFLAG = 'U'.
    zPARTNERCHANGES-PARTN_ROLE = 'WE'.
    zPARTNERCHANGES-P_NUMB_OLD = 'BPAFS0001'.
    zPARTNERCHANGES-P_NUMB_NEW = 'BPAFS0007'.
    append zPARTNERCHANGES.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = so_no
        ORDER_HEADER_IN             = zBAPISDHD
        ORDER_HEADER_INX            = zORDER_HEADER_INX
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
      TABLES
        RETURN                      = zRETURN
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
        PARTNERS                    = zORDER_PARTNERS
        PARTNERCHANGES              = zPARTNERCHANGES.
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
    data : s_BAPIRET2 like  BAPIRET2.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'
    importing
    return = s_bapiret2.

    Thanks Prashanth. It worked !!!!!!!!!!!!!
    Now I am facing another type of problem. The requirement is to change the Sales Order Item Quantity. I basically planned to update the quantity of Schedule Item which needs to be changed. When I run the below code, it works and says the Sales Order changed succesfully. However I get an express message saying the Database update failure. I don't get any sort of technical information.
    Appreciate if you could help me finding the error.
    Thanks
    regards
    girish
    Note --> I am trying to change the Quantity for 2 line item in SO '56' to 40 Units.
    REPORT  ZBAPI_SALESORD_CHANGE.
    data : zBAPISDHD       type /AFS/BAPISDHD,
           zORDER_HEADER_INX    TYPE /AFS/BAPISDHDX,
           zSALESDOCUMENT  type BAPIVBELN-VBELN.
    data : zORDER_ITEMS_IN     like /AFS/BAPISDITM   occurs 0 with header line,
           zORDER_ITEM_INX     like /AFS/BAPISDITMX  occurs 0 with header line,
           zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD  occurs 0 with header line,
           ZSCHEDULE_LINESX    LIKE /AFS/BAPISDSCHDX occurs 0 with header line,
           zORDER_PARTNERS like BAPIPARNR      occurs 0 with header line,
           zRETURN         like BAPIRET2 occurs 0 with header line,
           so_no           type BAPIVBELN-VBELN,
           zPARTNERCHANGES like  BAPIPARNRC occurs 0 with header line.
    data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
    data : g_qty like /AFS/BAPISDSCHD-REQ_QTY.
    g_qty = 40.
    l_comp_qty = 40.
    clear : zBAPISDHD.
    so_no = '0000000056'.
    zBAPISDHD-REFOBJTYPE = '/AFS/ORDER'.
    zBAPISDHD-SALES_ORG = 'BP01'.
    zBAPISDHD-DISTR_CHAN = '02'.
    zBAPISDHD-DIVISION = '01'.
    zBAPISDHD-PMNTTRMS = '0001'.
    zORDER_HEADER_INX-UPDATEFLAG = 'U'.
    zORDER_HEADER_INX-SALES_ORG  = 'X'.
    zORDER_HEADER_INX-DISTR_CHAN = 'X'.
    zORDER_HEADER_INX-DIVISION = 'X'.
    zORDER_HEADER_INX-PMNTTRMS = 'X'.
    **********ITEM ***************************************
    zORDER_ITEMS_IN-ITM_NUMBER = '00020'.
    zORDER_ITEMS_IN-MATERIAL = 'F1202'.
    zORDER_ITEMS_IN-PLANT = 'BP01'.
    zORDER_ITEMS_IN-ITEM_CATEG = 'TAS'.
    zORDER_ITEMS_IN-SHIP_POINT = 'BP01'.
    zORDER_ITEMS_IN-COMP_QUANT = l_comp_qty.
    zORDER_ITEMS_IN-TARGET_QTY = l_comp_qty.
    zORDER_ITEMS_IN-TARGET_QU = 'ST'.
    append zORDER_ITEMS_IN.
    zORDER_ITEM_INX-ITM_NUMBER = '00020'.
    zORDER_ITEM_INX-UPDATEFLAG = 'U'.
    zORDER_ITEM_INX-MATERIAL = 'X'.
    zORDER_ITEM_INX-PLANT = 'X'.
    zORDER_ITEM_INX-ITEM_CATEG = 'X'.
    zORDER_ITEM_INX-SHIP_POINT = 'X'.
    zORDER_ITEM_INX-COMP_QUANT = 'X'.
    zORDER_ITEM_INX-TARGET_QTY = 'X'.
    zORDER_ITEM_INX-TARGET_QU = 'X'.
    append zORDER_ITEM_INX.
    *********SCHEDULE LINE******************************
    refresh zORDER_SCHEDULES_IN.
    clear zORDER_SCHEDULES_IN.
    zORDER_SCHEDULES_IN-ITM_NUMBER = '000020'.
    zORDER_SCHEDULES_IN-SCHED_LINE = '0001'.
    zORDER_SCHEDULES_IN-REQ_DATE = '20070525'.
    zORDER_SCHEDULES_IN-DATE_TYPE = '1'.
    zORDER_SCHEDULES_IN-SCHED_TYPE = 'CS'.
    zORDER_SCHEDULES_IN-GRID_VALUE = 'BLK2728'.
    zORDER_SCHEDULES_IN-REQ_CATEGORY = '1DE'.
    zORDER_SCHEDULES_IN-REFOBJTYPE = '/AFS/ORDER'.
    zORDER_SCHEDULES_IN-REQ_QTY = g_qty.
    append zORDER_SCHEDULES_IN.
    refresh ZSCHEDULE_LINESX.
    clear ZSCHEDULE_LINESX.
    ZSCHEDULE_LINESX-ITM_NUMBER = '000020'.
    ZSCHEDULE_LINESX-SCHED_LINE = '0001'.
    ZSCHEDULE_LINESX-UPDATEFLAG = 'U'.
    ZSCHEDULE_LINESX-REQ_DATE = 'X'.
    ZSCHEDULE_LINESX-DATE_TYPE = 'X'.
    ZSCHEDULE_LINESX-SCHED_TYPE = 'X'.
    ZSCHEDULE_LINESX-GRID_VALUE = 'X'.
    ZSCHEDULE_LINESX-REQ_CATEGORY = 'X'.
    ZSCHEDULE_LINESX-REFOBJTYPE = 'X'.
    ZSCHEDULE_LINESX-REQ_QTY = 'X'.
    append ZSCHEDULE_LINESX.
    CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
      EXPORTING
        SALESDOCUMENT               = so_no
        ORDER_HEADER_IN             = zBAPISDHD
        ORDER_HEADER_INX            = zORDER_HEADER_INX
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      TABLES
        RETURN                      = zRETURN
        ORDER_ITEM_IN               = zORDER_ITEMS_IN
        ORDER_ITEM_INX              = zORDER_ITEM_INX
        ORDER_SCHEDULE_LINES        = zORDER_SCHEDULES_IN
        ORDER_SCHEDULE_LINESX       = ZSCHEDULE_LINESX.
      PARTNERS                    =
      PARTNERCHANGES              = zPARTNERCHANGES
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
    *CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
       SALESDOCUMENT               = so_no
       ORDER_HEADER_IN             = zBAPISDHD
       ORDER_HEADER_INX            = zORDER_HEADER_INX
    TABLES
       RETURN                      = zRETURN
       ORDER_ITEM_IN               = zORDER_ITEMS_IN
       ORDER_ITEM_INX              = zORDER_ITEM_INX
       PARTNERS                    = zORDER_PARTNERS
       PARTNERCHANGES              = zPARTNERCHANGES
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES               = zORDER_SCHEDULES_IN
      SCHEDULE_LINESX              = ZSCHEDULE_LINESX.
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
    data : s_BAPIRET2 like  BAPIRET2.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    importing
    return = s_bapiret2.

  • Usage on One time ship to

    Hi,
    We are using one time ship to on Sales orders. I want to track the number of orders over a period of time which used one time ship to customers? I tried with the tcode va05 for it. But Could find only sold to customer there?
    Any advice...
    Thanks

    Hi Abid,
    I'm not sure if there is one table or option to give you this data. What you could do is write a query joining the following tables VBPA, KNA1 & VBAK
    Use KNA1.XCPDK for the one time account.
    Join KNA1 and VBPA with customer number and join VBPA and VBAK with order number.
    Hope it has helped you. Reward if so.
    Regards
    Nadarajah Pratheb

  • One time 2 free of charge item in an order

    Hi Gurus
    I am working on an sd pricing role that that has a requirement in place for pharmaceutical companies to offer (one time only) 2 free vials of Soliris to every new patient free of charge  and a discount from the list price on the rest of the order,
    the scenario is like this line item- total of 6 orders for 100 EU/ vial from a new patient- this is how they would like it to be on the invoice,
    Quantity                                                                                Amount
    2 (vials free of charge)    2* 100 Eu- 100% Discount                             0.00
    4 vials @ PR00 with a discount of 9.78%  (4* 100)9.78%                   360.
    is there a way that i can configure the system so that patients are only offered the 2 free vials once. and
    charges regular price on the rest of the order
    Ur help would be awesomely appreciated
    Yvonne
    Edited by: Yvonne  Asiq on Apr 9, 2008 4:10 AM

    Thanks for your reply. I checked that box and it becomes a free of charge item. Now when I do the MIRO that particular line item is missing. And when I do the F2 invoice for the third party order too that line is missing. My requirement is that I should be able to see in the F2 invoice as a free item. This is required for customs purposes.
    I have also tried checking the box : " Final Invoice " in the PO for that particular line item. ANd the FREE check box is still there , and the F2 invoice has the free line item but it is showing the std price. I would like to see the price as $0.00.
    Appreciate your help and time
    Thanks

  • HOW TO DISABLE ALL BUT ONE CHECKBOX IN ALV BASED ON ITEM LEVEL

    Hi All,
    I have a report that has output format in ALV , first column is a Checkbox and second in agreement number . the data is displayed on item level , now my requirement is check box must be displayed in front of only first line item per agreement number and should not be displayed infront of any other ,
    rewadard points are waiting.....for correct answer...

    The same thing can be done using Object Oriented ALV.
    Following are the steps...
    1. HANDLE_STYLE TYPE LVC_T_STYL.
    DECLARE work area,and table
    2.  DATA: LS_EDIT TYPE LVC_S_STYL,
            LT_EDIT TYPE LVC_T_STYL.
    changing the style...
    3.
    LOOP AT IT_FINAL INTO LS_OUTTAB WHERE FLAG = 'X'.
        V_INDEX = SY-TABIX.
        LS_EDIT-FIELDNAME = 'MATNR'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        LS_EDIT-FIELDNAME = 'VBELN'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENAABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        LS_EDIT-FIELDNAME = 'POSNR'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
        MODIFY IT_FINAL INDEX V_INDEX FROM LS_OUTTAB  TRANSPORTING
                                          HANDLE_STYLE .
      ENDLOOP.
    assigning the style to Layout..
    4.   GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
    Check the sample code..
    create a screen 100, place a control on that and name it as TEST. and also activate the pf-status.
    REPORT  ZTEST1234    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID. 
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST', "First Container
          GS_LAYOUT TYPE LVC_S_LAYO.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         LFDAT like lips-vfdat,
         BOX(1),
         HANDLE_STYLE TYPE LVC_T_STYL,
         END OF ITAB.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
        MESSAGE I000 WITH V_ROW 'clicked'.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          MESSAGE I000 WITH 'Click on POSNR row number '  E_ROW.
          "with this row num you can get the data
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    **Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
        CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
        IF SY-SUBRC NE 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDMETHOD.                    "HANDLE_DATA_CHANGED
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
      CREATE OBJECT G_CUSTOM_CONTAINER
             EXPORTING CONTAINER_NAME = G_CONTAINER1.
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-BOX_FNAME = 'BOX'.
      GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
    *  SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.
    data: ls_outatb like line of itab,
          v_index type sy-tabix.
    DATA: LS_EDIT TYPE LVC_S_STYL,
            LT_EDIT TYPE LVC_T_STYL.
    LOOP AT ITAB INTO ls_outatb WHERE POSNR = '000010'.
        V_INDEX = SY-TABIX.
        LS_EDIT-FIELDNAME = 'VBELN'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        INSERT LINES OF LT_EDIT INTO TABLE ls_outatb-handle_style.
        MODIFY ITAB INDEX V_INDEX FROM ls_outatb  TRANSPORTING
                                          HANDLE_STYLE.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    **Calling the Method for ALV output for First Grid
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    * Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-EDIT      = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
        L_POS = L_POS + 1.
        X_FIELDCAT-SCRTEXT_M = 'Del Date'(015).
      X_FIELDCAT-FIELDNAME = 'LFDAT'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

  • Ship-to party details at item level

    Hi friends,
                 I am using SAP version 4.7. In a sales order, Ship-to party is different at header level and item level. When I go to the sales order item overview and click on a particular item and in the partners tab, I see a different customer under ship-to party partner function. The problem here is that though the partner no. is different, details such as name, street are getting picked from header level ship-to-party. Suppose, at header level, ship-to party is '1', and at item level ship-to party is '2'. In the details of ship-to party at item level, I am getting '1's name and street details.
                 I have checked OSS notes but,could not find any relevent note for my sap version and  package,
      Please suggest what could be the solution.
    Thanks & Regards,
    Vishnu Priya

    Hi Vishnu,
    In sales, ship-to party is never mentioned in header..( u can chk out in table VBAK-->header sales table)..only sold-t party is mentioned..this is because one sale can have many different consignees for different items but for the same customer... also, ship-to party can also be same as te sold-to party...so that may be the reson u r getting the same address for both...
    hope it helps,
    Regards,
    Bikash

  • VA01 : How to add field ship to party to tab Item Overview

    Standard SAP is filling the ship to party on item level by default with the value entered on order header level. In case you added multiple items for an order and you want to change the ship to party for 1 or 2 items, you have to doubleclick on the line and then go to tab Partners and change the ship to party item by item by using the next and previous item button. We would like to add a column including the SH partnervalue to tab Item Overview (sapmv45a 4900) so we will be able to change the ship to party for an item on 1 screen. Is it possible to add a new colum (via a userexit / badi)?
    kind regards
    Angelique Heutinck

    Seems its not possible through standard SAP.we had the similar req in our project so what we did is we append the structure VBAP and added one new z field .... i reckon the same way you can do it for ur req as well.in short you need the access key.
    Please do let me know if u fnd another way to fix the problem i mean without access key.
    Best of luck
    Jess

  • Ship to party for each material using BAPI_SLSTRANSACT_CREATEMULTI

    i am able to generate sales order for in CRM. I am inputting the sold to party, ship to party, bill to party and payer at the header level...
    CRM is currently configured in such a way that , there is a provision to assign ship to party at item level for each material.
    How can i programatically replicate this? I need to assign a diiferent ship to party for each material in the sales order.*
    how can i programatically replicate this?...
    this is  my code for cresating a sales order in CRM with sold to party, ship to party, bill to party and payer at the header level...
    *************include constants
      include crm_direct.
    ************// GUIDs
      data:         lv_guid_h type GUID_32,              "HEADER GUIDE
                    lv_guid_i type GUID_32,              "ITEM GUIDE
                    lv_guid_sl type GUID_32,             "SCHEDULE LINE GUIDE
                    lv_guid_p type GUID_32.              "PARTNER GUIDE
    ***********// Handles
      data:        lv_current_handle type crmt_handle,    "CURRENT HANDLE
                   lv_handle_h type crmt_handle,          "HEADER HANDLE
                   lv_handle_i type crmt_handle,          "ITEM HANDLE
                   lv_handle_sl type crmt_handle,         "SCHEDULE LINE HANDLE
                   lv_handle_p type crmt_handle.          "PARTNER HANDLE
    ***********// Administration header + item + etc
      data:        lt_salesorder_header type table of bapibus20001_header_ins,        "LT_SALESORDER_HEADER
                   ls_salesorder_header type bapibus20001_header_ins,                 "LS_SALESORDER_HEADER
                   lt_salesorder_item type table of bapibus20001_item,                "LT_SALESORDER_ITEM
                   ls_salesorder_item type bapibus20001_item,                         "LS_SALESORDER_ITEM
                   lt_scheduleline type table of BAPIBUS20001_SCHEDLIN,               "LT_SCHEDULELINE
                   ls_scheduleline type BAPIBUS20001_SCHEDLIN,                        "LS_SCHEDULELINE
                   lt_partner type table of BAPIBUS20001_PARTNER_INS,                 "LT_PARTNER
                   ls_partner type BAPIBUS20001_PARTNER_INS,                          "LS_PARTNER
                   ls_logical_key TYPE crmt_partner_logic_partner_key,                "LS_LOGICAL_KEY
                   lt_organisation type table of BAPIBUS20001_ORGMAN_INS,             "LT_ORGANISATION
                   ls_organisation type BAPIBUS20001_ORGMAN_INS.                      "LS_ORGANISATION
    *********// Saved sales orders
    data: lt_saved_process type table of bapibus20001_object_id,                   "LT_SAVED_PROCESS
      data:
            ls_saved_process type bapibus20001_object_id,                             "LS_SAVED_PROCESS
            ls_salesorder type CRMT_RETURN_OBJECTS_STRUC.                             "LS_SALESORDER
      data: lt_input_fields type table of bapibus20001_input_fields,                  "LT_INPUT_FIELDS
            ls_input_fields type bapibus20001_input_fields,                           "LS_INPUT_FIELDS
            ls_return type bapiret2.                                                  "LS_RETURN
    data: lt_return type table of bapiret2.                                        "LT_RETURN
    ***********// Macro definition to populate structure and input field This, called as
    *_set_field ls_salesorder_header GUID lv_guid_h
    *is exploded as
          ls_salesorder_header-GUID            =        lv_guid_h.
          ls_input_fields-fieldname            =        'GUID'.
          append ls_input_fields to lt_input_fields.
    *Note 1: &2 (field name) MUST be uppercase
    *Note 2: for the salesorder header, Macro has not been used to show how the code should look like.
    *except for that the macro has been used everywhere else.
         define setfield.
              &1-&2 = &3.
              ls_input_fields-fieldname = '&2'.
              append ls_input_fields to lt_input_fields.
        end-of-definition.
    *****// end of macro definition
    ******// fill order administration header
        perform get_guid changing lv_guid_h.
        add 1 to lv_handle_h.
        ls_salesorder_header-guid = lv_guid_h.
        ls_salesorder_header-handle = lv_handle_h.
        ls_salesorder_header-process_type = 'ZWEB'.
        clear ls_input_fields.
        ls_input_fields-ref_handle = lv_handle_h.
        ls_input_fields-ref_guid = lv_guid_h.
    *ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
        ls_input_fields-objectname = gc_object_name-orderadm_h.
        ls_input_fields-fieldname = 'GUID'.
        append ls_input_fields to lt_input_fields.
        ls_input_fields-fieldname = 'HANDLE'.
        append ls_input_fields to lt_input_fields.
        ls_input_fields-fieldname = 'PROCESS_TYPE'.
        append ls_input_fields to lt_input_fields.
        append ls_salesorder_header to lt_salesorder_header.
    **********// fill organisation data (Interface needs this, some times may rely on sales org determination instead...
        clear ls_input_fields.
        ls_input_fields-ref_handle          =      lv_handle_h.
        ls_input_fields-ref_guid            =      lv_guid_h.
        ls_input_fields-ref_kind            =      gc_object_ref_kind-orderadm_h.
        ls_input_fields-objectname          =      gc_object_name-orgman.
        setfield      ls_organisation    REF_GUID         lv_guid_h.
        setfield      ls_organisation    REF_HANDLE       lv_handle_h.
        setfield      ls_organisation    REF_KIND         gc_object_ref_kind-orderadm_h.
        setfield      ls_organisation    SALES_ORG_RESP   SO_RESP .                                 "(input).
        setfield      ls_organisation    SALES_ORG        SALES_ORG.                                "(input).
        setfield      ls_organisation    DIS_CHANNEL      DIS_CHNL.                                 "(input).
        setfield      ls_organisation    DIVISION         DIVISION.                                 "(input).
        append ls_organisation to lt_organisation.
    **********// fill order administration item
      perform get_guid changing lv_guid_i.
      lv_handle_i = lv_handle_h.
      add 1 to lv_handle_i.
      clear ls_input_fields.
      ls_input_fields-ref_guid            =        lv_guid_i.
      ls_input_fields-ref_handle          =        lv_handle_i.
    *ls_input_fields-ref_kind             =        gc_object_ref_kind-orderadm_i.
      ls_input_fields-objectname          =        gc_object_name-orderadm_i.
      setfield      ls_salesorder_item      GUID               lv_guid_i.
      setfield      ls_salesorder_item      HEADER             lv_guid_h.
      setfield      ls_salesorder_item      HANDLE             lv_handle_i.
      setfield      ls_salesorder_item      HEADER_HANDLE      lv_handle_h.
      setfield      ls_salesorder_item      ORDERED_PROD       PRODUCT .                           "(input).
      setfield      ls_salesorder_item      ITM_TYPE           'ZTAN'.
      setfield      ls_salesorder_item      MODE               'A'.
    *adjustment taken from standard include LCMS_MAPPERF04
    *(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
      delete lt_input_fields where fieldname = 'HANDLE'
      OR
      fieldname      =    'HEADER_HANDLE'.
      append ls_salesorder_item to lt_salesorder_item.
    ********// fill schedule line for item
      perform get_guid changing lv_guid_sl.
      add 1 to lv_handle_sl.
      clear ls_input_fields.
      ls_input_fields-ref_guid          =        lv_guid_i.
      ls_input_fields-ref_handle        =        lv_handle_i.
      ls_input_fields-ref_kind          =        gc_object_ref_kind-orderadm_i.
      ls_input_fields-objectname        =        gc_object_name-schedlin.
      setfield       ls_scheduleline       ITEM_GUID       lv_guid_i.
      setfield       ls_scheduleline       GUID            lv_guid_sl.
      setfield       ls_scheduleline       HANDLE          lv_handle_sl.
      setfield       ls_scheduleline       ITEM_HANDLE     lv_handle_i.
      setfield       ls_scheduleline       QUANTITY        quantity.                        "(input).
      append ls_scheduleline to lt_scheduleline.
    ********// fill partner line
    *perform get_guid changing lv_guid_p.
    *the partner use the logical key as well
      ls_logical_key-ref_partner_handle = '0001'.
      clear ls_input_fields.
      ls_input_fields-ref_guid       =       lv_guid_h.
      ls_input_fields-ref_handle     =       lv_handle_h.
      ls_input_fields-ref_kind       =       gc_object_ref_kind-orderadm_h.
      ls_input_fields-objectname     =       gc_object_name-partner.
      ls_input_fields-logical_key    =       ls_logical_key.
      setfield       ls_partner       REF_GUID                   lv_guid_h.
      setfield       ls_partner       REF_HANDLE                 lv_handle_h.
      setfield       ls_partner       REF_KIND                   gc_object_ref_kind-orderadm_h.
      setfield       ls_partner       REF_PARTNER_HANDLE         '0001'.
      setfield       ls_partner       KIND_OF_ENTRY              'C'.
      setfield       ls_partner       PARTNER_FCT                '00000001'.
      setfield       ls_partner       PARTNER_NO                 SOLD_TO.                                "(input).
      setfield       ls_partner       NO_TYPE                    'BP'.
      setfield       ls_partner       DISPLAY_TYPE               'BP'.
      move-corresponding ls_partner to ls_logical_key.
      append ls_partner to lt_partner.
      ls_logical_key-ref_partner_handle        =       '0002'.
      clear ls_input_fields.
      ls_input_fields-ref_guid                 =         lv_guid_h.
      ls_input_fields-ref_handle               =         lv_handle_h.
      ls_input_fields-ref_kind                 =         gc_object_ref_kind-orderadm_h.
      ls_input_fields-objectname               =         gc_object_name-partner.
      ls_input_fields-logical_key              =         ls_logical_key.
      setfield          ls_partner           REF_GUID                   lv_guid_h.
      setfield          ls_partner           REF_HANDLE                 lv_handle_h.
      setfield          ls_partner           REF_KIND                   gc_object_ref_kind-orderadm_h.
      setfield          ls_partner           REF_PARTNER_HANDLE         '0002'.
      setfield          ls_partner           KIND_OF_ENTRY              'C'.
      setfield          ls_partner           PARTNER_FCT                '00000002'.
      setfield          ls_partner           PARTNER_NO                 SHIP_TO .                                "(input).
      setfield          ls_partner           NO_TYPE                    'BP'.
      setfield          ls_partner           DISPLAY_TYPE               'BP'.
      move-corresponding ls_partner to ls_logical_key.
      append ls_partner to lt_partner.
      ls_logical_key-ref_partner_handle = '0003'.
      clear ls_input_fields.
      ls_input_fields-ref_guid             =           lv_guid_h.
      ls_input_fields-ref_handle           =           lv_handle_h.
      ls_input_fields-ref_kind             =           gc_object_ref_kind-orderadm_h.
      ls_input_fields-objectname           =           gc_object_name-partner.
      ls_input_fields-logical_key          =           ls_logical_key.
      setfield         ls_partner            REF_GUID                   lv_guid_h.
      setfield         ls_partner            REF_HANDLE                 lv_handle_h.
      setfield         ls_partner            REF_KIND gc_object_ref_kind-orderadm_h.
      setfield ls_partner REF_PARTNER_HANDLE '0003'.
      setfield ls_partner KIND_OF_ENTRY 'C'.
      setfield ls_partner PARTNER_FCT '00000003'.
      setfield ls_partner PARTNER_NO BILL_TO ."(input).
      setfield ls_partner NO_TYPE 'BP'.
      setfield ls_partner DISPLAY_TYPE 'BP'.
      move-corresponding ls_partner to ls_logical_key.
      append ls_partner to lt_partner.
      ls_logical_key-ref_partner_handle = '0004'.
      clear ls_input_fields.
      ls_input_fields-ref_guid = lv_guid_h.
      ls_input_fields-ref_handle = lv_handle_h.
      ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
      ls_input_fields-objectname = gc_object_name-partner.
      ls_input_fields-logical_key = ls_logical_key.
      setfield ls_partner REF_GUID lv_guid_h.
      setfield ls_partner REF_HANDLE lv_handle_h.
      setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
      setfield ls_partner REF_PARTNER_HANDLE '0004'.
      setfield ls_partner KIND_OF_ENTRY 'C'.
      setfield ls_partner PARTNER_FCT '00000004'.
      setfield ls_partner PARTNER_NO PAYER ."(input).
      setfield ls_partner NO_TYPE 'BP'.
      setfield ls_partner DISPLAY_TYPE 'BP'.
      move-corresponding ls_partner to ls_logical_key.
      append ls_partner to lt_partner.
    *******// example of a second partner function (custom) with data override
    *ls_logical_key-ref_partner_handle = '0002'.
    *clear ls_input_fields.
    *ls_input_fields-ref_guid = lv_guid_h.
    *ls_input_fields-ref_handle = lv_handle_h.
    *ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
    *ls_input_fields-objectname = gc_object_name-partner.
    *ls_input_fields-logical_key = ls_logical_key.
    *_set_field ls_partner REF_GUID lv_guid_h.
    *_set_field ls_partner REF_HANDLE lv_handle_h.
    *_set_field ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
    *_set_field ls_partner REF_PARTNER_HANDLE '0002'.
    *_set_field ls_partner KIND_OF_ENTRY 'B'. "manual entry...
    *_set_field ls_partner PARTNER_FCT customFct(input).
    *_set_field ls_partner PARTNER_NO bpNumber(input).
    *_set_field ls_partner NO_TYPE 'BP'.
    *_set_field ls_partner DISPLAY_TYPE 'BP'.
    *_set_field ls_partner TITLE 'Mr.'.
    *_set_field ls_partner FIRSTNAME 'John'.
    *_set_field ls_partner LASTNAME 'Smith'.
    *_set_field ls_partner STR_SUPPL1 'John Smith and Co'.
    *_set_field ls_partner STREET 'Street1'.
    *_set_field ls_partner STR_SUPPL3 'Street4'.
    *_set_field ls_partner HOUSE_NO '42'.
    *_set_field ls_partner CITY 'Townville'.
    *_set_field ls_partner DISTRICT 'Districtshire'.
    *_set_field ls_partner POSTL_COD1 'AA1 2BB'.
    *note now ...
    *adjustment taken from standard include LCMS_MAPPERF04
    *(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
    *I don't use macro because name of the field in input_table is different
    *_set_field ls_partner COUNTRYISO 'GB'.
    *instead
      ls_partner-COUNTRYISO = 'GB'.
      ls_input_fields-fieldname = 'COUNTRY'.
      append ls_input_fields to lt_input_fields.
    *_set_field ls_partner LANGU_ISO 'EN'.
      ls_partner-LANGU_ISO = 'EN'.
      ls_input_fields-fieldname = 'LANGU'.
      append ls_input_fields to lt_input_fields.
      move-corresponding ls_partner to ls_logical_key.
      append ls_partner to lt_partner.
    *Create sales orders *
      call function 'BAPI_SLSTRANSACT_CREATEMULTI'
        EXPORTING
          testrun       = false
        TABLES
          header        = lt_salesorder_header[]
          item          = lt_salesorder_item[]
          partner       = lt_partner[]
          organisation  = lt_organisation[]
          input_fields  = lt_input_fields[]
          scheduleline  = lt_scheduleline[]
          saved_process = lt_saved_process[]
          return        = lt_return[].
    *************// get the GUID of the created object
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          = 'X'
    IMPORTING
        RETURN        = lt_return1.
    INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01.
    Edited by: jessica sam on Dec 22, 2008 4:25 PM
    Edited by: jessica sam on Dec 22, 2008 4:27 PM
    Edited by: jessica sam on Dec 22, 2008 7:05 PM
    Edited by: jessica sam on Dec 23, 2008 5:18 AM

    I know how to trace the Ship to party at line item. When i create an order manually on CRM then the table CRMD_PARTNER has the required entries and the Ship to party at line item is getting populated correctly. Also if i open the order in CRMD_ORDER the ship pto party are being populated correctly at line item..
    But if i am trying to replicate this programatcally using the BAPI, i see that the ship to at header is being copied to each line item and this is not what is expected.
    If i go and check in the CRMD_PARTNER the data is not filled
    correctly as I dont have any ship to party at line item
    So finally I even tried to insert the data manually in the CRMD_PARTNER table using an
    INSERT statement and even that doesnt work...
    https://www.sdn.sap.com/irj/scn/forums
    So i am unable to ficgure out what is going wrong
    Any body if they have any idea on poulating ship to party programatically in
    sales order for each line item please help
    I am unable to figure out how to fill PArtner table of this BAPI to populate ship to at line item level
    Kindly Help..
    Regards,
    Jessica Sam

  • Alternate Ship to party selection in item and header level

    Hi,
    How a alternate ship to party in header level and item level be selected please.
    Best Regards
    RD

    Hi Durai
    I try to make it simple.
    You maintain partner relationship in two places.
    They are,
    1. Customer master data ( sales area data > partner function tab )
    2. In sales document ( at both header & item level ).
    Difference between the two are,
    In Customer master, you can have multiple Partners for  one Partner function, but in Sales documents you can not have more then one Partner for one Function.
    Only, Outline agreement is an exception where you can have more one partner ( alternative SP & SH ) for one Partner function.
    In the customer master, if there are more then one Ship-to-party, then when you create a Sales order, then system will give you a pop-up/a list of SH to choose the one you want.
    Therefore add the  multiple Ship-to-parties in the customer master of your Sold-to-party,so that system will give you a pop-up.
    So you can select the SH you require.
    As beacuse already multiple SH are there in the cust master of SP, so you can change the SH at Item level for some items.
    Select the Item, go to item details, in the partner tab you can change the Ship-to-party (remember you can not add here one more SH ).

  • Ship to party at line item using BAPI_BUSPROCESSND_CREATEMULTI

    Hi all,
    I am using BAPI_BUSPROCESSND_CREATEMULTI to create a sales order in CRM. The sales order is successfully generated in CRM.
    I am inputting Sold to party, Ship to part, bill to and payer at header level. I am also inputting different ship to party for each line item.
    But when i create the order, i observe that every line item is having the same ship to party that i provide for order header. i.e ship to party at header is being copied to each line item...but i dont want that to happen..i want to give a different ship to party at each line item.
    I used the crm_order_read report to find out how partner table is filled and incorporated the same in my code....
    still i am unable to populate different ship to party at line item level
    here is my code...i had been trying to figure this out since 3 weeks and i am unable to find out why i am unable to put different ship to party for each line ite m.....
    some one please help me if they encountered this earlier...
    kindly help..this is my sample code
    Ship to at header level
    ls_logical_key-ref_partner_handle        =       '0002'.
          clear ls_input_fields.
          ls_input_fields-ref_guid                 =         lv_guid_h.
          ls_input_fields-ref_handle               =         lv_handle_h.
          ls_input_fields-ref_kind                 =         gc_object_ref_kind-orderadm_h.
          ls_input_fields-objectname               =         gc_object_name-partner.
          ls_input_fields-logical_key              =         ls_logical_key.
    _set_field         ls_partner           REF_GUID                   lv_guid_h.
    _set_field         ls_partner           REF_KIND                   'A'.
    _set_field         ls_partner           KIND_OF_ENTRY              'C'.
    _set_field         ls_partner           PARTNER_FCT                '00000002'.
    _set_field         ls_partner           PARTNER_NO        wa_header-SHIP_TO .                 
    _set_field         ls_partner           NO_TYPE                    'BP'.
    _set_field         ls_partner           DISPLAY_TYPE               'BP'.
    _set_field         ls_partner           MAINPARTNER                 'X'.
    move-corresponding ls_partner to ls_logical_key.
    append ls_partner to lt_partner.
    Ship to at item level
    ls_logical_key-ref_partner_handle        =       '0002'.
          clear ls_input_fields.
          ls_input_fields-ref_guid                 =         lv_guid_i.
          ls_input_fields-ref_handle               =         lv_handle_i.
          ls_input_fields-ref_kind                 =         gc_object_ref_kind-orderadm_i.
          ls_input_fields-objectname               =         gc_object_name-partner.
          ls_input_fields-logical_key              =         ls_logical_key.
    _set_field         ls_partner           REF_GUID                   lv_guid_i.
    _set_field         ls_partner           REF_KIND                   'B'.
    _set_field         ls_partner           KIND_OF_ENTRY              'C'.
    _set_field         ls_partner           PARTNER_FCT                '00000002'.
    _set_field         ls_partner           PARTNER_NO         wa_item-SHIP_TO .      
    _set_field         ls_partner           NO_TYPE                    'BP'.
    _set_field         ls_partner           DISPLAY_TYPE               'BP'.
    _set_field         ls_partner           MAINPARTNER                 ' '.
    Some one please help me and tell me what i am missing...
    regards,
    Jessica Sam
    Edited by: jessica sam on May 10, 2009 10:52 PM
    Edited by: jessica sam on May 10, 2009 10:52 PM
    Edited by: jessica sam on May 10, 2009 10:53 PM
    Edited by: jessica sam on May 10, 2009 10:54 PM

    I know how to trace the Ship to party at line item. When i create an order manually on CRM then the table CRMD_PARTNER has the required entries and the Ship to party at line item is getting populated correctly. Also if i open the order in CRMD_ORDER the ship pto party are being populated correctly at line item..
    But if i am trying to replicate this programatcally using the BAPI, i see that the ship to at header is being copied to each line item and this is not what is expected.
    If i go and check in the CRMD_PARTNER the data is not filled
    correctly as I dont have any ship to party at line item
    So finally I even tried to insert the data manually in the CRMD_PARTNER table using an
    INSERT statement and even that doesnt work...
    https://www.sdn.sap.com/irj/scn/forums
    So i am unable to ficgure out what is going wrong
    Any body if they have any idea on poulating ship to party programatically in
    sales order for each line item please help
    I am unable to figure out how to fill PArtner table of this BAPI to populate ship to at line item level
    Kindly Help..
    Regards,
    Jessica Sam

  • One sales order with number of Ship to party??

    hi Experts
                   one customer has  10 plant . Customer give 10 PO from 10 plant to client . now my client want to create one sales order for for that customer and delivery goes to respective 10 plants (ship to party) for that customer
    and
    same customer can give single PO to my client but inform delivery has to place for 10 ship to party
    is it possible ???
    we can give one ship to party but can we put multiple ???
    thanks in advance

    Hi Hanumant
    Answer for you first question is,
    you can achieve this by creating individual sales order wherein ship-to party at header level is used for delivering the line items. this is standard process.
    Answer for your second question is,
    This is possible by assigning multiple ship-to parties at item level. Means you can have/assign different ship-to parties for each line item of the sales document manually provided you should have assigned all the ship-to parties in the customer master data first.
    You can create each plant as a ship-to party and assign them to a main sold-to party customer master.
    so whenever you create delivery for this sales order the deliveries would be split since different ship-to parties and you can deliver to different plants.
    Hope this helps you to understand.
    Regards
    Rajkumar K

  • Modification of the ship to address in the sales order at item level

    SAP ECC6
    Sales order. Transaction code VA01/VA02
    Creation/modification of the ship to address at item level/Allowed by SAP when sold to ≠ ship to/Impossible when
    sold to = ship to
    Hello All,
    I would like to set up an enhancement on the sales order.
    > What we want : we want to have the possibility to modify the ship to party address at item level. Indeed, we sometimes make slight modifications to address, such as adding the words "to the attention of"
    > What we don’t want : create a new ship to, to take into account the address modification or manage this modification in an item text
    > What SAP allows : At item level (as at header level) SAP allows you to modifiy the ship to address when the sold to ≠ ship to. BUT, SAP forbids the modification of the ship to address when the sold to = ship to
    Is there a means on the customizing to authorize these modification address at item level each time the sold to = ship to ?
    Many thanx
    Best regards
    Vincent

    sold to party=ship to party
    goto item and tab partner
    select partner function ship to party, again enter same code and press enter
    now see item partner automaticlly selcted.
    now double click on ship to party and change addrss etc accordingly.
    Hii Vincent,
    It is possible to change address of shipt to party at item level and it doest matter if sold to part & ship to party are same or different at header level.
    Please see above images.
    All you have to do is to select ship to party again in item tab-partners and enter code.
    Please check item you are using is activated for business data.
    Regards,
    Nouman

  • One ship to party multiple delivery points

    senario: customer has two retail stores store A in city x and store B in city Y,how to add two different unloading points to the cmr and how the system picks the unloading point where to specify the unloading point for a particular specially if the customer has more than one unloading points and also Q2- we have one  sold to party and 3 ship to parties how to split a single order so that we can ship it to 3 different parties please guide me

    Hello,
    You have mentioned one ship to party and two delivery points.  I think there is small mistake in your sentence.
    Is it One sold to party and two delivery points (Ship to Locations)? If yes, Follow below.
    1. Create one sold party (who is actually a customer who owns the two retail outlets in two different cities)
    2. Create One Ship to Party - A for City X Delivery Point and Maintain the appropriate Unloading point as per the customer req.
    3. Create one more ship to party - B for City Y Delivery point and Maintain the appropriate Unloading point as per the customer req.
    4. Goto XD02 and Enter the Sold to Party and Link the Two Ship to Parties (A and B) to the Sold to party.
    During Order creation for the sold to Party, the System will give you the pop-up to select the right ship to party for a sale transaction.
    *Second Question on Delivery split for all the three shipto Parties:*
    As and when the sales order contains the Multiple Items to deliver to the Multiple shipto's. You need to maintain the different shipto parties at the sales order Item level - Partners and Maintan the right shipto number per each Item.
    When you create the delivery, Automatically the split happens for each Item per each shipto party. This is a standard functionality.
    Note that: whenever the system finds the below changes in sales order item level, the delivery will split automatically.
    Shipping point, delivery date, ship to party, route.
    Hope it helps. Let me know if not.
    Thanks,
    Ram.
    Edited by: murari ramkrishna on Apr 26, 2010 12:00 PM

Maybe you are looking for

  • RE.Can We do (MIGO) Batch No based Logistics Invoice Verification(MIRO)

    Dear All While doing invoice verification reference to MIGO Doc. we are not able to see Vendor Batch No field in MIRO Screens. I.e Item No. 10  100No's as per DC/Invoice Received stores were Accepted. But in Production QC Accepted 80 No's 20 Rejected

  • ListView please help me.

    Hi all java gurus... i'm working with an WYSIWYG editor and now i would like to implement HTML list (ordered & unordered) in such way that i can insert in my document.... Can someone tell me where can i find some code example to realize it??? or a sn

  • [Flash Builder 4.6] encounters "FlashBuilder.exe has stop working"

    We encounters "FlashBuilder.exe has stop working" error messages during editing or build code Please help, thanks. Windows Edition: Windows Server 2008 Enterprise Service Pack 1 Processor: 4 Processors      Memory: 16GB        System type: 32-bit OS

  • If I have a second generation touch, is it compatible with the latest iTunes?

    Okay ~ let me start by saying I am NO iPod expert, or anything even close . I have figured out I have a second generation touch that I haven't used in years. My son now wants to start listneing to music so I thought I would give him my iPod. I downlo

  • SATA settings, 865PE Neo-3 LGA 775

    Okay, I'm trying to set up a friends computer and I can't get the darn thing to start working.  Everything's powered correctly and all that.  I seem to remember (when setting up a the same mobo a year or so ago) that I had to adjust some settings in