Changing quantity using bapi_salesorder_change function

hi ,
i am changing quantity using 'bapi_salesorder_change' function.what are the minimum parameteres that needs to be passsed to the function.i am not able to change the quantity for some items.also for some sales orders i am not getting any error message but commit work is not working.
thanks ,
nitin

Hi Nitin,
After you call the BAPI_SALESORDER_CHANGE, specifically call BAPI_TRANSACTION_COMMIT , as BAPI_SALESORDER_CHANGE does not run a database commit.(as per the documentation provided by SAP for BAPI_SALESORDER_CHANGE)
Thanks
Lakshman

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

  • Partner address change issue using BAPI_SALESORDER_CHANGE

    Hi,
    I'm trying to change partner address in an order using the Bapi BAPI_SALESORDER_CHANGE. I have searched the known threads but did not found a solution.
    my requrirement is to change partner address without passing address number to 'PARTNERADDRESSES' parameter
    This is brief about my requirement.
    Our requirement is sales order executin from ECC6 to ECC5 i.e. when a sales order is created in ECC6 it should be created in ECC5 when we save order in ECC6, so in a similar way even changes done in EC6 sales order should be reflectedin ECC5 (whichi includes ATP also) so during this process a user can add additional line items with different ship_to party address, so for newly added line item in ECC6 during VA02 (change process) address number will not be there in ECC5 so i can not pass address number in ECC5 during address change using BAPI_SALESORDER_CHANGE.
    since stock is not maintained in ECC6 we are doing above process i.e. sales order execution from ECC6 to ECC5.
    so in order to change partner address for newly added line item in ECC6 i will not be having adrees number in ECC5 so can any body plz let me know how to change address of a parter without passing address number to 'PARTNERADDRESSES' parameter of
    'BAPI_SALESORDER_CHANGE'.
    If any body has faced this and found a solutin for this plz let me know.
    Hope you understood my requirement.

    give a meaningful title to ur thread, so that, people get u back quickly. Just tip that, try to do ur requirement online, then Observe How the system is behaving....thanq

  • Using Bapi_salesorder_change adding a item, deleting a  item,Quanty change

    I need help on Bapi_salesorder_change.
    I have a table control in which there will be data of a particular sales document no, items, quantity, sales unit. When user changes the quantity, or adds a line item or deletes a line item and the press the save button bapi_salesorder_change should trigger and should change the order as the user changes.
    Can u help how to write code for this three conditions
    1> adding line item.
    2> deleting a line item.
    3> changing the quantity.
    using bapi_salesorder_change
    Can i use the same bapi for three conditions?
    Please help me in this as soon as possible.
    I thank them in advance

    Hello Geeks,
              i am using this bapi  for updating my item quantity no....
              but the bapi return msg say tat its not changing....
              i think i may did some mistake pls anyone can rectify it....
              i hv attached my code below......
    *For line item
    TYPES :BEGIN OF y_t_vbap,
            vbeln TYPE vbeln_va,  "sales Document
            posnr TYPE posnr_va,  "Item no of SD document
            matnr TYPE matnr,     "Material No
            zmeng TYPE dzmeng ,   "Target qty in Sales unit
            spart TYPE spart,     "division
            message TYPE BAPI_MSG,
           kwmeng type kwmeng,   "cummulative order qty
           END OF y_t_vbap.
    TYPES : y_t_itemin TYPE bapisditm,
            y_t_return TYPE bapiret2,
            y_t_headerx TYPE bapisdh1x.
    TYPES: BEGIN OF y_t_logdata,
           lno             TYPE         lineno,         "Lineno
           field           TYPE         fieldname,      "Field Name
           value           TYPE         lmon_fvalue,    "Field Value
           message         TYPE         bapi_msg,       "Messages
           END OF y_t_logdata.
                     Internal table declaration
    DATA: "y_i_vbak      TYPE   STANDARD TABLE OF y_t_vbak,
          y_i_vbap      TYPE   STANDARD TABLE OF y_t_vbap,
          y_i_headerx   TYPE   STANDARD TABLE OF bapisdh1x,
          y_i_itemin    TYPE   STANDARD TABLE OF bapisditm ,
          y_i_iteminx   TYPE   STANDARD TABLE OF bapisditmx,
          y_i_return    TYPE   STANDARD TABLE OF y_t_return,
          y_i_logdata   TYPE   STANDARD TABLE OF y_t_logdata,
          y_i_bapiret   TYPE   STANDARD TABLE OF bapiret2.
                     Table type declaration
    TYPES: y_tt_vbap    TYPE   STANDARD TABLE OF y_t_vbap ,
           y_tt_logdata TYPE   STANDARD TABLE OF y_t_logdata.
                     Work Area declaration.
    DATA:   y_wa_vbap     TYPE   y_t_vbap,
          y_wa_itemin   TYPE   bapisditm ,
          y_wa_iteminx  TYPE   bapisditmx,
          y_wa_headerx  TYPE   bapisdh1x,
          y_wa_return   TYPE   y_t_return,
          y_wa_logdata  TYPE   y_t_logdata,
          y_wa_event    TYPE   slis_alv_event,
          y_wa_event1   TYPE   slis_t_event,
          y_wa_bapiret  TYPE   bapiret2.
                     Variables declaration.
    DATA: y_i_event     TYPE   slis_t_event,
          y_v_success   TYPE   i           , "For Success
          y_v_error     TYPE   i           , "For Error
          y_v_sno       TYPE   char30      ,
          y_v_eno       TYPE   char30      ,
          y_v_msg       TYPE   char100     . "error msg
                     Constants declaration.
    constants : y_k_x type char1 value 'X',
                    y_k_u type char1 value 'U',
                   y_k_e type char1 value 'E'.
                  SELECTION SCREEN LAYOUT
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN: COMMENT 3(18) text-003.
    PARAMETERS   :    y_p_vbln TYPE vbak-vbeln OBLIGATORY.
    SELECTION-SCREEN: END OF LINE.
    SELECTION-SCREEN : END OF BLOCK b1.
                      START-OF-SELECTION.
    START-OF-SELECTION.
    WRITE: text-002.
                      END-OF-SELECTION.
    END-OF-SELECTION.
      SELECT  vbeln
              posnr
              matnr
              zmeng
              spart
              FROM vbap
                   INTO TABLE    y_i_vbap
                   WHERE vbeln = y_p_vbln.
      LOOP AT y_i_vbap INTO y_wa_vbap.
        y_wa_vbap-zmeng = 2 + y_wa_vbap-zmeng.
        MODIFY y_i_vbap FROM y_wa_vbap INDEX sy-tabix.
      ENDLOOP.
      PERFORM y_f_update USING y_i_vbap.
    *&      Form  y_f_update
           POPULATE BAPI DATA AND RUN BAPI
    FORM y_f_update USING  y_p_vbap TYPE y_tt_vbap.
      CLEAR: y_i_headerx, y_i_itemin, y_i_iteminx,
             y_i_return, y_i_bapiret.
      REFRESH: y_i_itemin, y_i_iteminx, y_i_return, y_i_bapiret.
      LOOP AT y_i_vbap INTO y_wa_vbap.
        MOVE y_wa_vbap-zmeng TO y_wa_itemin-target_qty.
        MOVE y_wa_vbap-posnr TO y_wa_itemin-itm_number.
        APPEND y_wa_itemin TO y_i_itemin.
      ENDLOOP.
    *Update the Bapi Itnernal tables
      y_wa_headerx-updateflag = y_k_u .
      APPEND y_wa_headerx TO y_i_headerx.
      LOOP AT y_i_vbap INTO y_wa_vbap.
        y_wa_iteminx-itm_number = y_wa_vbap-posnr.
        y_wa_iteminx-target_qty = y_k_x .
        y_wa_iteminx-updateflag = y_k_u .
        APPEND y_wa_iteminx TO y_i_iteminx .
      ENDLOOP .
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument    = y_wa_vbap-vbeln
          order_header_inx = y_wa_headerx
        TABLES
          return           = y_i_return
          order_item_in    = y_i_itemin
          order_item_inx   = y_i_iteminx.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      CLEAR y_i_vbap.
    IF y_i_return is not initial.
      LOOP AT y_i_return INTO y_wa_return where TYPE = y_k_e .
        MOVE y_wa_return-message TO y_wa_vbap-message .
        Append  y_wa_vbap to y_i_vbap.
        y_v_success = y_v_success + 1.
      ENDLOOP.
    ENDIF.
      y_wa_event-name = 'TOP_OF_PAGE'.
      y_wa_event-form = 'Y_FD_TOP_OF_LIST'.
      APPEND y_wa_event TO y_i_event.
      CLEAR y_wa_event.
      CALL FUNCTION 'ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program         = sy-repid
          i_tabtypename1             = 'Y_T_VBAP'
          it_events1                 = y_i_event[]
        TABLES
          t_outtab1                  = y_i_vbap[]
        EXCEPTIONS
          program_error              = 1
          maximum_of_appends_reached = 2
          OTHERS                     = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " y_f_vbap
    *&      Form  Y_FD_TOP_OF_LIST
    FORM y_fd_top_of_list.
      MOVE: y_v_success TO y_v_sno,
            y_v_error   TO y_v_eno.
      CONCATENATE text-002 y_v_sno '/' y_v_eno INTO y_v_msg SEPARATED BY
      space.
      CONDENSE y_v_msg.
      WRITE / y_v_msg .
      SKIP 1.
    ENDFORM.                    "Y_FD_TOP_OF_LIST

  • Order Quantity in BAPI_Salesorder_change becomes zero when changed.

    Hi,
    As a requirement , I have to delete line item on a sales order and create one line item with the same data except delivering plant. I am using BAPI_SALESORDER_CHANGE.
    I need to change ship to party and line item data. Ship to party and other line item details updates fine but order quantity remains zero.
    Please find below used code.
    { Code
    wa_order_item_in-itm_number    = wa_vbap-posnr.
          wa_order_item_in-plant         = wa_vbap-werks.
          wa_order_item_in-material      = wa_vbap-matnr.
          wa_order_item_in-target_qty    = '1'.
           clear wa_order_item_in.
    *--Adding second line item
          wa_order_item_in-plant         = pa_werks.
          wa_order_item_in-material      = wa_vbap-matnr.
          wa_order_item_in-target_qty    = '1'.
          wa_order_item_inx-itm_number = wa_vbap-posnr.
          wa_order_item_inx-updateflag = c_delete.
          clear wa_order_item_inx.
          wa_order_item_inx-itm_number = wa_vbap-posnr.
          wa_order_item_inx-updateflag = 'I'.
          wa_order_item_inx-material   = c_x.
          wa_order_item_inx-plant      = c_x.
          wa_order_item_inx-target_qty = c_x.
          wa_order_item_inx-target_qu  = c_x.
          append wa_order_item_inx to it_order_item_inx.
          clear wa_order_item_inx.
    -Partner function changes--
          concatenate c_p wa_vbap-werks into  lv_garage1.
          wa_partnerchanges-updateflag = c_update.
          wa_partnerchanges-document   = wa_vbap-vbeln.
          wa_partnerchanges-p_numb_new = lv_garage.
          wa_partnerchanges-partn_role = c_shiptoparty.
          wa_partnerchanges-p_numb_old = lv_garage1.
          append  wa_partnerchanges to lt_partnerchanges.
          clear  wa_partnerchanges.
    Schedule Lines--
          wa_schedule_lines-itm_number = wa_vbap-posnr.
          wa_schedule_lines-req_qty = wa_vbap-kwmeng.
          wa_schedule_lines-sched_line = '0001'.
          append wa_schedule_lines to lt_schedule_lines.
          clear wa_schedule_lines.
          wa_schedule_linesx-itm_number = wa_vbap-posnr.
         wa_schedule_linesx-updateflag = 'U'.
          wa_schedule_linesx-req_qty = 'X'.
          append wa_schedule_linesx to lt_schedule_linesx.
          clear wa_schedule_linesx.     
    Thanks
    Mohinder
    Edited by: Mohinder Singh Chauhan on Dec 9, 2009 5:27 AM
    Edited by: Mohinder Singh Chauhan on Dec 9, 2009 5:28 AM

    Hi Mohinder,
    Try giving schdule line number value also in wa_schedule_linesx sctructure.
    wa_order_item_in-itm_number = wa_vbap-posnr.
    wa_order_item_in-plant = wa_vbap-werks.
    wa_order_item_in-material = wa_vbap-matnr.
    wa_order_item_in-target_qty = '1'.
    clear wa_order_item_in.
    *--Adding second line item
    wa_order_item_in-plant = pa_werks.
    wa_order_item_in-material = wa_vbap-matnr.
    wa_order_item_in-target_qty = '1'.
    wa_order_item_inx-itm_number = wa_vbap-posnr.
    wa_order_item_inx-updateflag = c_delete.
    clear wa_order_item_inx.
    wa_order_item_inx-itm_number = wa_vbap-posnr.
    wa_order_item_inx-updateflag = 'I'.
    wa_order_item_inx-material = c_x.
    wa_order_item_inx-plant = c_x.
    wa_order_item_inx-target_qty = c_x.
    wa_order_item_inx-target_qu = c_x.
    append wa_order_item_inx to it_order_item_inx.
    clear wa_order_item_inx.
    ---Partner function changes-------------------------------------------
    concatenate c_p wa_vbap-werks into lv_garage1.
    wa_partnerchanges-updateflag = c_update.
    wa_partnerchanges-document = wa_vbap-vbeln.
    wa_partnerchanges-p_numb_new = lv_garage.
    wa_partnerchanges-partn_role = c_shiptoparty.
    wa_partnerchanges-p_numb_old = lv_garage1.
    append wa_partnerchanges to lt_partnerchanges.
    clear wa_partnerchanges.
    --Schedule Lines------------------------------------------------------
    wa_schedule_lines-itm_number = wa_vbap-posnr.
    wa_schedule_lines-req_qty = wa_vbap-kwmeng.
    wa_schedule_lines-sched_line = '0001'.
    append wa_schedule_lines to lt_schedule_lines.
    clear wa_schedule_lines.
    wa_schedule_linesx-itm_number = wa_vbap-posnr.
    wa_schedule_linesx-sched_line = '0001'. " Add this line and check
    wa_schedule_linesx-updateflag = 'U'.
    wa_schedule_linesx-req_qty = 'X'.
    append wa_schedule_linesx to lt_schedule_linesx.
    clear wa_schedule_linesx.
    Regards,
    Swarna Munukoti

  • Bapi parametrs to be passed in bapi_salesorder_change to change quantity

    Hi,
    how to change quantity of sales order by using bapi_salesorder_change.
    kindly Help us... to solve this Issue....(bapi parametrs to be passed in bapi_salesorder_change to change quantity)
    regards
    sathish Kumar.

    pass the updateflag = U
    pass the posnr,qty,mat in the item and pass the itemx= 'X' to these fileds.

  • How to update order quantity using the fn BAPI_SALESORDER_CHANGE

    Hi experts,
    I have a requirement that,
    when the quantity in the delivery is edited manually , the order quantity  in the sales order should be updated automatically.
    can we achieve that using the Function module BAPI_SALESORDER_CHANGE?
    if so, kindly let me know.
    TIA.
    kanthi.

    kanthi,
    in tables tab in second parameter ORDER_ITEM_IN you can see couple of field for different type of quantity among them you can choose appropriate one.
    field are:
    TARGET_QTY
    RNDDLV_QTY

  • Change sales order using BAPI_SALESORDER_CHANGE

    Hi i want to add a new line item to the existing sales order using BAPI_SALESORDER_CHANGE
    but when i am trying it is giving
    'Schedule line 0001 for item 000020 does not exist ' error..
    please help me..

    *********I wanted to add an new line item.***.. this is my code..********
    LOOP AT gt_input3 INTO st_input3.
    *Finding Max No of line Items
        IF fl_set IS INITIAL.
          READ TABLE gt_vbap INTO st_vbap WITH KEY vbeln = st_input3-vbeln.
          IF sy-subrc EQ 0.
            lv_posnr = st_vbap-posnr.
            fl_set = 'X'.
          ENDIF.
        ENDIF.
    *Populate Item details
        lv_posnr = lv_posnr + 10.
        lv_vbeln = st_input3-vbeln.
        lv_order_header_inx-updateflag = 'U'.
        st_order_item_in-itm_number = lv_posnr.
        st_order_item_in-material  = st_input3-matnr.
        st_order_item_in-target_qty = st_input3-imv_qty.
        st_order_item_in-plant = st_input3-werks.
        st_order_item_in-store_loc = st_input3-lgort.
       st_order_item_in-store_loc = st_input3-lgort.
        APPEND st_order_item_in TO lt_order_item_in.
    *Populate item updation Details
        st_order_item_inx-itm_number = lv_posnr.
        st_order_item_inx-updateflag = 'U'.
        st_order_item_inx-material = 'X'.
        st_order_item_inx-plant = 'X'.
        st_order_item_inx-store_loc = 'X'.
        st_order_item_inx-target_qty = 'X'.
        APPEND st_order_item_inx TO lt_order_item_inx.
    *Populate the Schedule Lines
        st_schedule_lines-itm_number = lv_posnr.
        st_schedule_lines-sched_line = '0001'.
        st_schedule_lines-req_qty = st_input3-imv_qty.
        APPEND st_schedule_lines TO lt_schedule_lines.
    *Populate the update details of schedule lines
        st_schedule_linesx-itm_number = lv_posnr.
        st_schedule_linesx-sched_line = '0001'.
        st_schedule_linesx-req_qty = 'X'.
        st_schedule_linesx-updateflag = 'U'.
        APPEND st_schedule_linesx TO lt_schedule_linesx.
           AT END OF vbeln.
    *Call BAPI Sales order change
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument    = lv_vbeln
              order_header_inx = lv_order_header_inx
            TABLES
              return           = lt_return
              order_item_in    = lt_order_item_in
              order_item_inx   = lt_order_item_inx
              schedule_lines   = lt_schedule_lines
              schedule_linesx  = lt_schedule_linesx.
    *Save Sales Order
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          CLEAR lv_posnr.
          READ  TABLE lt_return INTO st_return WITH KEY type = 'E'.
          st_ipfile_err3-message = st_return-message.
    *Error Log
          LOOP AT gt_temp3 INTO st_temp3.
            IF st_ipfile_err3-message IS NOT INITIAL.
              MOVE st_temp3-record TO st_ipfile_err3-record.
              IF fl_set1 IS INITIAL.
                APPEND st_temp_err TO gt_ipfile_err3.
                fl_set1 = 'X'.
              ENDIF.
              APPEND st_ipfile_err3 TO gt_ipfile_err3.
            ELSE.
              APPEND st_temp3 TO gt_audit3.
            ENDIF.
            CLEAR : st_temp3,
                    st_temp_err,
                    st_ipfile_err3,
                    fl_set.
          ENDLOOP.
          REFRESH : gt_zrman,

  • I want to use the Function Generator VI to send command signals through the NI 7344 motion controller. This will be a closed loop servo valve system. I want to be able to change from say a square wave to a sine wave on the fly. Idea's?

    I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
    I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • How to change pricing formula using bapi_salesorder_change

    Hi,
    I have a customer  portal web application developed in .Net from which I will be getting different values which are changes related to a particular sales order item in SAP. One among these values is the pricing formula used with the sales order item. I am using bapi_salesorder_change to update all the values other than the pricing formula. My input to the bapi is the formula id. I am not sure about the field which I have to use in the bapi structures to update the same. Also I don't even know whether I can use the same bapi to do the required task.
    Requesting help ....
    Thanks,
    Siva

    Sir,
    Thank you for your immediate response.
    Actually we are integrating SAP with the customer portal web application. The requirement is in such a way that the customer portal provides the option to change the sale order details both at the header level as well as item level. The fields include Order qty,Delivery date,Partner details,Payment terms,Terms of sale, Pricing formula etc. The front end consists of a Pricing formula drop down which consists of  the formula descriptions (for eg: ZFA1015-LAST LME W/DAY OF CONT. MOTH) with its corresponding ID(ID is nothing but ZFA1015). At the SAP side my RFC should pick it up and update it for the given item. The process is like if we go to VA02 we have an option called MAINTAIN FORMULA from where we can change the formula used with an item. There the formula id is obtained from the formula repository. In here the we already have the Formula ID given by the front end.
    Hope you are clear wtith the requirement..
    Requesting help..
    Thanks,
    Siva

  • How to use BAPI_SALESORDER_CHANGE to change payment terms in Orders?

    Can any body give me an idea on how to use BAPI_SALESORDER_CHANGE to change payment terms in Orders?
    Regards,
    Dantham Conpolwedson

    Hi,
    try the link
    Link:[https://forums.sdn.sap.com/click.jspa?searchID=24060901&messageID=7265357]

  • Changing TaxJurisdiction Code using BAPI_SALESORDER_CHANGE (URGENT)!!!I

    Hi All,
    I have to change the tax jurisdiction code of ship to party to Tax Jusrisdiction code of Ship from Party (Delivering Plant). How can I achieve this using BAPI_SALESORDER_CHANGE. Please give some inputs.
    Regards,
    Shankar

    Hi Nakul,
    Thanks for immediate response. I tried to change the fields in BAPIADDR1, the Partner Number is updating  but the address fields are not updating.
    Any suggestions.  URGENT Please

  • Re-using a function with minor changes to load sub Nav menu

    Hi.
    I have a function that loads xml and uses its to create a
    main navigation menu. When an object is selected the movie detects
    which button has been selected and traces the label for that
    button. I need to take this a step further and have a
    sub-navigation menu load when the "Home2" button is selected. As
    you can see from the comments in the code with 2 minor changes to
    the createBoxes function, the sub-nav menu can be loaded instead of
    the main nav menu. My problem is this, I need to main nav menu is
    be present at all times, I only need the sub nav to load when the
    Home 2 button is pressed and I somehow need to reuse the
    createBoxes function with the changes stated in the the comments in
    order to load the sub nav menu when required. I want to reuse this
    function (if possible) instead of duplicating the code in a new
    function.
    If anyone can show me how this is done I would be very
    greatful.
    Thanks
    Barry.

    basically the submenu will look exactly the same as the main
    menu, only it will be positioned to the right of it when the home2
    button is pressed. I then need it to unload when any other button
    is pressed. By changing the following lines in the current
    createBoxes function the submenu loads as I would like. I am just
    wondering if it is possible to pass in a couple of vars to change
    the lines of code as detailed below, depending on whether the home2
    button or one of the other mainn nav buttons is pressed.
    The code that when changed loads the submenu:
    In function createBoxes change var il:XMLList =
    xml.navigation.main_navigation; to var il:XMLList =
    xml.navigation.main_navigation.sub_navigation; . This loads the sub
    nav instead of the main nav but in the same position as the main
    nav.
    by also changing box.x = 100; to box.x = 260; in the function
    createBoxes the sub nav menu loads in the position I would like it
    to be.
    Now I am wondering if changing the code to something like the
    following (see attached code) could this work?
    Barry.

  • Anyone have a problem using iPhoto "change date of photo" function?

    I imported some old photos today and need to sent the time on them. I selected the photos and used the "Change date of photo" function. It worked fine on the first set. I tried adjust a second set and that's where problem began. I needed to change the date from 01-01-2002 to the correct date of 05-28-2004. I photo instead set the date to somewhere in 1989. I thought I must have typed the date wrong. So I selected the photos and tried again. Nope, it wasn't me. The date on the photos was set back to some time in 1983. I tried several more time... Well, lets just say I have photos dated in the 1700's..

    I had searched the forum and could not find anything. Maybe someone knows where is is.
    I fixed the photos the "brute force" way.
    I deleted them from the library.
    Changed the date on the files on a different computer and imported them again.
    However this seam like a crap way to fix a iPhoto issue.
    I hope that I don't need to fix the time on any more photos..
    Clarence.

  • Deleting Sales Order Details using BAPI_SALESORDER_CHANGE And Reinserting

    Hi All,
    I need to <b>change a Sales Order</b> in such a way that I would <b>delete all the existing Line Items</b> of that SO And <b>then reinsert new Line Items</b> as generally is the practice of saving a document.(Update Header-Delete Old Item Entries-Reinsert New Present Entries).
    I coded a small test program in ABAP using the <b>BAPI_SALESORDER_GETLIST And BAPI_SALESORDER_CHANGE</b>.
    In order to affect the Qty I have to update the Schedule Parameter also of the BAPI_SALESORDER_CHANGE Function.But this causes a new entry in VBEP.
    eg:
    <b>Before BAPI Calls</b>
    SO-Number:9001
    Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    I coded the program such that
    1.I <b>Get the List of Items</b> using BAPI_SALESORDER_GETLIST.
    2.Call the <b>BAPI_SALESORDER_CHANGE</b> filling appropraite   values in Parameters <b>with UpdateFlag = 'D'</b>
    3.<b>Insert new values</b> in OrderItems And Schedule Parameters
    say:
    Detail:ItemNo=10,Material=xyz,TargetQty=25,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=25,etc...
    4.<b>Call the BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'I'</b>
    <b>The output now becomes.</b>Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    ItemNo=10,Scheduleline=2,Req_Qty=25,etc...
    Now After Commit when I see my <b>SO it shows me a qty of
    125</b>.
    I am attaching the code for your analysis.
    Thanx in advance.
    *& Report  ZSM_CHANGESALESORDER                                        *
    REPORT  ZSM_CHANGESALESORDER                    .
    DATA:
    For Calling the GetList BAPI Function
      CUSTOMER_NUMBER LIKE  BAPI1007-CUSTOMER,
      SALES_ORGANIZATION LIKE  BAPIORDERS-SALES_ORG,
      IT_SALES_ORDERS LIKE TABLE OF BAPIORDERS,
      WA_SALES_ORDERS LIKE LINE OF IT_SALES_ORDERS,
      IT_RETURN LIKE TABLE OF BAPIRETURN,
      WA_RETURN LIKE LINE OF IT_RETURN.
    For Calling the ChangeFromData BAPI Function
    DATA:
      SALESDOCUMENT LIKE  BAPIVBELN-VBELN,
      WA_ORDER_HEADER_IN LIKE  BAPISDH1,
      WA_ORDER_HEADER_INX LIKE BAPISDH1X,
      IT_ORDER_ITEM_IN LIKE TABLE OF BAPISDITM ,
      WA_ORDER_ITEM_IN LIKE LINE OF IT_ORDER_ITEM_IN,
      IT_ORDER_ITEM_INX LIKE TABLE OF BAPISDITMX ,
      WA_ORDER_ITEM_INX LIKE LINE OF IT_ORDER_ITEM_INX,
      IT_SCHEDULE_LINES LIKE TABLE OF BAPISCHDL ,
      WA_SCHEDULE_LINES LIKE LINE OF IT_SCHEDULE_LINES,
      IT_SCHEDULE_LINESX LIKE TABLE OF BAPISCHDLX ,
      WA_SCHEDULE_LINESX LIKE LINE OF IT_SCHEDULE_LINESX,
      IT_RETURN_CHG LIKE TABLE OF BAPIRET2,
      WA_RETURN_CHG LIKE LINE OF IT_RETURN_CHG.
    DATA:
      IT_RETURN_CT LIKE BAPIRET2.
    PARAMETERS:
      P_SO LIKE VBAK-VBELN,
      P_CUSTNO LIKE  BAPI1007-CUSTOMER,
      P_SORG LIKE BAPIORDERS-SALES_ORG.
    START-OF-SELECTION.
      SALESDOCUMENT = P_SO.
      CUSTOMER_NUMBER = P_CUSTNO.
      SALES_ORGANIZATION = P_SORG.
    Retrieve the Existing Sales Order details for that Sales Order.
      PERFORM GETREQSODETAILS.
    Delete the Existing Sales Order details from that Sales Order.
      PERFORM DELETEOLDSODETAILS.
    Insert New details for that Sales Order.
       PERFORM ADDNEWSODETAILS.
    END-OF-SELECTION.
      PERFORM COMMITTRANS.
    *&      Form  GetReqSODetails
    FORM GETREQSODETAILS .
      CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
        EXPORTING
          CUSTOMER_NUMBER    = CUSTOMER_NUMBER
          SALES_ORGANIZATION = SALES_ORGANIZATION
        IMPORTING
          RETURN             = WA_RETURN
        TABLES
          SALES_ORDERS       = IT_SALES_ORDERS.
    *delete the Sales Order Details of Sales Orders other than the req.One
      IF NOT IT_SALES_ORDERS[] IS INITIAL.
        SORT IT_SALES_ORDERS BY SD_DOC.
        LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
          IF WA_SALES_ORDERS-SD_DOC NE SALESDOCUMENT.
            DELETE IT_SALES_ORDERS.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " GetReqSODetails
    *&      Form  deleteOldSODetails
    FORM DELETEOLDSODETAILS .
      DATA: IRECCOUNT TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER 'D'.
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER IRECCOUNT 'D'.
      ENDLOOP.
    *call the Sales Order Change Fumction to delete the Existing Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " deleteOldSODetails
    *&      Form  SOHeaderIndex
    FORM SOHEADERINDEX .
      WA_ORDER_HEADER_INX-UPDATEFLAG = 'U'.
    ENDFORM.                    " SOHeaderIndex
    *&      Form  FillSODeleteDtls_Index_param
    FORM FILLSODELETEDTLS_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_FLAG).
      WA_ORDER_ITEM_INX-ITM_NUMBER = P_ITM_NUMBER.
      WA_ORDER_ITEM_INX-UPDATEFLAG = P_FLAG.
      APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
    ENDFORM.                    " FillSODeleteDtls_Index_param
    *&      Form  FILLSODELETEsch_Index_PARAM
    FORM FILLSODELETESCH_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_RECCOUNT) VALUE(P_FLAG).
      WA_SCHEDULE_LINESX-ITM_NUMBER = P_ITM_NUMBER.
      WA_SCHEDULE_LINESX-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINESX-UPDATEFLAG = P_FLAG.
      APPEND WA_SCHEDULE_LINESX TO IT_SCHEDULE_LINESX.
    ENDFORM.                    " FILLSODELETEsch_Index_PARAM
    *&      Form  addnewSODETAILS
    FORM ADDNEWSODETAILS .
      DATA: IRECCOUNT TYPE I, ITEMNO TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      WHILE IRECCOUNT <= 1.
        ITEMNO = IRECCOUNT * 10.
    *Fill the New Order Details in the Internal Table
        PERFORM FILLSODTLDATA USING ITEMNO 'TEST FG' 37 .
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM USING ITEMNO 'I'.
    *Fill the New Schedule Details in the Internal Table
        PERFORM FILLSOSCHDATA USING ITEMNO IRECCOUNT 37 .
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING ITEMNO IRECCOUNT 'I'.
        IRECCOUNT = IRECCOUNT + 1.
      ENDWHILE.
    *call the Sales Order Change Fumction to Insert New Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_IN    = IT_ORDER_ITEM_IN
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINES   = IT_SCHEDULE_LINES
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " addnewSODETAILS
    *&      Form  clearData
    FORM CLEARDATA .
      CLEAR WA_ORDER_HEADER_INX.
      CLEAR WA_ORDER_ITEM_INX.
      REFRESH IT_ORDER_ITEM_INX.
      CLEAR WA_SCHEDULE_LINESX.
      REFRESH IT_SCHEDULE_LINESX.
      CLEAR WA_RETURN.
      REFRESH IT_RETURN.
      CLEAR WA_ORDER_ITEM_IN.
      REFRESH IT_ORDER_ITEM_IN.
      CLEAR WA_SCHEDULE_LINES.
      REFRESH IT_SCHEDULE_LINES.
    ENDFORM.                    " clearData
    *&      Form  FILLSODTLDATA
    FORM FILLSODTLDATA  USING    VALUE(P_ITEMNO) VALUE(P_MATERIAL)
    VALUE(P_TARGET_QTY) .
      WA_ORDER_ITEM_IN-ITM_NUMBER = P_ITEMNO.
      WA_ORDER_ITEM_IN-MATERIAL = P_MATERIAL.
      WA_ORDER_ITEM_IN-TARGET_QTY = P_TARGET_QTY.
      APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
    ENDFORM.                    " FILLSODTLDATA
    *&      Form  FILLSOschDATA
    FORM FILLSOSCHDATA  USING    VALUE(P_ITEMNO)
                                 VALUE(P_RECCOUNT)
                                 VALUE(P_REQ_QTY)  .
      WA_SCHEDULE_LINES-ITM_NUMBER = P_ITEMNO.
      WA_SCHEDULE_LINES-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINES-REQ_QTY = P_REQ_QTY.
      APPEND WA_SCHEDULE_LINES TO IT_SCHEDULE_LINES.
    ENDFORM.                    " FILLSOschDATA
    *&      Form  committrans
    FORM COMMITTRANS .
      DATA:SUCCESSFLAG(1).
      LOOP AT IT_RETURN_CHG INTO WA_RETURN_CHG.
        IF WA_RETURN_CHG-TYPE = 'S'
              AND WA_RETURN_CHG-ID = 'V1'
              AND WA_RETURN_CHG-NUMBER = 311
              AND SUCCESSFLAG IS INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT   = 'X'
            IMPORTING
              RETURN = IT_RETURN_CT.
          SUCCESSFLAG = 'X'.
        ENDIF.
      ENDLOOP.
      IF SUCCESSFLAG IS INITIAL.
        WRITE: 'SORRY SOME ERROR'.
      ELSE.
        WRITE: 'SUCCESSFUL'.
      ENDIF.
    ENDFORM.                    " committrans

    Thanx wolfgang,
    I needed that info.
    As I had mentioned in the earlier posts, I want to delete the old Sales Order Item Details,
    Schedule Details,Basic Price data And Reinsert data in the same.
    I am giving u the algo that I have used.
    1.<b>Get the SalesOrder Details</b> for a particular Sales Order using BAPI_SALESORDER_GETLIST(para:customer & sales Org and then deleting unwanted SO data).
    2.<b>Delete</b> the Sales Order <b>Item Details,Schedule Details</b> using BAPI_SALESORDER_CHANGE.
    3.<b>Commit</b> Transaction(<b>If I dont use this commit Error comes in Step No.7 while Commiting</b>)
    using BAPI_TRANSACTION_COMMIT.
    4.Check <b>Return Table</b> of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    5.if Step No.4 is <b>Not okay</b> <b>then Rollback</b>(BAPI_TRANSACTION_TRANSACTIN) <b>and Exit</b> <b>else move to step 6</b>.
    6.<b>Add New</b> Sales Order <b>Item Details,Schedule Details, Basic Price</b> using BAPI_SALESORDER_CHANGE.
    7.<b>Commit Transaction</b> using BAPI_TRANSACTION_COMMIT.
    8.<b>Check Return</b> Log of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    9.if Step No.9 is okay then Exit else Rollback(BAPI_TRANSACTION_TRANSACTIN) and move to step 10.
    10.Add Old Sales Order Item Details,Schedule Details, Basic Price from Data available in Internal
    table(Filled in step.1 ) using BAPI_SALESORDER_CHANGE.
    11.Commit Transaction using BAPI_TRANSACTION_COMMIT.
         This <b>works fine in 1 server in which I get the message of Incomplete Data,etc...when I make a Sales Order from va01</b>.
    But in another server where I dont this message,I get <b>error in step  7 or 11 as per the flow</b>.
    The return structure of BAPI_TRANSACTION_COMMIT contains error with Message 'Updating was not possible'. Also the message 'Updation was terminated' cms frm the SAP server.  
         What could be the reason?
    Thanx in advance

Maybe you are looking for

  • I need help! urgent !!! MAIL CLIENT

    I need "simple" mail client in made Jbuilder for my school. Please help me. I have no idea how to do it. I need source etc. Please help me. It's very urgent. Thanx very much.

  • Faint dark line on edges of iPad Air, is this normal?

    Hi, I have an iPad Air that along both long edges of the screen has faint dark lines.  It's more noticeable on white, and tan color screens.  Is this normal?  Thanks all!

  • How to split PDF by every n pages?

    Check this tutorial to tell how to split pdf by every pages:http://www.kvisoft.com/tutorials/split-pdf-by-every-n-page(s).html

  • How to authorize other Macs for OSX Lion?

    Hello, My sister bought a refurbished MacBook Pro that came with the former OSX release 10.6 Snow Leopard. I know that I can authorize her Mac to allow the download and installation of OSX Lion. The problem is that she already created a different App

  • Re: Problem in playing audio/video from server to client using RTP and RTSP.

    Take a look through the links listed here http://forum.java.sun.com/thread.jspa?threadID=5151618&tstart=0 try the sample applications - use bits fom them to build your aown App & post up any quetsions / problems you get as you go along And this link