Line item is getting Switched in OBD, created with ref to PO

I have created a PO# 4500189441.
In that PO there are two line items as below:
Line item# 10              C792X1CG                         280
Line item# 20              X792X1MG                         160
But when we create an OBD with ref to this PO in VL10D, line item are getting switched as below:
In OBD# 89490798,
Line item# 10        
X792X1MG                        
160
Line item# 20      
  C792X1CG                       
280
Can you please let us know the reason behind it or is there any configuration for this?
Thanks & Regards,
Tanmay Mondal
SAP SD Consultant

Hi Tanmay,
First Check the Delivery type configuration in the Logistic Execution ---Delivery Type IMG path
Your Delivery type should have Item Requirement as '202' and check the Default Order type assigned to it.
Next go to the Specify Copy Control for Deliveries-----In that select the copy control from the Default sales doc. type which is assigned to the delivery type and the Delivery type which you are Using
Select and in the Item Data click on the delivery item category which is assigned to the delivery type.
In the details of the selection check the Item Data in the Data Transfer Block.
The routine assigned to it should be '202'
This will Solve your Issue.
Regards

Similar Messages

  • Line item data is not saving while creating a Sales order using Interactive

    Hi all,
    I am creating a sales order Using Interactive forms. In the form i am having Header data and line item data.I had created two structures one for Header data and one for Line item data. For entering  the LINE ITEM DATA i had created a Dynamic table with Buttons ADD ROW and DELETE ROW.
    User will Add the Row or Delete the Row based on the requirement.
    My issue is When ever the user clicks the SUBMIT button after entering the header data and 3 line items data , Sales order has been created with only first line item and the remaining two line items are not created.
    My Interactive form is like below
    HEADER DATA
    DOC_TYPE
    SALES_ORG
    DIST_CHN
    DIVISION
    PURCH_NO
    PARTN_ROLE
    PART_NO
    LINE ITEM DATA
                             ITEM_NO      MATERIAL          PLANT          QTY        COND_TYPE            COND_VALUE
    ADD ROW
    DELETE ROW
                                                                                    SUBMIT
    My  code for the method ONACTIONCLICK is like below
    method ONACTIONCLICK .
    data:
          Node_Adobe       type ref to If_Wd_Context_Node,
          Node_Zsaleheader       type ref to If_Wd_Context_Node,
          Elem_Zsaleheader       type ref to If_Wd_Context_Element,
          Stru_Zsaleheader       type If_Main=>Element_Zsaleheader,
          Node_Zsaleitem       type ref to If_Wd_Context_Node,
          Elem_Zsaleitem       type ref to If_Wd_Context_Element,
          Stru_Zsaleitem       type If_Main=>Element_Zsaleitem.
      data: header_data type BAPISDHEAD.
      data: item_wa type BAPIITEMIN.
      data: item_data type table of BAPIITEMIN.
      data: partner_wa type BAPIPARTNR.
      data: partner_data type table of BAPIPARTNR.
      data: sales_order type BAPIVBELN-VBELN.
      data: Errorlog type BAPIRETURN1.
    navigate from <CONTEXT> to <ADOBE> via lead selection
      Node_Adobe = wd_Context->get_Child_Node( Name = IF_MAIN=>wdctx_Adobe ).
    navigate from <ADOBE> to <Zsaleheader> via lead selection
      Node_Zsaleheader = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleheader ).
      Node_Zsaleitem = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleitem ).
    get element via lead selection
      Elem_Zsaleheader = Node_Zsaleheader->get_Element(  ).
      Elem_Zsaleitem = Node_Zsaleitem->get_Element(  ).
    get all declared attributes
      Elem_Zsaleheader->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleheader ).
      header_data-DOC_TYPE = Stru_Zsaleheader-DOC_TYPE.
      header_data-SALES_ORG = Stru_Zsaleheader-SALES_ORG.
      header_data-DISTR_CHAN   = Stru_Zsaleheader-DISTR_CHAN.
      header_data-DIVISION = Stru_Zsaleheader-DIVISION.
      header_data-PURCH_NO = Stru_Zsaleheader-PURCH_NO.
      partner_wa-PARTN_ROLE   = Stru_Zsaleheader-PARTN_ROLE.
      partner_wa-PARTN_NUMB = Stru_Zsaleheader-PARTN_NUMB.
       append partner_wa to partner_data.
        Elem_Zsaleitem->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleitem ).
      item_wa-ITM_NUMBER = Stru_Zsaleitem-ITM_NUMBER.
      item_wa-MATERIAL   = Stru_Zsaleitem-MATERIAL.
      item_wa-PLANT = Stru_Zsaleitem-PLANT.
      item_wa-REQ_QTY = Stru_Zsaleitem-REQ_QTY.
      item_wa-COND_TYPE   = Stru_Zsaleitem-COND_TYPE.
      item_wa-COND_VALUE = Stru_Zsaleitem-COND_VALUE.
      append item_wa to item_data.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = header_data
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT             = sales_order
      SOLD_TO_PARTY             =
      SHIP_TO_PARTY             =
      BILLING_PARTY             =
       RETURN                    = errorlog
      TABLES
        ORDER_ITEMS_IN            = item_data
        ORDER_PARTNERS            = partner_data
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =
    endmethod.
    PLEASE SUGGEST ME IF ANY CODE CHANGE IS REQUIRED
    Thanks in advance
    Ajay

    Hi,
    The item data is not read because, the dynamically added rows should also reflect back to the Web Dynpro context. When the user clicks on Add Row, use the Onsubmit event to add a empty line to internal table and then bind it to the context. And if the user removes a row, remove a row from internal table and bind it back to the context.
    You may refer this article.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • SCs line items are getting splitted into different POs.

    Hi Experts,
    I am using SRM 5.0 (EBP4.0) ECS.
    When operational purchaser is doing carry out sourcing then SC line items are getting splitted into different POs whereas all the criteria are same I mean all the SC line items are having same
    1.Purcg.Grp
    2.Purch.Org.
    3.Company Code
    4.Plant/Location
    5.Vendor (Preferred)
    6.All product Cat.are assigned to one system only.
    (In BBP_PD for the SC I dont see any reason for the split)
    7.Using Intended for Gouping Option also at the time of Carry out sourcing.
    Earlier also I have raised the same question but I didnt get any reply, only some hints and other reference and help bu Yann but I am still facing the same issue and Pls help me if there is any OSS note for it .
    Here I'd like to let you know that I have seen same ticket and checked all the possible cause for split but never find any reason for split in this case.Pls help me on this issue urgently.
    Brgds
    Gopesh

    Hi
    As Yann told, there might be some standard BADIs for which we need to either modify the standard code in this case.
    Has SAP replied on this problem with any comments - on your OSS message yet ?
    <u>As far as I know, the following BADIs are some how, involved in the creation of the Local SRM PO. </u> 
    <b>BBP_ECS_PO_OUT_BADI </b>
    ( ECS: PO Transfer to Logistics Backend                  )
    <b>BBP_EXTLOCALPO_BADI </b>
    ( Control Extended Classic Scenario                   )
    <b>BBP_GROUP_LOC_PO   </b> 
    ( Exit Grouping of Items for Local Purchase Orders    )
    Please send me your detailed requirements at my email id for further analysis.
    [email protected]
    Hope this will help.
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • Function module to get Service Order details created with a Sales Order

    Hi,
    Could anyone tell me if there is any function module to get the details of the Service order that is created automatically for a line item in a sales order. Let me explain my requirement clearly.
    When a sales order is created with specific line item, a service order is automatically created for that line item. I need to get the information about the associated service order. I can't find this information in VBAK, VBAP or VBEP tables obviously. But, i can see the link between the service order created and related Sales document # and item #  in the DB view  CAUFV. But, the key field here is Service order #. But my requirement is to get the service order details from the key field of Sales document.
    I tested the FM SD_SALES_DOCUMENT_READ_POS that reads the sales document header and item material tables, but this doesn't help me in getting the service order details associated with the material line item.
    Your early response is greatly appreciated.
    Thanks in advance,
    venu

    Hi Akshay,
    I actually saw this , but surprisingly, there is nothing stored in this field in either of the tables VBAK or VBAP. I mean, even for the sales orders which have associated service orders, nothing is stored in either of the above tables.
    Can you please tell me if there is anyother way.
    Thank you,
    venu

  • PO item level validation if create with ref to contract

    Hi
    Pl help me to fulfill the following client requirement:
    When user create the PO with ref to contract , system fetch the all data from the contract to PO at line item level, but in the PO, user is able to change the contract line item rate.
    Now contract line item rate is already fixed with vendor & PO creator should not allowed change this rate.
    Could you provide the any standard configuaration or development to restric the user to chage the PO line item rate if created with ref to contract
    Pl give me replay as soon as possible as it is very urgent
    Rgds
    Nishit

    Hi,
    First you have to create a separate document type which is to be used for creation of PO referring a contract . Than define functional authorisation to buyers going by the menupath -Materials management > Purchasing > Authorisation management > Define function authorisations for buyers-Function Authorizations: Purchase Order. Here enter the field selection key of the new PO document type you created . Than check the box "Display Prices" . Uncheck all other boxes .You can check reference to Contract against possible reference Objects. Than save . Than in the User id enter the User parameter EFB and allocate the aparameter to the user . Also remove other document types of POs except the newly created document type in user authorisations. This will prevent change of price field in the specific document type.
    Dhruba

  • Excise capture not possible if GR is created with ref to STO

    Hello
    We are created the STO with two step, created the delivery and goods issue and afterwords created the Billing.
    Now we are created the GR with ref to Outbound delivery, then system will copy the Outbound delivery number in Delivery note field. so it means that the perticular GR is created with erf to outbound delivery.
    if suppose in same cases stores person created the GR with ref to STO (forget to give outbound delivery) then system is allow us to do the GR, now the Delivery Note number is option one..we can enter any value or number.  after this while capture of excise with ref to GR the system will not allow us to take CENVAT. how to solve this.
    How to get the perticular GR is created with ref to delivery or Not.(suppose if choosen is Outbound delivery then Ref number in MKPF is Outbound delivery, if suppose i select the GR with ref to STO then in same delivery number i will enter in Delivery note field, then also MKPF shows same outbound delivery,  how to get this perticular delivery is created with ref delivery or STO.
    Reason: Most of the STO are there, here stores person created the GR with ref to STO (he should select outbound delivery but he is not selected), now system is not allow us to take CENVAT, how to do , Business they are not ready to reverse the GR bcz the stock is already cosnsumed.
    Regards
    sapman man

    Hi
    When you do GR against the outbound delivery at  the recieving plant the system will Pick up the excise duties from the Excise invoice/commercial Invoice  created at the supplying plant.In STO there is no provision to input the Excise duty.
    The same  has happened in your case ,when u are tryin to make GR against STO ,the system fails to fetch the excise data as no excise data is available in Stock transport order
    Comming to your second query of what has to be done to previously made GR against STO,follow the steps
    1) Go to J1IH -additional Excise
    2) Input Material docuemtn,Plant ,Excise group 
    4) enter the material code ,Duty amount ,quantity ,Chapter ID
    3) Post the document
    The entries passed in the above case will be through excise transaction type DIEX which will be clearly visible in J2I9
    Regards
    Sandeep
    Edited by: sandeep13 on Oct 23, 2009 3:03 PM

  • Can a contract be created with ref to PO,bid inv and bid

    hi friends
    we know that po can refer to a contract , can a contract be created with ref to po, bid inv and bid
    Regards
    Vinny

    Vinny,
    PO can be created with reference to a bid (Response of a Bid Invitation). Even contracts is also possible here.
    Then ragarding can a contract be created with ref to po -> No.....
    Regards
    Kathirvel

  • Freight line item not getting created in Invoice

    Hi,
    We are using Inbound IDOC to create invoice with freight line items in it, The message type used is INVOIC and the standard inbound function module is IDOC_INPUT_INVOIC_MRM, The invoice which is getting created does not hold the freight line item in it. Actually we hope the indicator Goods Item/Delivery costs/Both which is present in the invoice (RM08M-XWARE_BNK) determines the creation of freight items or not. In our case the invoice is getting created with the indicator value as 1 but we hope the value 3 would be required for frieght items.
    Please let me know if the above message type and the standard function module would be able to handle the creation of frieght line items or we need to look for some other option.
    Regards,
    Prabaharan.G

    Hi Prabaharan,
    i have the same request for posting planed freight costs with the IDOC.
    Do you have a solution or workaround meantime ?
    Thanks and best regars,
    Roman Zimola

  • Line Items are getting rejected in Sales Orders

    Hi,
    I am creating sales orders using ORDERS Message type and for this I am using the Standard SAP Inbound Function Module to create sales orders.
    Idocs are getting processed successfully and sales orders are getting created, but line items in the sales order are getting rejected and hey are getting rejected with reason for rejection to be <b> No Availability Lost</b>.
    So, I would like to know if this is a problem with the data furnished in the Idoc or else any custom setting have to be maintained or not?
    Raghuram

    The reason why they are failing is because in the user exit as per the logic present here whenever a EDI Order with customer Purchaser Order Type DFUE is to be processed ABGRU (Reason for Rejection) has been flagged equal to 01 and hence order item lines are having rejection reason.

  • PR to PO conversion error - Partial line items not getting converted

    Hi All,
    Automatic PR to PO conversion ( ME59N ) is not happening for few line items.
    For the same Article,site, vendor combinations,its getting converted on few days and on few days its not.
    No changes were made to the any.
    1. Source List is created for the Article & Vendor combination. Validity is fine. Fixed vendor option is checked.
    2. Info record is maintained.
    3. Auto PO option is checked in Vendor Master
    4. No release Strategy
    Will the Purchase Group have any impact in the conversion?
    Kindly share your views.
    Thanks in adance.
    Regards,
    Bhaskar

    It's going to be a data selection problem.  If it was a problem with conversion you would see something recorded in the log (assuming you have the log parameter set to show all messages).
    Make sure the Auto PO flags are set in the correct purchasing org and site.  Does your requisition have a purcahsing org?
    What selection critera do you have set in ME59N?  You mention that that the problem only occurs on certain days so it could be related to the release date.
    The only other thing I could suggest is authorisation checks.  Are you approved for the correct activity types (the activity for ME59N is not create) , plants, purchasing groups etc.
    Also keep in mind everything I have said may not be relevant to the IS-Retail solution you are using.  I can't be certain if there are any differences in this area when you are running that solution.  It might be worth asking the question in that forum http://scn.sap.com/community/retail

  • PO line item not getting invoiced...

    Hi SAP Gurus,
       I am facing one problem.PO has been processed successfully but invoice is not getting generated for one of the line item.Can you guide me in this issue ?

    Hi,
    You may be trying to create the invoice without doing the Good Receipt for that line item.
    Rgds,
    SAP Friend

  • STPO 2nd line item not getting shipping tab

    Hi All,
    We have a issue with STP0, user created the STP0( different company code) with 3 line items of same materials.  The first line items shipping tab is appering but second & third line items are not getting the shipping tab in item detail
    Please help me to resolve the issue.
    Thanks and Regards
    Chandrashekar.R

    Hi,
    Thanks for your update,
    First line item and second line item materials are same.  i have checked the sales views for the supply plant.
    Regards
    Chandrashekar.R

  • Sales Orders line item quantity getting Zero after free good line item

    Hi experts,
    i am creating sales order using BAPI  BAPI_SALESORDER_CREATEFROMDAT2   sales order having some free goods material  and line item after free goods line item having quantity zero.
    for example A B are  materials, A having free goods a1.  when SO  having 3 line items 10 for A ,line item  20 for a1 and line item 30 for B . But line item 30 having quantity zero.
    find code below and advice .
    lwa_ord_head_in-doc_type       = 'ZSO'.
        lwa_ord_head_in-sales_org      = '1000'.
        lwa_ord_head_in-distr_chan     = '10'.
        lwa_ord_head_in-division       = '10'.
        lwa_ord_head_in-req_date_h     = lwa_rof_s-date_del.
    *Order Header Update
        lwa_ord_head_inx-doc_type       = 'X'.
        lwa_ord_head_inx-sales_org      = 'X'.
        lwa_ord_head_inx-distr_chan     = 'X'.
        lwa_ord_head_inx-division       = 'X'.
        lwa_ord_head_inx-req_date_h     = 'X'.
        lwa_ord_partners-partn_role  =  'AG'.
        lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
        APPEND lwa_ord_partners TO lt_ord_partners.
        IF lwa_rof_s-del_addr IS INITIAL.
          lwa_ord_partners-partn_role  =  'WE'.
          lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
          APPEND lwa_ord_partners TO lt_ord_partners.
        ELSE.
          lwa_ord_partners-partn_role  =  'WE'.
          lwa_ord_partners-partn_numb  =  lwa_rof_s-lease.
          APPEND lwa_ord_partners TO lt_ord_partners.
        ENDIF.
        lt_rof_it_t = lwa_rof_s-zsd_rof_it_t.
        LOOP AT  lt_rof_it_t INTO lwa_rof_it_s.
          lwa_ord_items_in-material = lwa_rof_it_s-matnr.
          lwa_ord_items_in-plant = lwa_rof_s-plant.
          lwa_ord_items_in-target_qty = lwa_rof_it_s-qty.
          lwa_ord_items_in-comp_quant = lwa_rof_it_s-qty. "added on 12/29
         lwa_ord_items_in-target_qu = 'EA'.
         lwa_ord_items_in-t_unit_iso = 'EA'.
          APPEND lwa_ord_items_in TO lt_ord_items_in.
          lwa_ord_items_inx-material = 'X'.
          lwa_ord_items_inx-plant = 'X'.
          lwa_ord_items_inx-target_qty = 'X'.
          lwa_ord_items_inx-comp_quant = 'X'.
         lwa_ord_items_inx-target_qu = 'X'.
         lwa_ord_items_inx-t_unit_iso = 'X'.
          lwa_ord_items_inx-updateflag = 'I'. "'U'
          APPEND lwa_ord_items_inx TO lt_ord_items_inx.
         ** Schedule Line Information
          lwa_schedule_lines-itm_number = '000010'.
         lwa_schedule_lines-sched_line = '0003'.
          lwa_schedule_lines-sched_line = 'X'.
          lwa_schedule_lines-req_date   = lwa_rof_s-date_del.
          lwa_schedule_lines-date_type  = '1'.
          lwa_schedule_lines-req_qty    = lwa_rof_it_s-qty.
          APPEND lwa_schedule_lines TO lt_schedule_lines.
         lwa_schedule_lines_x-itm_number = '000010'.
         lwa_schedule_lines_x-sched_line = '0003'.
          lwa_schedule_lines_x-updateflag = 'I'.
          lwa_schedule_lines_x-sched_line = 'X'.
          lwa_schedule_lines_x-req_date   = 'X'.
          lwa_schedule_lines_x-date_type  = 'X'.
          lwa_schedule_lines_x-req_qty    = 'X'.
          APPEND lwa_schedule_lines_x TO lt_schedule_lines_x.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
      SALESDOCUMENTIN               =
            order_header_in               = lwa_ord_head_in
            order_header_inx              = lwa_ord_head_inx
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
       IMPORTING
         salesdocument                 = lwa_saledocu
       TABLES
         return                        = lt_return
         order_items_in                = lt_ord_items_in
         order_items_inx               = lt_ord_items_inx
         order_partners                = lt_ord_partners
         order_schedules_in            = lt_schedule_lines
         order_schedules_inx           = lt_schedule_lines_x
      ORDER_CONDITIONS_IN           =
      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              =
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

    Hi experts,
    I am still waiting for your response......
    Thanks in advance
    Deepanker

  • Line item Settlement and KOB5 for automatically created AUCs to PM orders

    Hello Experts,
    I am trying to set up line item settlement for automatically created AUCs. We would like to use line item settlement because we want to see the costs split up by either percentage or amount when settled to the AUC.  If I can't settle by percentage or amount to the AUC then i'd like to be able to temporarily block some of the costs from settling.  This is for billing not capitalization purposes since all costs will eventually settle to one final asset. The settlement is done using transaction KO88 or KO8G and automatic processing type.  I’ve configured a PM Order type as an investment order and set up the related investment profile and investment asset class.  Some of the things I've determined from my testing:
    Using transaction KOB5, costs can be split up by creating other distribution rules, but only to another object (i.e. another
    asset, order, cost center etc. by using the Preliminary) not to the automatically created AUC linked to the order
    The default settlement rule is account assignment category FXA, percentage rate 100%, settlement type AUC to the AUC
    and therefore cannot be updated/altered when using KOB5 or any other transaction.
    Once the costs are settled to another object other than the AUC, those costs cannot be settled to the final asset. Creating Preliminary
    settlement rules to a receiver IO and changing the period or fiscal year will not “block” costs from settling whether the processing type is automatic, by period, partial capitalization or full settlement.
    I’ve been testing this out in our development client and need verification that this is the way that transaction KOB5 works with line item settlement or did I do something incorrect . 
    Your feedback is greatly appreciated.  Thank you in advance.

    Hi Zaid,
    Thank you for your response.  Assets are not my area so I’m not sure if I missed a transaction or step in the process.   I tested this out by doing the following steps:
    Created AUC Asset class with line item checked
    Assigned PM Order type as non-investment with no investment profile and created order number
    Created a main asset number 
    Created an AUC sub asset number to step 3
    Created settlement rule to sub asset number on order
    Posted costs to order
    Settled from order to AUC with transaction KO88
    Created distribution rules for asset with transaction AIAB
    Settled from sub asset to main asset number with transaction AIBU
    When I settled from the sub to the main asset number in step 9, I found I lost the line item detail.  Is there another configuration setting I need to make to allow me to see the line item detail when I use AIBU?
    Thank you,

  • "The Customer line items not getting cleared through F-28"

    Hi,
    There are 4 line items when going into option FBL5N . However, payment has been received, and when going into option F-28 to post the payment, only 2 of the 4 lines appear, and the full payment cannot be allocated. Please advise why all 4 lines do not appear.
    Regards
    Harish Madhavan

    Hi,
    Thanks a lot for the prompt response.
    I have checked that, any other settings which I can check.
    Thanks
    Regards
    Harish

Maybe you are looking for