Problem in using BAPI_SALESORDER_CHANGE

Hi,
We are using BAPI_SALESORDER_CHANGE for updating the delivery block information present in Shipping tab of sales order header.
We are updating the below parameters and then calling the bapi.
   ls_header-DLV_BLOCK = 'Z1'.
   ls_head_update-updateflag = 'U'.
   ls_head_update-DLV_BLOCK = 'X'.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      SALESDOCUMENT               = gs_vbak-vbeln
      ORDER_HEADER_IN             = ls_header
      ORDER_HEADER_INX            = ls_head_update
      behave_when_error           = ' '
      int_number_assignment       = ' '
    TABLES
      RETURN                      = lt_return.
But during execution we could see the messages in parameter return as below
ORDER_HEADER_IN has been processed successfully
No data was changed
But we want to update the delivery block with Z1 which is not happening.
Please let us know if we missed anything.
Thanks in advance,
Poornima

HI,
Check the tcode VA03 with the sales ordernumber before changing and after changing the sales order with delivery block.
Refer to this link..
BAPI_SALESORDER_CHANGE

Similar Messages

  • Problem in updating Quantity using 'BAPI_SALESORDER_CHANGE'

    Hi,
    I am using Bapi_salesorder_change to update item quantity and reason for rejection.My code is as below.
           MOVE c_u TO e_orderheader_inx-updateflag.
            FREE i_orderitem_in.
            MOVE newitem-posnr_ref TO e_orderitem_in-itm_number.
            MOVE c_rej TO e_orderitem_in-reason_rej.
            MOVE c_qt TO e_orderitem_in-target_qty.
            APPEND e_orderitem_in TO i_orderitem_in.
            FREE i_orderitem_inx.
            MOVE newitem-posnr_ref TO e_orderitem_inx-itm_number .
            MOVE c_u TO e_orderitem_inx-updateflag.
            MOVE c_x TO e_orderitem_inx-reason_rej.
            MOVE c_x TO e_orderitem_inx-target_qty .
            APPEND e_orderitem_inx TO i_orderitem_inx.
            FREE i_return.
            CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
              EXPORTING
                salesdocument              = xvbak-vbeln
                ORDER_HEADER_IN            =
                order_header_inx           = e_orderheader_inx
              TABLES
               return                      =  i_zbapiret2
               order_item_in               =  i_orderitem_in
               order_item_inx              =  i_orderitem_inx.
    But in 'i_zbapiret2' iam getting the below errors.
    1)Storage location BH in plant is not defined .
    2) Error in ITEM_IN 000020
    3) sales documnet 000078965 was not changed.
    PLease help me to solve this problem.
    Thanks in advance,
    Sravanthi.

    Hi,
      From the error message it seems that you dont have the storage location for the plant as you have passed to the BAPI check table 'T001L' to see if that storage location is there for the plant. If not then we need to maintain that.
    Regards,
    Himanshu

  • Problem using BAPI_SALESORDER_CHANGE

    Hi Experts,
    I am inserting the Item in Sales order by using BAPI_SALESORDER_CHANGE.
    suppose there are 2 line item in sales i.e. 10 and 20 .
    now i want to insert line item i.e. 30.
    now the problem is that when i am trying to insert line item 30 it is getting inserted.
    but i want to update the quantity for line item 30.
    how to update the quantity of line item 30?
    anybody have the solution?
    Thanks in advance.
    Abhishek

    Hi,
      Fill tables parameter ORDER_ITEM_IN and ORDER_ITEM_INX for the line item you want to update the quantity for the field would be TARGET_QTY and TARGET_QU
    and in the ORDER_ITEM_INX have ITM_NUMBER = '30  the update indicator equal to 'X' and TARGET_QTY = 'X'and  TARGET_QU eq 'X' and that should do it.
    Regards,
    Himanshu

  • Problem in adding "Reason for Rejection" using BAPI_SALESORDER_CHANGE

    Hi all,
           I have a requirement to stop further processing of sales order by changing the reason for rejection at line item. I have done the code and passed the reason code in the item table to BAPI. The return message says the sales order ammended successsfully, but when i go and see the sales order I dont see it getting updated. when i go to check the order its throwing an error message "Update was terminated"  Could some one please help in getting this solved.
    The code is shown below
    Populate the headerX details
    it_bapisdh1x-updateflag  = 'U'.
    it_bapisdh1x-sales_org   = 'X'.
    it_bapisdh1x-distr_chan  = 'X'.
    it_bapisdh1x-division    = 'X'.
    it_bapisdh1x-purch_no_c  = 'X'.
    it_bapisdh1x-cust_group  = 'X'.
    Populate the header details
    it_bapisdh1-sales_org    = '1298'.
    it_bapisdh1-distr_chan   = '95'.
    it_bapisdh1-division     = '00'.
    it_bapisdh1-purch_no_c   = 'Test1'.
    Partner Roles
    it_bapiparnr-partn_role = 'AG'.
    it_bapiparnr-partn_numb = '9820000049'.
    it_bapiparnr-itm_number = '00000'.
    APPEND it_bapiparnr.
    it_bapiparnr-partn_role = 'WE'.
    it_bapiparnr-partn_numb = '9820000049'.
    it_bapiparnr-itm_number = '000000'.
    APPEND it_bapiparnr.
    it_bapisditmx-itm_number = '00010'.
    it_bapisditmx-updateflag = 'U'.
    it_bapisditmx-material   = 'X'.
    it_bapisditmx-cust_group = 'X'.
    it_bapisditmx-reason_rej = 'X'.
    APPEND it_bapisditmx.
    it_bapisditm-itm_number = '00010'.
    it_bapisditm-material   = 'YAG'.
    it_bapisditm-reason_rej = '01'.
    APPEND it_bapisditm.
    BREAK-POINT.
    salesd = '4000004045'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument = salesd
      order_header_in = it_bapisdh1
      order_header_inx = it_bapisdh1x
      behave_when_error = ' '
      int_number_assignment = ' '
    TABLES
      order_item_in = it_bapisditm
      order_item_inx = it_bapisditmx
      partners = it_bapiparnr
      return = it_bapiret2.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    endif.

    When using BAPI_SALESORDER_CHANGE, you set the fields your are updating to 'X'.  In the example you gave, you are trying to change the header data, material number, etc.
    Try slimming it down to:
    Populate the headerX details
    it_bapisdh1x-updateflag = 'U'.
    it_bapisditmx-itm_number = '00010'.
    it_bapisditmx-updateflag = 'U'.
    it_bapisditmx-reason_rej = 'X'.
    APPEND it_bapisditmx.
    it_bapisditm-itm_number = '00010'.
    it_bapisditm-reason_rej = '01'.
    APPEND it_bapisditm.
    BREAK-POINT.
    salesd = '4000004045'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = salesd
    order_header_in = it_bapisdh1
    order_header_inx = it_bapisdh1x
    behave_when_error = ' '
    int_number_assignment = ' '
    TABLES
    order_item_in = it_bapisditm
    order_item_inx = it_bapisditmx
    return = it_bapiret2.
    IF sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    endif.
    I hope this helps,
    Mark

  • Problem with updating pricing date using BAPI_SALESORDER_CHANGE

    Hi,
    I need to update pricing date on sales order (but only on item level).
    I have been trying to use  BAPI_SALESORDER_CHANGE but nothing changes.Bapi returns no errors, ends with success.
    I hoped that bapi would change not only pricing date but also recalculate things the date affected.
    Here is my code:
    ls_head_inx-updateflag = 'U'.
    ls_bapisdls-pricing = 'C'.
    ls_item-itm_number = sales_order_posnr
    ls_item-price_date = new_price_date
    APPEND ls_item TO lt_item.
    ls_item_inx-itm_number = sales_order_posnr
    ls_item_inx-updateflag = 'U'.
    ls_item_inx-price_date = 'X'.
    APPEND ls_item_inx TO lt_item_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
              EXPORTING
                salesdocument     = sales_order
                order_header_inx = ls_head_inx
                logic_switch         = ls_bapisdls
              TABLES
                return                 = lt_return
                order_item_in     = lt_item
                order_item_inx   = lt_item_inx
    Thanks & Regards,
    Mario

    Mario,
    I run same code as yours and work for me fine, able to update ITEM pricing date.
    I suppose you are using BAPI_TRANSACTION_COMMIT after your BAPI call, then only it will work.
    Also note that VBKD table stores this date for header and item. In my system, there are generally only header rows in that table, but a new item row gets generated when I change the item date with the BAPI to some other date. Also, this BAPI sometimes issues a W message instead of ERROR for something like non-existing items, so carefully check your RETURN table too.
    'Item 000002 does not exist' as WARNING message, so might be considering it as a success.
    If nothing works, try to do the same thing for the same data using VA02 and check . If that works, BAPI will work surely.
    Regards,
    Diwakar

  • How to update Billing Plan using BAPI_SALESORDER_CHANGE

    Hi,
    In my case initailly sales order header data is created and saved, with reference to SO Project is created and then item level data is updated.
    So clients requirement is to create any upload programme which can use for mass upload.
    i.e to develop a program to upload,
    i) Items in Sales Order.
    ii) Billing Plan & Pricing Conditions in SO
    I am trying to use BAPI_SALESORDER_CHANGE for this requirement. Problem is in this scenerio user exit is already used which validate "Amount" at item level and "Bill. value" in Billing plan tab should be same.
    As observed Billing plan data can not be updated using this BAPI.
    Even I've tried to use BDC for this requirement, but as we need to double click on line item while updating billing plan data and conditions it does  not work while recording.
    Incase anyone have worked on similar scenerio and found out solution, please share all your inputs.
    Warm Regards,
    Nitish

    Hi,
    The following code will take you to Billing plan tab in BDC.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '0102'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'VBAK-VBELN'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'VBAK-VBELN'
                                    wa_vbap-vbeln.             
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ITEM'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    itemno . "'RV45A-MABNR(wa_vbap-posnr)'.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4003'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=T\06'.
      PERFORM bdc_dynpro      USING 'SAPLV60F' '4001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
    Regards,
    P Gomatheeswaran

  • Need to add new condition type using   BAPI_SALESORDER_CHANGE

    Hi all,
    I am using BAPI_SALESORDER_CHANGE to add new condition type for an order item.
    I am able to add it, but problem here is, that i want that condition type to be manually changable. Here, in BAPI, after execution, condition type field becomes disable.
    My code is as follows:
                    MOVE 'B' TO wa_logic-pricing.
                      MOVE 'X' TO wa_logic-cond_handl.
                      wa_cond-itm_number = wa_vbap-posnr.
    *                  wa_cond-cond_st_no = it_konv1-stunr.
    *                  wa_cond-cond_count = it_konv1-zaehk.
                      wa_cond-cond_type =  it_discount-kschl.
                      wa_cond-CONDORIGIN = 'C'.
                      APPEND wa_cond TO i_cond.
                      CLEAR: wa_cond.
                      wa_condx-itm_number = wa_vbap-posnr.
    *                  wa_condx-cond_st_no = it_konv1-stunr.
    *                  wa_condx-cond_count = it_konv1-zaehk.
                      wa_condx-cond_type =  it_discount-kschl.
                      wa_condx-updateflag = 'I'.
                      wa_condx-COND_VALUE = 'X'.
                      APPEND wa_condx TO i_condx.
                      CLEAR: wa_condx.
    FORM f_update_order .
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = salesdocument
          order_header_in  = wa_headerdata
          order_header_inx = wa_headerdatax
          logic_switch     = wa_logic
        TABLES
          return           = it_return
          order_item_in    = i_itemdata
          order_item_inx   = i_itemdatax
          conditions_in    = i_cond
          conditions_inx   = i_condx.
      IF NOT it_return[] IS INITIAL.
        PERFORM f_commit_or_rollback.
      ENDIF.
    ENDFORM.
    Please let me know, if it could be achievable.
    Best regards,
    Meena
    Moderator Message: Corrected the code tags. You need to use flower brackets.
    Edited by: kishan P on Aug 25, 2010 6:04 PM

    Hi,
    This is the demo code i am writing:
    Even Change manual entry field in BAPI did not helped me.
    [code]REPORT  ZTESTM1.
    data: l_knumv type knumv.
    DATA: it_return        TYPE STANDARD TABLE OF bapiret2,         "Internal table for t_txt_ret
           wa_return        type  bapiret2.
    data: begin of it_konv occurs 0.
           include structure konv.
           data: end of it_konv.
    data: logic_switch type standard table of    BAPISDLS,
          wa_logic type BAPISDLS.
    data:itemdata type STANDARD TABLE OF BAPISDITM,
          wa_item type   BAPISDITM.
    data : salesorder type BAPIVBELN-VBELN.
    data:itemdatax type STANDARD TABLE OF BAPISDITMx,
          wa_itemx type   BAPISDITMx.
    data: wa_header type BAPISDH1,
          wa_headerx type BAPISDH1X.
    data: i_cond type STANDARD TABLE OF BAPICOND,
          wa_cond type BAPICOND.
    data: i_condx type STANDARD TABLE OF BAPICONDX,
          wa_condx type BAPICONDX.
    move '0060008601' to salesorder.
    move '000010'  TO wa_item-itm_number.
    append wa_item to itemdata.
    move ' '  to wa_header-BILL_BLOCK.
    move   'U'  to wa_headerx-UPDATEFLAG.
    move  'X' to wa_headerx-BILL_BLOCK.
    MOVE: 'U'  to wa_itemx-UPDATEFLAG,
         '000010'  TO wa_itemx-itm_number.
         append wa_itemx to itemdatax.
    move 'B' to wa_logic-PRICING.
    move 'X' to wa_logic-COND_HANDL.
    select single knumv from vbak into l_knumv where vbeln = '0060008601'  .
    select * from konv into table it_konv where knumv = l_knumv  and kposn = '000010'.
          wa_cond-ITM_NUMBER = it_konv-kposn.
          wa_cond-cond_type = 'Z550'.
          wa_cond-CONDCHAMAN = 'X'.
           append wa_cond to i_cond.
           clear: wa_cond.
    wa_condx-ITM_NUMBER = it_konv-kposn.
    wa_condx-COND_TYPE = 'Z550'.
    wa_condx-UPDATEFLAG = 'L'.
    append wa_condx to i_condx.
    clear: wa_condx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument               = salesorder
       ORDER_HEADER_IN             = wa_header
        order_header_inx            = wa_headerx
       LOGIC_SWITCH                = wa_logic
      tables
        return                      = it_return
       ORDER_ITEM_IN               = itemdata
       ORDER_ITEM_INX              = itemdatax
       CONDITIONS_IN               =   i_cond
       CONDITIONS_INX              =   i_condx
      EXTENSIONIN                 =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.[code]
    Thank you.
    Meena

  • Problem in BAPI  'BAPI_SALESORDER_CHANGE'.

    Hi All,
    I am facing a problem in BAPI  'BAPI_SALESORDER_CHANGE'. My requirement is as below.
    For a particular type of Sales Order i have to update all the ship-to PO.Basically in all these PO's we have to suffix
    'old'.
    I am pasting the code which I used. I am actually displaying the return message in a table.
    The message says 'Schedule Order is saved'.
    When i go and check the SO the ship-to PO is not updated.
    Also i have one more querry.
    Is thsi BAPI to be run for each item or can i collect all items in t_item_in and then call the BAPI.
    Please guide me on this.
    Thanks in Advance,
    Saket.
    LOOP AT t_vbkd INTO wa_vbkd.
    CONCATENATE wa_vbkd-bstkd_e '-' v_po INTO v_po_ref.
    t_item_in-purch_no_c    = v_po_ref.
    t_item_inx-purch_no_c   = v_po_ref.
    t_item_inx-updateflag  = 'X'.
      APPEND t_item_in.
      APPEND t_item_inx.
    *LOOP AT t_vbak INTO wa_vbak.
    v_vbeln = wa_vbkd-vbeln.
    w_headerx-updateflag = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = v_vbeln
        ORDER_HEADER_INX            = w_headerx
      TABLES
        RETURN                      = t_return
        ORDER_ITEM_IN               = t_item_in
        ORDER_ITEM_INX              = t_item_inx.
    READ TABLE t_return WITH KEY type = 'E'.
      IF sy-subrc = 0.
        t_output-rmks = t_return-message.
      ELSE.
        t_output-rmks = t_return-message.
      ENDIF.
      READ TABLE t_vbak INTO wa_vbak
       WITH KEY vbeln = v_vbeln.
      t_output-vbeln = v_vbeln.
      t_output-auart = wa_vbak-auart.
      t_output-vkorg = wa_vbak-vkorg.
      t_output-bstkd_e_old = wa_vbkd-bstkd_e.
      t_output-bstkd_e_new = t_item_in-purch_no_c.
      APPEND t_output.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        =
    ENDLOOP.

    REPORT  ZSALESORDER_CHANGE MESSAGE-ID 38.
    PARAMETERS: p_vbeln TYPE vbap-vbeln OBLIGATORY, "Order Number
    p_posnr TYPE vbap-posnr OBLIGATORY, "Order Item
    p_etenr TYPE vbep-etenr OBLIGATORY, "Schedule Line
    p_reqqty TYPE bapischdl-req_qty OBLIGATORY. " Order Qty
    DATA: i_hdr TYPE bapisdh1,
    i_hdrx TYPE bapisdh1x,
    i_ret TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
    wa_ret TYPE bapiret2.
    DATA: BEGIN OF i_sched OCCURS 10.
    INCLUDE STRUCTURE bapischdl.
    DATA: END OF i_sched.
    DATA: BEGIN OF i_schedx OCCURS 10.
    INCLUDE STRUCTURE bapischdlx.
    DATA: END OF i_schedx.
    START-OF-SELECTION.
    REFRESH: i_sched, i_schedx, i_ret.
    CLEAR: i_sched, i_schedx, i_ret.
    i_hdrx-updateflag = 'U'.
    i_sched-itm_number = p_posnr.
    i_sched-sched_line = p_etenr.
    i_sched-req_qty = p_reqqty.
    i_schedx-updateflag = 'U'.
    i_schedx-itm_number = p_posnr.
    i_schedx-sched_line = p_etenr.
    i_schedx-req_qty = 'X'.
    APPEND i_sched.
    APPEND i_schedx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_in = i_hdr
    order_header_inx = i_hdrx
    TABLES
    return = i_ret
    schedule_lines = i_sched
    schedule_linesx = i_schedx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    LOOP AT i_ret.
    WRITE / i_ret-message.
    ENDLOOP.
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
    Edited by: krupa jani on Jul 30, 2009 9:22 AM

  • Delete pricing conditions line using BAPI_SALESORDER_CHANGE

    Hi experts.
    I've read the forum and OSS about this topic and don't have clear if it's possible to delete a price condition position (using BAPI). Using tx. VA02 I can delete pricing conditions, that's why I think should be possible.
    We have a sales order created, and depending on the sold-to-party we have some discounts: RA00 (% discount) or RB00 (absolute discounts).
    In some cases we need to insert/update or delete these pricing conditions. For insert/update, we don't have any problem using
    BAPI_SALESORDER_CHANGE and setting the appropiate updateflag.
    But... what would be the procedure to delete a discount, for example, RA00 fixed on a sales order? Has the logic_switch be informed specially?
            wa_cond-itm_number = lt_cond-itm_number.
            wa_cond-cond_type  = lt_cond-cond_type.
            APPEND wa_cond TO i_cond.
            wa_condx-itm_number = lt_cond-itm_number.
            wa_condx-cond_type  = lt_cond-cond_type.
            wa_condx-updateflag = 'D'.
            APPEND wa_condx TO i_condx.
    Lots of thanks.
    Javier

    I am not positive on being able to delete a pricing condition through program.
    Online when you try to change the pricing, SAP suggests us to redetermines the Pricing rather than just changing the values. And also the pricing condition config also plays a role... I think there was a setting which says Pricing condition to be manual which means you can add or delete the conditoin.

  • I am going to buy unlocked iphone 5.. i will be going to india nxt months and will stay there for a while... so my question is will i get warrenty in india.. and will there be any problem with using indian sims..?? thnx for the help..

    i am going to buy unlocked iphone 5.. i will be going to india nxt months and will stay there for a while... so my question is will i get warrenty in india.. and will there be any problem with using indian sims..?? thnx for the help..

    The warranty for the iPhone is not and has never been International.
    Warranty and support are ONLY valid in the country of origin.  The only exception is the EU where the entire EU is treated as one country.
    If the device will be used in India, buy it in India.
    An unlocked iPhone will work on any supported GSM carrier world wide.  The LTE portion of a US purchased, unlocked iPhone is unlikely to work outside North America as it does not support the appropriate bands used in other countries.

  • Problem on using Crystal Report Viewer on windows application ("specified type is not valid ")

    Hi
    I am having problem on using Crystal Report Viewer on one of my windows application.
    I am not sure how to put the Crystal Report Viewer 11 Control onto the tool box.
    I could found a Crystal Report Viewer control on my computer, but it is version 8.5.
    I have also found another one which is Called Crytal ActiveX Report Viewer, i don't think it is the one I can use. As when I try to load a dummy report on to the Crytal ActiveX Report Viewer, It return an error. "specified type is not valid"
    Please see the Code sample below.
    private sub loadReport()
         Dim r as New ReportDocument
         'v is the name of the Crystal ActiveX Report Viewer Control
         r.Load("C:\Report1.rtp")
         v.ReportSource(r) <---It throw error on this line.
    End Sub
    Could you give me some advice about what have I done wrong, How to check if I have set up the Crystal Report Component correctly in my Visual Studio 2005 Standard edition.
    Thanks in advances.
    Many thanks
    Chi

    VS 2005 Standard and Express editions do not come with Crystal Reports; only the Professional and higher editions will have CR bundled. However, I believe you can purchase CR XI R2 Developer and it will give you the components you need to create a VS .NET 2005 application using the Standard edition.
    -MJ

  • To delete sales order using BAPI_SALESORDER_CHANGE

    HI ,
           I am using BAPI_SALESORDER_CHANGE to delete a bulk of order lines for an order.But the issue is...the entries are deleted in VBEP and VBUP tables for all the order lines where in VBAP only few order lines are deleted.This is happening repeatedly.
    I am passing data like this...
        CLEAR: l_vbap_inx.
        l_vbap_inx-itm_number            =  t_vbap-posnr.  " will have value
        l_vbap_inx-updateflag            = 'D'.
        APPEND l_vbap_inx.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
             EXPORTING
                  salesdocument    = i_vbeln                   "will have order number
                  order_header_inx = l_vbak_inx            " will be paased with values 'U'
                  order_header_in  = header                 "will not hold any value
                  simulation       = i_simulate                  "space
             TABLES
                  return           = l_return
                  order_item_in    = l_vbap                   "bulk of order lines with 'D' flag
                  order_item_inx   = l_vbap_inx
                  extensionin      = l_vbap_ext.
    can you please suggest on this......
    Thanks in advance.

    HI ,
    Can any one of you please suggest me to amend the below given code which is used to  delete bulk of order lines from VBAP table.presently it is deleting first few order lines from VBAP and all order lines from VBEP and VBUP tables.when i execute the same program for second time  first left out order lines are getting deleted again.So..can any one please check the below code and suggest me something on this.
        REFRESH: l_return, l_vbap, l_vbap_inx, l_vbap_ext.
      IF xorder_delete = 'X'.
        l_vbak_inx-updateflag = 'D'.
    Even though all the order lines are to be deleted, the delete complete
    order flag says don't delete the header data
        IF i_cleanup = space.
          l_vbak_inx-updateflag = 'U'.
          PERFORM validate_line_count TABLES l_vbap_ext         "iw150709
                                       USING i_vbeln.           "iw150709
        ENDIF.
      ELSE.
        l_vbak_inx-updateflag = 'U'.
        PERFORM validate_line_count TABLES l_vbap_ext           "iw150709
                                     USING i_vbeln.             "iw150709
      ENDIF.
      LOOP AT t_vbap WHERE delete = 'X'.
        CLEAR: l_vbap.
        l_vbap-itm_number                =  t_vbap-posnr.
        APPEND l_vbap.
        CLEAR: l_vbap_inx.
        l_vbap_inx-itm_number            =  t_vbap-posnr.
        l_vbap_inx-updateflag            = 'D'.
        APPEND l_vbap_inx.
        CLEAR: l_vbap_ext, l_extension_vbapx.
        l_vbap_ext-structure             = 'BAPE_VBAPX'.
        l_extension_vbapx-vbeln          =  i_vbeln.
        l_extension_vbapx-posnr          =  t_vbap-posnr.
        l_extension_vbapx-zzco_reason    = 'X'.
        l_vbap_ext+30                    =  l_extension_vbapx.
        APPEND l_vbap_ext.
        CLEAR: l_vbap_ext, l_extension_vbap.
        l_vbap_ext-structure             = 'BAPE_VBAP'.
        l_extension_vbap-vbeln           =  i_vbeln.
        l_extension_vbap-posnr           =  t_vbap-posnr.
        l_extension_vbap-zzco_reason     =  i_reason.
        l_vbap_ext+30                    =  l_extension_vbap.
        APPEND l_vbap_ext.
      ENDLOOP.
    Only call BAPI if NOT in test mode.
      IF i_simulate = space.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
             EXPORTING
                  salesdocument    = i_vbeln
                  order_header_inx = l_vbak_inx
                  order_header_in  = header
                  simulation       = i_simulate
             TABLES
                  return           = l_return
                  order_item_in    = l_vbap
                  order_item_inx   = l_vbap_inx
                  extensionin      = l_vbap_ext.
      ENDIF.
      LOOP AT l_return WHERE type = 'E' OR type = 'A'.
        MOVE-CORRESPONDING l_return TO t_messages.
        t_messages-field = 'VBELN'.
        APPEND t_messages.
      ENDLOOP.
    No ERRORs
      IF sy-subrc <> 0.
        IF i_simulate = space.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
               IMPORTING
                    return = l_return.
    Edited by: manj1325 on Apr 9, 2010 8:19 AM

  • Problem in using FM SELECT_TEXT

    Hi friends,
    I have a problem in using fm SELECT_TEXT.
    Here I want to fetch Material PO text in Material master to my report.
    I just dont know in which field of table "it_thead" the actual text is available.\
    I tried debugging the program but was not successful.
    I have also tried using READ_TEXT but it gives an error if no Text exists.
        CALL FUNCTION 'SELECT_TEXT'
          EXPORTING
            client     = sy-mandt
            object     = 'MATERIAL'
            name       = wrk_matnr
            id         = 'BEST'
            language   = sy-langu
          TABLES
            selections = it_thead.
    How do i print the actual MAterial PO text in IT_THEAD ?
    hope u understand the question...please do let me know if any details are required from myside..

    Hi,
    My mistake.
    Check below sample code.
    PARAMETERS: po_matnr TYPE mara-matnr.
    DATA: i_lines TYPE STANDARD TABLE OF tline,
          wa_lines TYPE tline,
          l_matnr TYPE thead-tdname.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = po_matnr
    IMPORTING
       OUTPUT        = po_matnr
    MOVE po_matnr TO l_matnr.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    *   CLIENT                        = SY-MANDT
        ID                            = 'BEST'
        LANGUAGE                      = sy-langu
        NAME                          = l_matnr              "Pass material with leading zeros
        OBJECT                        = 'MATERIAL'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
      TABLES
        LINES                         = i_lines
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT i_lines INTO wa_lines.
      WRITE: /1 wa_lines-tdline.
    ENDLOOP.
    Just execute this code by inputting ur material number.
    If the text doesnot exist the error u r getting because of not commenting the MESSAGE statement after FM call. Try in the way i told above.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Feb 28, 2009 4:36 PM

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • TS2755 Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help of how to set up messages on each

    Hi all, I bought one iphone and 3 ipads, i set up all on one apple ID. Now i have a problem when using messages: when sending message from one device it appears again on screen from the other 3 devices. I need help on how to set up messages on each device separately and to start using messages app on each device independently. Thanks

    search google for "iphone remove picture from contact"

Maybe you are looking for