Selectively Ship only few lines in a Sales Order - 11i

Hello,
How do I ship only some lines in a Sales order and not all using API? I am able to do this using STF(Shipping Trax Form).Below is the snippet I have written but it always ends up shipping entire order. What am I missing? Please advise.
This is on 11i
changed_attributes (1).delivery_detail_id := 1234
changed_attributes (1).shipped_quantity := 0
changed_attributes (x).source_line_id := 12344
changed_attributes (2).delivery_detail_id := 1235
changed_attributes (2).shipped_quantity := 66
changed_attributes (2).source_line_id := 12346
changed_attributes (x).attribute4 := p_freight;
         changed_attributes (x).attribute5 := p_accessory;
         changed_attributes (x).attribute6 := p_othercost;
         changed_attributes (x).tracking_number := p_waybill;
--Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
         wsh_delivery_details_pub.update_shipping_attributes
                                  (p_api_version_number      => 1.0,
                                   p_init_msg_list           => init_msg_list,
                                   p_commit                  => p_commit,
                                   x_return_status           => x_return_status,
                                   x_msg_count               => x_msg_count,
                                   x_msg_data                => x_msg_data,
                                   p_changed_attributes      => changed_attributes,
                                   p_source_code             => source_code
         COMMIT;
         in_delivery_id := i.delivery_id;
         in_delivery_name := i.NAME;
         IF (x_return_status <> wsh_util_core.g_ret_sts_success)
         THEN
            INSERT INTO LOGFILE
                        (step_id, descr
                 VALUES (1.6, 'delivery attr'
            COMMIT;
            RAISE fail_api;
         END IF;
       end if; 
      END LOOP;
      wsh_deliveries_pub.delivery_action
                            (p_api_version_number        => 1.0,
                             p_init_msg_list             => init_msg_list,
                             x_return_status             => x_return_status,
                             x_msg_count                 => x_msg_count,
                             x_msg_data                  => x_msg_data,
                             p_action_code               => p_action_code,
                             p_delivery_id               => in_delivery_id,
                             p_delivery_name             => in_delivery_name,
                             p_asg_trip_id               => NULL,
                             p_asg_trip_name             => p_asg_trip_name,
                             p_asg_pickup_stop_id        => p_asg_pickup_stop_id,
                             p_asg_pickup_loc_id         => p_asg_pickup_loc_id,
                             p_asg_pickup_loc_code       => p_asg_pickup_loc_code,
                             p_asg_pickup_arr_date       => p_asg_pickup_arr_date,
                             p_asg_pickup_dep_date       => p_asg_pickup_dep_date,
                             p_asg_dropoff_stop_id       => p_asg_dropoff_stop_id,
                             p_asg_dropoff_loc_id        => p_asg_dropoff_loc_id,
                             p_asg_dropoff_loc_code      => p_asg_dropoff_loc_code,
                             p_asg_dropoff_arr_date      => p_asg_dropoff_arr_date,
                             p_asg_dropoff_dep_date      => p_asg_dropoff_dep_date,
                             p_sc_action_flag            => p_sc_action_flag,
                             p_sc_close_trip_flag        => p_sc_close_trip_flag,
                             p_sc_create_bol_flag        => p_sc_create_bol_flag,
                             p_sc_stage_del_flag         => p_sc_stage_del_flag,
                             p_sc_trip_ship_method       => p_sc_trip_ship_method,
                             p_sc_actual_dep_date        => p_sc_actual_dep_date,
                             p_sc_report_set_id          => p_sc_report_set_id,
                             p_sc_report_set_name        => p_sc_report_set_name,
                             p_wv_override_flag          => p_wv_override_flag,
                             x_trip_id                   => x_trip_id,
                             x_trip_name                 => x_trip_name
                            );

GETWA_NOT_ASSIGNED
Many threads are there on this error message and you would come to know if you google with this text.  Check couple of threads where  the same topic was discussed
[Re: GETWA_NOT_ASSIGNED|Re: GETWA_NOT_ASSIGNED;
[Re: GETWA_NOT_ASSIGNED ABAP Dump|GETWA_NOT_ASSIGNED ABAP Dump;
Also there are some 20 OSS notes on this error message and you can have a look at the following notes:-
1)   Note 913679 - VA01: Short Dump GETWA_NOT_ASSIGNED on click of quantity.
2)   Note 591955 - ABAP runtime error GETWA_NOT_ASSIGNED
3)   Note 870670 - SD_SALES_DOCU_MAINTAIN_DIALOG termination with GETWA_NOT_***
4)   Note 141314 - VA02: Dump with 'GETWA_NOT_ASSIGNED'
thanks
G. Lakshmipathi

Similar Messages

  • Selecting multiple lines in a sales order

    Hello documentation says we should be able to select multiple lines in a sales order (for example to cancel them or remove them). Yet we cannot select more than one. Shift and Ctrl do not seem to work.
    Any idea why this does not work ? We are running B1 2007A, patch 37.
    Thanks a lot
    Fabrice

    Hi Fabrice,
    if you have a sales order with hundreds of rows, use the 'Draw Document Wizard -> Customise' option to draw the required rows into the target document. Once all row data has been copied to the target, the row is greyed out in the sales order & can no longer be drawn. As long as the BP accepts partial deliveries, you may copy as much partial data to multiple target documents as necessary. Once you are finished with the sales order & there are rows still open, you may go to Data -> Close & hence close the entire document. There will be no need to delete the remaining rows.
    All the best,
    Kerstin

  • AR Invoice Presentation / Invoice Lines diff than Sales Order Lines

    Hi,
    Due to business rules I got the following requirement, I'd like to get advice or second opinions please:
    Instead of showing 200 lines we want to show 1 line in the invoice summarizing the job done.
    The requirement is:
    The invoice should summarize the Order Lines, meaning that we want to have different lines in the invoice than those in the orders composing the invoice. The total amounts must equal between both, the invoice and the orders lines been invoiced.
    For example:
    We need to create an Invoice for 2 Sales orders with 10 lines each, each line for $1 usd.
    The invoice could be in any of these situations:
    - Having only one line composing the 2 orders. The invoiced amount is $20.
    - Having 2 lines composing the 2 orders. The invoiced amount is $20 ($10 line 1, $10 line 2)
    The description on the invoice lines must be completly open.
    Internaly, the link/reference between the invoice line and the order line(s) composing it must be kept.
    This must work with 1 or more Sales Orders (partial or complete)
    Can be done via autoinvoice or not. (The user is able to compose and reference the invoice manually)
    ¿Is there already something done that I can use? Just point me on one direction and I'd be happy to investigate.
    I already have 1 or 2 ideas of how to achieve this without customizing at all.
    Just wanted to check and get advice and second opinions on this before taking a decision.
    Technical Spec:
    Oracle EBS 11i (11.5.10.2)
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Thanks in advance.
    Juan Alcocer

    seems to error
    APP-AR-11526
    ORA-28115
    seems the security policy is implemented at your database leval and check which ID you are using to insert the record.Check with your DBA, for security to resolve first for ORA-28115.
    Disabled in case if you have any custom triggers defined on RA_CUSTOMER_TRX_ALL.
    Few Documentation for ORA-28115
    ORA-28115 with EXEMPT ACCESS POLICY privilege
    A user USER1 has been granted select, insert, update, delete on all
    tables of an application schema (USER2) that uses row-level security.
    The RLS policies cover select, insert, update, and delete, and have check option enabled. USER1 has also been granted EXEMPT ACCESS POLICY system privilege.
    Each table in the USER2 schema has a trigger that causes insertion of
    a row into an audit table whenever DML is performed. When USER1 performs DML on a USER2 table, the operation fails with

  • Automatically add line-items to Sales order

    Hello,
    Our client needs us to add line items to sales orders. The requirement is such that, when the users enter a material on a line item, they wish to see few more materials automatically added as new line items -- item category to be maintained as "Free" items. This appears similar to automatically getting BOM-sub-items for materials which have BOMs maintained. The client is not willing to maintain BOMs for materials in question. They instead have asked us to maintain sub-item materials in a Z-table and then fetch those to populate the subsequent line-items on the sales order.
    So far, we have tried to fiddle around with the XVBAK and XVBAP internal tables in sales exit (MV45AFZZ) and also tried to use BAPI within the same exit. Both methods do not work.
    Could you please guide us ? Thank you.
    Regards,

    Hi,
    I think you can try with product proposal(Item Proposal). T.Code:VA51.
    Using this one can create list of items to be proposed at the time sales order processing.
    Item proposal contains list of items with or without default quantities those were frequently ordered by the customer. You can create any no of items in an Item proposal.Like wise you can create any no.of item proposals.
    But,You can assign only one item proposal per customer in sales tab of the CMR.So that when ever you are creating order for that customer you can access those materials which are listed in an Item proposal completely or selectively,with or without default quantities.
    The items which are proposed from an Item proposal are always changeable.
    Item proposal makes sales order processing simple and fast.
    Only the thing here is it will not automatically explode like in case of BOM.You have to manually select those items from an item proposal.
    Regards,
    Revan
    Edited by: REVAN on Dec 23, 2008 10:55 AM

  • Issue while updating(Changing) quantity on line at quick sales order form

    Hi,
    I am facing a issue while changing quantity ordered on the order line in quick sales order form. (R12.1.3)
    Although the same logic works exactly as required in 11.5.9.
    There is a custom logic, post booking line status is Awaiting Shipping.
    Now when quantity is changed +(Saved), the status changes to a custom state but at the same time a new row is created with the same line id but different reservation id in the MTL_RESERVATIONS.
    The quantity here is the difference between the original quantity and the new entered quantity.
    And post completion of the custom logic the original row is updated, but being there a additional row the quantity reserved at the shipping tab comes wrong.
    Our requirement is of update which is happening but not the additional insert which is going into MTL_RESERVATIONS.
    The logic is perfect in 11.5.9 and no additional insert is being made.
    Kindly help and give some ideas for the possible reason the issue.
    Please ask for more information if required.
    Thanks,
    Vishal

    Hi Mahendra,
    I have gone through the note id that you have given. sorry to say that, that is refering to diffrent issue.
    Actually what i did is, At form header level, I have hide the fileds using the folder options. once after changes I have closed the form and re-opened it. by that time I can see that Button names got changed in bottom of the "Quick sales order form". Not sure how it become changed. there five buttons over the form, only two button names got changed.
    Kindly suggest any other options.

  • How to get Characteristic Values assigned to the line item of Sales Order?

    Hi,
    I want to get the Characteristic Values( Variant Configuration )assigned to First Line Item of Sales Order.
    I was using the Fn. Mod.: VC_I_GET_CONFIGURATION_IBASE,
    this fn. mod. giving all the Characters but not the assigned characteristic values.
    Is there any other way to find characteristic values of sales order.
    Thanks,
    vinayak.
    Message was edited by: vinayaga sundaram

    For example, please see this example program.
    It lists the characteristic names, the values, and the description of the values which are tied to a sales document.
    report zrich_0001.
    * Internal Table for Characteristic Data
    data: begin of i_char occurs 0.
            include structure comw.
    data: end of i_char.
    data: xcabn type cabn.
    data: begin of xcawn,
          atwtb type cawnt-atwtb,
          end of xcawn.
    data: xvbap type vbap.
    parameters: p_vbeln type vbap-vbeln,
                p_posnr type vbap-posnr.
    start-of-selection.
      select single * from vbap into xvbap
                 where vbeln = p_vbeln
                   and posnr = p_posnr.
      clear i_char.  refresh i_char.
    * Retrieve Characteristics.
      call function 'CUD0_GET_VAL_FROM_INSTANCE'
           exporting
                instance           = xvbap-cuobj
           tables
                attributes         = i_char
           exceptions
                instance_not_found = 1.
      loop at i_char.
        clear xcabn.
        select single * from cabn into xcabn
                 where atinn = i_char-atinn.
        clear xcawn.
        select single cawnt~atwtb into xcawn
                   from cawn
                     inner join cawnt
                       on cawn~atinn = cawnt~atinn
                      and cawn~atzhl = cawnt~atzhl
                          where cawn~atinn = i_char-atinn
                            and cawn~atwrt = i_char-atwrt.
        write:/ xcabn-atnam, i_char-atwrt, xcawn-atwtb.
      endloop.
    Regards,
    RIch Heilman

  • Pick Release single line in a sales order

    Hi All,
    I want to pick release a single line from a sales order i.e if i have a sales order which has 3 lines and i want to pick release first line using Release Sales Order form of OM R12. I am giving the delivery detail id in Release Sales Order form, it is creating the concurrent request but it is not pick released. Please suggest what are the other parameters that has to be given so that i can pick release a single line of a sales order.
    Thanks and Regards,
    Mahesh

    Hi,
    Sorry for late reply. You have to use WSH_DELIVERY_DETAILS_GRP.delivery_detail_action.
    Script is as follows.
    DECLARE
    cursor lcu_det is
    SELECT released_status,
    organization_id,
    container_flag,
    source_code,
    lpn_id,
    CUSTOMER_ID,
    INVENTORY_ITEM_ID,
    SHIP_FROM_LOCATION_ID,
    SHIP_TO_LOCATION_ID,
    INTMED_SHIP_TO_LOCATION_ID,
    DATE_REQUESTED,
    DATE_SCHEDULED,
    SHIP_METHOD_CODE,
    CARRIER_ID,
    shipping_control,
    party_id,
    line_direction,
    source_line_id,
    move_order_line_id
    FROM wsh_delivery_details
    WHERE delivery_detail_id = 4369052;
    l_rec_attr_tab WSH_GLBL_VAR_STRCT_GRP.Delivery_Details_Attr_Tbl_Type;
    lr_action_prms WSH_GLBL_VAR_STRCT_GRP.dd_action_parameters_rec_type;
    lr_dummy_defaults WSH_GLBL_VAR_STRCT_GRP.dd_default_parameters_rec_type;
    v_msg_index_out NUMBER;
    x_msg_count NUMBER(10);
    x_return_status VARCHAR2(10);
    x_msg_data VARCHAR2(4000);
    x_action_out_rec WSH_GLBL_VAR_STRCT_GRP.dd_action_out_rec_type;
    BEGIN
    FND_GLOBAL.apps_initialize(1788,50577,660);
    lr_action_prms.caller := 'WSH_PUB';
    lr_action_prms.action_code := 'PICK-RELEASE';
    l_rec_attr_tab(1).delivery_detail_id := 4369052;
    open lcu_det;
    fetch lcU_det into
    l_rec_attr_tab(1).released_status,
    l_rec_attr_tab(1).organization_id,
    l_rec_attr_tab(1).container_flag,
    l_rec_attr_tab(1).source_code,
    l_rec_attr_tab(1).lpn_id,
    l_rec_attr_tab(1).CUSTOMER_ID,
    l_rec_attr_tab(1).INVENTORY_ITEM_ID,
    l_rec_attr_tab(1).SHIP_FROM_LOCATION_ID,
    l_rec_attr_tab(1).SHIP_TO_LOCATION_ID,
    l_rec_attr_tab(1).INTMED_SHIP_TO_LOCATION_ID,
    l_rec_attr_tab(1).DATE_REQUESTED,
    l_rec_attr_tab(1).DATE_SCHEDULED,
    l_rec_attr_tab(1).SHIP_METHOD_CODE,
    l_rec_attr_tab(1).CARRIER_ID,
    l_rec_attr_tab(1).shipping_control,
    l_rec_attr_tab(1).party_id,
    l_rec_attr_tab(1).line_direction,
    l_rec_attr_tab(1).source_line_id,
    l_rec_attr_tab(1).move_order_line_id;
    close lcu_det;
    WSH_DELIVERY_DETAILS_GRP.Delivery_Detail_Action(
    p_api_version_number => 1.0
    ,p_init_msg_list => FND_API.G_FALSE
    ,p_commit => FND_API.G_TRUE
    ,x_return_status => x_return_status
    ,x_msg_count => x_msg_count
    ,x_msg_data => x_msg_data
    ,p_rec_attr_tab => l_rec_attr_tab
    ,p_action_prms => lr_action_prms
    ,x_defaults => lr_dummy_defaults
    ,x_action_out_rec => x_action_out_rec);
    IF x_msg_count > 0 THEN
    FND_MSG_PUB.get (
    p_msg_index => 1
    ,p_encoded => 'T'
    ,p_data => x_msg_data
    ,p_msg_index_out => v_msg_index_out);
    IF x_return_status = 'S'
    THEN
    DBMS_OUTPUT.PUT_LINE(x_msg_data);
    END IF;
    END IF;
    END;
    Thanks and Regards,
    Mahesh

  • ASCP should plan production of all lines of a Sales Order in the same IO

    Requirement details:
    1) We are running an ECC plan in OPM environment (Constrained Classic)
    2) There are 20+ manufacturing plants – all are equally capable of manufacturing any item
    3) Sourcing rules define the sequence in which plants should be loaded (first plant X, go to plant Y when capacity in plant X is full. Go to plant Z when capacity in plant Y is full… and so on.)
    4) Sales Orders are entered in a fashion where 1 SO = 1 container.
    5) There are 5-20 lines per sales order (for items A, B, C, D etc). Together, these items constitute a full container load (FCL)
    6) The composition of this FCL will vary from one Sales Order to another (e.g., customer 1 takes items A,B,C; customer 2 takes A,B,D; customer 3 takes A,B,C,D)
    7) To avoid transfers between plants, all lines of one SO should be assigned to same plant for production – even if that means delaying the shipment. The container will be loaded in that plant itself – instead of transferring it to a distribution center.
    As per our understanding, ASCP does not support such a requirement. We attempted the following:
    1) Defined following profiles:
    MSC: Maximum number of planned orders per demand = 1
    MSO: Maximum Demands per Group = 1
    MSO: Maximum Demands per Slice = 1
    2) Defined Demand Priority Rules:
    Schedule Date – 1
    Sales Orders, Forecasts & MDS Entries Priority – 2
    3) If there are 10 SOs with the same Scheduled Ship Date, they were given Planning Priority as 1, 2, 3 … 10
    4) All lines of a sales order were assigned the same ship set.
    With all the above settings, we could not achieve our goal. Any suggestions from the ASCP Gurus?

    Hi Navneet,
    Thank you for your reply. To answer your queries:
    (1) We have a dummy inventory org mentioned as ship-from org in all SOs (calling it 'dummy' - as physically there is no such IO). This is done because the marketing team does not know from which IO material will be shipped (we do not have GOP in scope).
    (2) Sourcing rules mention that a demand in the dummy IO can be met by orgs X, Y, Z etc (each one with 100% allocation, ranks 1, 2, 3 etc). There are no sourcing rules for transfers between X, Y and Z.
    (3) The intent is to fulfill a SO from single org with none of the items internally sourced from other orgs.
    Regards,
    Parikshit

  • Adding Schedule lines to a sales order

    Friends,
      We have a requirement to clear the old un-delivered scheduled lines from a sales order and then add new schedule lines from a EXCEL file.  We were able to clear the old by putting in a new location.  Then, when we go to enter the new schedule lines, it clears the location, marks the Fixed date and Qty, and enters the delivery dates and confirmed quantities.  We tried using BAPI_SALESORDER_CHANGE, but the schedule_lines table only has the required quantity so when used it increases the order quantity, which is not good.  Is there any Function module that we can call to insert new schedule lines without increasing the order quantity other than using a BDC?  Thanks!

    Pasted below is the BAPI documentation for this parameter.
    "Check Table for Schedule Lines
    Description
    This parameter completes the following two tasks:
    Controls processing functions with the value in the UPDATEFLAG field (change indicator).
    The following entries are available:
    ' ':   Create new schedule lines
    I:     Create new schedule lines
    U:     Change existing schedule lines
    D:     Delete existing schedule lines
    Controls the field entry with check fields
    If the UPDATEFLAG field has been activated, the system only copies those fields to the data parameter that have been filled with 'X'."
    Nabheet

  • Maximum lines set on Sales Order view

    Hi All,
    This is happening with all sales orders with more than 8 items, where the rest of the items are not seen in the sale order after creation and save. For example 15 different type of material were sold to customer, the billing document view (VF03) showed all 15 line items, the delivery line items showed all 15 lines, but the sales order only showed the first 8 line items. The other last 7 items were not to be seen anywhere on the sales order.
    Is there a maximum view limit on sales orders? Anyone else has had a similar case?
    Thanks
    Sandip

    Hi Balaji,
    I tried to access SE51 but I have no authorization, and even though I maintain user accounts at my company I could not find more details in regards to this Tcode.
    I even tried to find some role associated with it but was unsuccessful.
    Hi Chandrasekhar,
    For the information in VOV8, the Display Range had 'UALL' in the field.
    And wierdly, when I clicked on the Item Overview, all items (15 different types) are shown, but when going back into the Sales Order View for the same order, only the first 8 are shown.
    The main problem here is that when doing a ZRE sales order, as we cannot do 'post goods receipt' for the 9th+n item.
    I appreciate the help.

  • Add Line Item In Sales Order VA01

    HI All,
    I  have new requirement in creation of sales order . Here we have free promotion sales . Here if customer buy one material then he will get some other material as free .In standard sap we can give only one line item as free not more than that .
    Here our requirement is more than one line item . I suggested them maintain all the free materials in one Ztable when ever the original material  will come for  sales order then i have to fetch these materials from ztable  automatically and it should create sales order. I started doing this using user exit  FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    These are the below links i checked in our sdn.
    Adding Line items to sales order on creation using User-Exit in VA01.
    Please give me some idea on this .
    Regards,
    Madhu.

    Hi Asik,
    Thanks for your reply.In my case i can not got for Bom  because the schemes will change for every ten days. I think Bom  creation will fill a lot of data but it wont solve my issue.
    Regards,
    Madhu.

  • Mrp run on no of line items in sale order

    hi all
    i have a sale order with o line items include.
    i want to run mrp on sale order only (not want to use MD50)
    can i use user exit for this task ? if so please advise which user exit i can use ?
    thanks

    Dear,
    Please refer this link,
    [Mrp run on no of line items in sale order|Re: MD50 issue]
    Regards,
    R.Brahmankar

  • Automatically add line-items to sales orders

    Hello,
    Our client needs us to add line items to sales orders. The requirement is such that, when the users enter a material on a line item, they wish to see few more materials automatically added as new line items -- item category to be maintained as "Free" items. This appears similar to automatically getting BOM-sub-items for materials which have BOMs maintained. The client is not willing to maintain BOMs for materials in question. They instead have asked us to maintain sub-item materials in a Z-table and then fetch those to populate the subsequent line-items on the sales order.
    So far, we have tried to fiddle around with the XVBAK and XVBAP internal tables in sales exit (MV45AFZZ) and also tried to use BAPI within the same exit. Both methods do not work.
    Could you please guide us ? Thank you.
    Regards,

    Ist method:
    Maintain one Ztable with the fields of Material and sub materials.
    write BDC to create order,before entering the material  number check if material is existed in Ztable or not.
    If it exist take that material and added as a another line item.
    if not exist create like normal line item.
    2 nd method:
    Ask your MM functional consultant to maintain supression of materials concept.

  • MRP RUN for the more than one line item in sales order.

    Hi ,
    In the sales order nuber of line item are , i will have to take MRP RUN for selected line item .
    So plz suggest what development will require?
    Abhay
    Edited by: abhay patil on May 30, 2008 8:52 AM

    HI,
    U can write separate prog. Which will ask sales order no. and from to line item or multiple line item of sale order. Then in loop internally pass the each line item no to MD50 prog. Which will run in background.
    I will give u sample prog. Which I had created for running MRP for all the lines items of given sales order in one go.
    *& Report  ZPRG_PP_001
    REPORT  ZPRG_PP_001.
    tables vbak.
    data: begin of it_vbap occurs 1,
            vbeln  type    vbap-vbeln,
            posnr  type    vbap-posnr,
          end   of it_vbap.
    DATA: P_MODE   TYPE    C.
          Batchinputdata of single transaction
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    selection-screen begin of block b1 with frame title text-001.
      parameters :   p_vbeln  like  vbak-vbeln obligatory.
      selection-screen skip.
      parameters :   p_fore   radiobutton group mode,
                     p_back   radiobutton group mode default 'X'.
    selection-screen end   of block b1.
    at selection-screen.
    Check Sales Order
      if not p_vbeln is initial.
        select single * from vbak
          where vbeln eq p_vbeln.
        if sy-subrc <> 0.
          message e499(sy) with 'Invalid Sales Order no.' p_vbeln.
        endif.
      endif.
    start-of-selecTION.
    Get Sales order items
      select vbeln posnr from vbap
        into table it_vbap
        where vbeln eq p_vbeln.
    Set BDC mode
      if p_back eq 'X'.
        p_mode = 'E'.
      else.
        p_mode = 'A'.
      endif.
    Process MD50 BDC
      LOOP AT IT_VBAP.
        perform bdc_dynpro      using 'SAPMM61X' '0160'.
        perform bdc_field       using 'BDC_CURSOR'  'RM61X-TRMPL'.
        perform bdc_field       using 'BDC_OKCODE'  '/00'.
        perform bdc_field       using 'RM61X-KDAUF'  IT_VBAP-VBELN.
        perform bdc_field       using 'RM61X-KDPOS'  IT_VBAP-POSNR.
        perform bdc_field       using 'RM61X-BANER'  '1'.
        perform bdc_field       using 'RM61X-LIFKZ'  '3'.
        perform bdc_field       using 'RM61X-PLMOD'  '3'.
        perform bdc_field       using 'RM61X-TRMPL'  '1'.
        perform bdc_dynpro      using 'SAPMSSY0' '0120'.
        perform bdc_field       using 'BDC_OKCODE'   '=XBAC'.
        CALL TRANSACTION 'MD50' USING BDCDATA MODE P_MODE.
        CLEAR BDCDATA.
        REFRESH BDCDATA.
      ENDLOOP.
    end-of-selection.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.
    Ajay P. Nikte

  • Line item in sales order

    Hi sdn team,
    can i delete line items in sales order...i mean i was asked not to do so..... when i do so what kind of consequences will i have to look forward to?
    regards.

    Hi,
    Yes you can delete the Line Items in Sales Order.
    Consequences with Example:
    The BOM Item ( Main Item ) is having the 3 line items (Components / Sub items)
    which are explode in the sales Order for which, if you delete the one of the
    Component items in sales order then only 2 componets will delivery and 2 will be
    billed instead of 3 components items. well this will be a problem for the customer
    and leads to Customer Complaints.
    Hope this Clarifies Your Doubt and Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

Maybe you are looking for