BAPI_CUSTOMERRETURN_CHANGE

Hi,
I am using the fm BAPI_CUSTOMERRETURN_CHANGE to update the condition values of a return order.
CALL FUNCTION 'BAPI_CUSTOMERRETURN_CHANGE'
        EXPORTING
          salesdocument     = g_vbeln
          return_header_in  = x_order_header_in
          return_header_inx = x_order_header_inx
          logic_switch      = l_logic_switch
        TABLES
          return            = lt_return
          return_items_in   = t_order_items_in
          return_items_inx  = t_order_items_inx
          schedule_lines    = t_order_schedules_in
          schedule_linesx   = t_order_schedules_inx
          conditions_in     = t_order_conditions_in
          conditions_inx    = t_order_conditions_inx                 extensionin       = t_extensionin.
But, it updates condtion value of some condition types and for others it is not updating the values.
Please let me know solution for this.
Regards
Shoban

You got my problem - but I don't have schedule lines for the 6 parts which I have too much in the item. So: How I can REDUCE the quantity of an item?
Thanks, Ralf
Edit: Ooops, updateflag in schedule line = 'U' - solved.
Edited by: Ralf Wenzel on Feb 24, 2011 3:01 PM
Edited by: Ralf Wenzel on Feb 24, 2011 3:01 PM

Similar Messages

  • How to use BAPI_CUSTOMERRETURN_CHANGE

    Hi
    I have used BAPI_CUSTOMERRETURN_CHANGE to modify an return order. It works fine, except than new quantity for w_schedule-req_qty is added, instead of replaced it. I suppose that w_headerinx-updateflag must be 'U', but I don´t know if is needed another flag (by example 'R'). Any suggestions will be grateful.
    Thanks in advanced
    Here my code:
      DATA l_documento TYPE bapivbeln-vbeln.
      DATA l_docret TYPE bapivbeln-vbeln.
      DATA w_headerin TYPE bapisdhd1.
      DATA w_headerinx TYPE bapisdhd1x.
      DATA lt_returnbapi TYPE TABLE OF bapiret2.
      DATA w_returnbapi LIKE LINE OF lt_returnbapi.
      DATA lt_items TYPE TABLE OF bapisditm.
      DATA lt_itemsx TYPE TABLE OF bapisditmx.
      DATA w_items LIKE LINE OF lt_items.
      DATA w_itemsx LIKE LINE OF lt_itemsx.
      DATA lt_partners TYPE TABLE OF bapiparnr.
      DATA w_partners LIKE LINE OF lt_partners.
      DATA lt_key TYPE TABLE OF bapisdkey.
      DATA w_key LIKE LINE OF lt_key.
      DATA lt_schedule TYPE TABLE OF bapischdl.
      DATA w_schedule LIKE LINE OF lt_schedule.
      DATA lt_schedulex TYPE TABLE OF bapischdlx.
      DATA w_schedulex LIKE LINE OF lt_schedulex.
      DATA l_fecha TYPE sy-datum.
      DATA l_cantidad(10).
    PRUEBA DE BAPI BAPI_CUSTOMERRETURN_CHANGE ***********
    *MODIFICACIÓN DE PEDIDO DE DEVOLUCIÓN
    "Llenado del encabezado
      CLEAR l_documento.
      CLEAR l_docret.
      MOVE '0187000283' TO l_documento.
      "Llenado de la estructura
      CLEAR w_headerinx.
      w_headerinx-updateflag = 'U'.
      "Llenado de la tabla de items
      CLEAR w_items.
      CLEAR lt_items.
      w_items-itm_number = '10'.
      w_items-material = '000000000000008670'.
      w_items-plant = 'MCAA'.
      l_cantidad = '5'.
      CONDENSE l_cantidad.
      w_items-target_qty = l_cantidad.
      w_items-target_qu = 'CAJ'.
      w_items-sales_unit = 'CAJ'.
      APPEND w_items TO lt_items.
      CLEAR w_itemsx.
      CLEAR lt_itemsx.
      w_itemsx-itm_number = '10'.
      w_itemsx-updateflag = 'U'.
      w_itemsx-material = 'X'.
      w_itemsx-plant = 'X'.
      w_itemsx-target_qty = 'X'.
      w_itemsx-target_qu = 'X'.
      w_itemsx-sales_unit = 'X'.
      APPEND w_itemsx TO lt_itemsx.
      "Llenado del schedule
      CLEAR w_schedule.
      CLEAR lt_schedule.
      w_schedule-itm_number = '10'.
      w_schedule-req_date = l_fecha.
      w_schedule-req_qty = l_cantidad.
      APPEND w_schedule TO lt_schedule.
      CLEAR w_schedulex.
      CLEAR lt_schedulex.
      w_schedulex-updateflag = 'X'.
      w_schedulex-itm_number = '10'.
      w_schedulex-req_date = 'X'.
      w_schedulex-req_qty = 'X'.
      APPEND w_schedulex TO lt_schedulex.
      "Llenado de la tabla de partners
      CLEAR w_partners.
      CLEAR lt_partners.
      w_partners-partn_role = 'AG'.
      w_partners-partn_numb = 'F0836727'.
      APPEND w_partners TO lt_partners.
      CLEAR w_partners.
      w_partners-partn_role = 'WE'.
      w_partners-partn_numb = 'F0836727'.
      APPEND w_partners TO lt_partners.
      CALL FUNCTION 'BAPI_CUSTOMERRETURN_CHANGE'
        EXPORTING
          salesdocument     = l_documento
          return_header_inx = w_headerinx
        TABLES
          return            = lt_returnbapi
          return_items_in   = lt_items
          return_items_inx  = lt_itemsx
          schedule_lines    = lt_schedule
          schedule_linesx   = lt_schedulex.
      BREAK-POINT.
      READ TABLE lt_returnbapi INTO w_returnbapi WITH KEY type = c_mtipo id = c_mida1
           number = c_mnuma1.
      IF sy-subrc = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_d1.
      ENDIF.

    Hi,
    have you tried updateflag to 'U' on schedule line? Replace this line w_schedulex-updateflag = 'X' by w_schedulex-updateflag = 'U'/ It might help.
    BTW could you use tag code for your code posting. It;s really hard to read without it.
    Cheers

  • BAPI_CUSTOMERRETURN_CHANGE - **reducing** Quantity

    Hi everybody,
    I am using BAPI_CUSTOMERRETURN_CHANGE to reduce the quantity of an item.
    Reason / example:
    I have a return document with a few items. i.e. item 280 as quantity 8, but only 2 of them are delivered, so I have to eliminate 6 of the 8 parts of this item.
    I can't use the schedule_lines because I don't want to add parts to the item. But when I set TARGET_QTY of the item to 2, the RETURN-Table says that's all ok, but the quantity has not been changed. No, I did not forget to set the 'X' in the x-flag-table
    Thanks for helping me
    Ralf

    You got my problem - but I don't have schedule lines for the 6 parts which I have too much in the item. So: How I can REDUCE the quantity of an item?
    Thanks, Ralf
    Edit: Ooops, updateflag in schedule line = 'U' - solved.
    Edited by: Ralf Wenzel on Feb 24, 2011 3:01 PM
    Edited by: Ralf Wenzel on Feb 24, 2011 3:01 PM

  • UDM_SUPERVISOR: Adding fields and data at customer item level

    Hi
    I am having the same issue with newbie82_c; I need to populate the added fields in transaction UDM_SUPERVISOR.
    I know that the previous thread was tagged as answered already but the solution to the issue was not indicated in the thread.
    Here are the scenarios:
    - i've added fields in the item level invoice worklist of the customers by enhancing structure FDM_COLL_INVOICE_ALV (appending fields to FDM_COLL_INVOICE)
    - thru the implementation of the BADI FDM_COLL_SEND_ITEMS, i was able to retrieve the data specified by the user (Reference Keys in FB05)
    - i've populated CT_EXT_ITEMS with the retrieved data
    Now I need these data to be displayed in the added fields in UDM_SUPERVISOR.
    What ABAP object/s is/are responsible for populating the process receivable details?
    Thank you in advance for the assistance.
    Edited by: JPLCaliuag on Dec 19, 2008 8:31 AM

    Hi K.R.Reddy,
    Can you kindly provide me with a working solution for this? I'm currently facing a similar issue for a similar BAPI (in my case it's BAPI_CUSTOMERRETURN_CHANGE) and can't seem to update the custom fields in VBAK. I have put in necessary values in the EXTENSIONIN table as well as updated the UPDATEFLAG indicator to 'U' and although it says that the order is saved, it seems to overwrite the custom field with its original value.
    The custom field seems to get updated correctly when I use BAPI_CUSTOMERRETURN_CREATE but when I make changes using BAPI_CUSTOMERRETURN_CHANGE, it gets overwritten with the original value.
    Any help is appreciated.
    Thanks and regards,
    Adeline.

  • Problem when using BAPI to create return order

    Hi All,
    I need urgent Information.
    I am using BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE to create and change quantity of return order. In both cases I am getting the result that quantity value is not getting updated.
    are these BAPIs are correct to fulfil my requirement, if yes could you please clarify?
    other wise, can I use BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_CHANGE?
    and could you please some details about quantity change in Outbound delivery?
    I am using BAPI_OUTB_DELIVERY_CHANGE for this

    Hi
    <u>You need to do exeute a BAPI_TRANSACTION_COMMIT after the succesful execution of both the function modules BAPI_CUSTOMERRETURN_CREATE and BAPI_CUSTOMERRETURN_CHANGE.</u>
    <b>I mean, please insert CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  function module in the program, after each function module call</b>. 
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Change return order(Doc type: RE) with BAPI

    Hi Experts,
    I am trying to change material quantity return document(Doc type: RE) through BAPI.
    I have tried using BAPI : BAPI_CUSTOMERRETURN_CHANGE, but not able to change quantity, though the BAPI returns success message.
    Is there any other BAPI/FM available to achieve same functionality.
    Thanks,
    Sri.

    Is there any one who can throw some lights on this..

Maybe you are looking for

  • Apple TV not working since new time capsule

    hi, i've a new 3TB Time Capsule, I have added it to my Apple Network (with an airport express and older Timecapsule as network extenders). All is fine with internet and back ups etc but my Apple TV's will not play any video over airplay, can you help

  • Secure link to iTunes failed

    I use Firefox and have been unable to update iTunes. when running iTunes diagnostics, the Network Connectivy Test results say "Secure link to iTunes failed". Can someone help me here?

  • Oracle 8i to Oracle 9i upgradation document

    Hi , Can any of you guys tell me which is the best document for taking up Oracle 8i to Oracle 9i upgradation paper. Your response is highly appreciated Thanx in advance Sravan

  • Need "tool tip" type popup

    I'm trying to set pop-ups as labels. These will be linked to hotspots/image maps. Because these will be changed frequently, I don't want to have to create a new image or html page for each label. I just want to be able to enter text and some simple p

  • Polystar tool in Flash CC

    Hi, I can't find the Polystar tool in my version of Flash CC. I think it used to be a drop-down under the rectangle tool. I've seen video tutorials where it is under the Rectangle and Oval tools. In the Adobe Flash Professional Help and Tutorials fro