Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng)

Hi,
I have a requirement to use a Function Module or BAPI to update Sale Order Quantity (VBAP-kwmeng), which one (Function Module or BAPI) should I use? is there any sample codes?
Thanks a lot!!

Hi,
*& Report  ZTEST
REPORT  ztest.
DATA : wa_header TYPE bapisdh1x,
            i_item TYPE TABLE OF bapisditm WITH HEADER LINE,
            i_itemx TYPE TABLE OF bapisditmx WITH HEADER LINE,
            i_return TYPE TABLE OF bapiret2.
           wa_header-updateflag = 'U'.
           i_item-itm_number = '000010'.
           i_item-target_qty = '4'.
           APPEND i_item.
          i_itemx-itm_number = '000010'.
          i_itemx-updateflag = 'U'.
          i_itemx-target_qty = 'X'.
          APPEND i_itemx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
  EXPORTING
    salesdocument               = '1234567890'
    order_header_inx            = wa_header
  TABLES
    return                            = i_return
    order_item_in                 = i_item
    order_item_inx               = i_itemx
Hope this will help you.
Regards,
Anand.

Similar Messages

  • Function Module or BAPI to update Sales Order (delivery Block)

    Hi,
    Is there a Function Module or BAPI available that can update the Delivery Block for a looping Sales Order?
    Thanks,
    John

    Hi,
    check this sample code to update delivery block..
    DATA: BAPISDH1X LIKE BAPISDH1X.
    DATA: BAPISDH1 LIKE BAPISDH1.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY.
    PARAMETERS: P_LIFSK  LIKE VBAK-LIFSK OBLIGATORY.
    * Header
    BAPISDH1-DLV_BLOCK = p_lifsk.   " Delivery block
    * header X
    BAPISDH1X-DLV_BLOCK = 'X'.   " Delivery block
    BAPISDH1X-UPDATEFLAG = 'U'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_in   = BAPISDH1
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    LOOP AT T_RETURN WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    * Check for error messages.
    IF SY-SUBRC = 0.
      WRITE: / 'Sales order not updated', T_RETURN-MESSAGE.
    ELSE.
    * Successfully updated
      WRITE: / 'Sales order updated'.
    ENDIF.
    COMMIT WORK.
    Thanks
    Naren

  • Any function module or bapi to get sales order number and invoice number?

    hi all,
    with delivery order number provided, do we have any function module or bapi to get sales order number
    and invoice number?
    thanks.

    Hi,
    Check
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_REMUREQSLISTA_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
    BAPI_REMUREQSLISTB_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Payment Documents
    BAPI_REMUREQSLISTC_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Posting Lists
    BAPI_REMUREQSLIST_CHANGEMULT   Agency Business: Change Invoice List Documents BAPI
    BAPI_REMUREQSLIST_GETLIST      Agency Business: BAPI Determine Detailed Data for Invoice List Documents
    BAPI_REMUREQSLIST_RELEASE      Agency Business: BAPI Release Invoice List Documents to FI
    Edited by: Neenu Jose on Nov 26, 2008 8:53 AM

  • Need name of a function module or BAPI to update the Tax Classification val

    Hi Guru's
    Need name of a function module or BAPI to update the Tax Classification value for Material master.
    Thanks in advance.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • Function Module or BAPI to update Short text  for sales order item(vl02n)

    Hi All,
    I need to update the Short text for sales order item in vl02n transaction from an internal table with Delivery number and other relevant details .
    Does any body know any Function Module or BAPI which can accomplish this purpose .
    Or else writing BDC is the only option I have got ? .
    Please clarify .
    Thanking you in advance .
    With Regards,
    Suriya .

    Hi
    You can try using BAPI_SALESORDER_CHANGE if you want to change sales order
    Regards
    MD

  • Function Module or BAPI to update the cheque payments

    Hi Everyone,
    I would like to know whether we have any Function Module or BAPI which can update the cheque payment or its attributes into SAP.
    Thanks,
    KC
    Message was edited by:
            kittu chowdary

    Aniruddha,
    Does this BAPI update the Transactions FCH6, FCH9 ?
    Thanks,
    KC

  • Function Module or BAPI to update Delivery Date (LIKP-lfdat)

    Hello friends,
    I have a requirement to update Delivery Date (LIKP-lfdat) , is there any Function Module or BAPI to do that? any sample codes are appreciated.
    Thanks a lot!
    Edited by: Qiwei Yin on Dec 11, 2008 8:50 AM

    hi
    try this
    BAPI_SALESORDER_CHANGE
    hope this helps
    regards
    Aakash Banga

  • Function module for deleting the perticular sales order

    Hi Experts
    I wanted a function module name for deleting the perticular sales order document ,when i enter the import parameter as sales order no  and some value as export parameters so that i can use that for the program (message :successfully deleted ).

    Hi Satya,
    Use BAPI BAPI_SALESORDER_CHANGE as follows:
    DATA: T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
    DATA: BAPISDH1X LIKE BAPISDH1X.
    PARAMETERS: P_VBELN LIKE VBAK-VBELN.
    *SET THE DELETION FLAG
    BAPISDH1X-UPDATEFLAG = 'D'.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = P_VBELN
    order_header_inx = BAPISDH1X
    tables
    return = T_RETURN
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Hope this will help.
    Regards,
    Nitin.
    Edited by: Nitin Karamchandani on Dec 8, 2008 8:36 AM

  • Function Module or BAPI to update a job's parameters like Spool retention

    Hi All,
    Anyones knows any BAPI or Function Module through with we can update a job's parameters  like Spool retention period or Spool request title or some other printer settings.
    Thanks in Advance.
    Regards,
    Shailendra

    Hi,
    BAPI_XBP_JOB_HEADER_MODIFY

  • FM/BAPI to update sales order item characteristic values

    Hi experts,
    I have an urgent requirement on changing the characteristic values of a sales order item (VA01/VA02). Is there any FM or BAPI to update the characteristc values?
    Points will be awarded.
    Regards,
    Leo

    Hi,
    I need an FM/BAPI that can be run inside user exit USEREXIT_SAVE_DOCUMENT_PREPARE to update the item configuration. I tried the FM you have given me but it didn't work. If you have sample codes that can update the configuration values of the sales order item, it will help me a lot. Thanks!
    Regards,
    Leo

  • Function Module for Incompletion Log in Sales Order

    Hello All,
    Can anybody provide me the function module when the sales order is incomplete due to Incompletion log.
    Thanks,

    HI,
    Use the functional module:   RV_MISSING_DOCUMENT_DATA.
    Goto SE37 and press F7, input the material/order number etc in the import data field  VBCOM.
    And then execute the module. By using this module we will get all the incomplete items in an order.
    If you want list of incomplete orders, use V.02 transaction code.
    Regards,
    Satya.

  • Function module which uses both BAPI's for sales order create and change

    Please name the function module which uses both BAPI's for sales order create and change.
    BAPI_SALESORDER_CREATEFORMDAT2
    BAPI_SALESORDERCHANGE

    Yup.
    you must write a piece of code for this.
    with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
    logic somethig like this.
    Amit.

  • Function module or BAPI for getting all the Idoc numbers of a sales order

    Hi Folks,
    Is there any function module or BAPI exists for getting all the Idoc numbers which are generated for a Sales order.
    Thanks in advance.
    Regards,
    Sarath.....

    Hi Sarath,
    try this function module...
    BAPI_IDOCAPPL_DISPLAY
    Regards,
    Prabhudas

  • I am trying to find a function module or BAPI for internal order change. I

    I am trying to find a function module or BAPI for internal order change. I did come across a function module ALE_INTERNALORDER_DB_CHANGE which directly updates the internal order using insert statements. Can i use this for internal order change or this is any other Function module for updating the internal order.
    I dont want to use BDC as a option. Please suggest.

    This is possible using the Rotator Component Widget from Infosemantics.com.au but it is only compatible with  SWF output, not HTML5.
    Go to this page and scroll down to the video tutorials about the Rotator Component widget:
    http://www.infosemantics.com.au/adobe-captivate/youtube-video-tutorials

  • BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition

    Dear All,
    BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition in PO pricing. Please give me a right solution on this query.
    Below I have given my code.
    Thanks and Regards
    Makarabd
    poitem-po_item = '00010'.
    poitem-net_price = '1060.00'.
    poitem-period_ind_expiration_date = 'D'.
    APPEND poitem.
    poitemx-po_item = '00010'.
    poitemx-po_itemx = 'X'.
    poitemx-net_price = 'X'.
    APPEND poitemx.
    select single * from ekko where ebeln = po_no.
    pocond-itm_number = '00010'.
    pocond-cond_type = 'ZVCU'.
    pocond-cond_value = 10.
    pocond-currency = '%'.
    pocond-STAT_CON = 'X'.
    pocond-accruals = 'X'.
    pocond-change_id = 'I'.   " I - Add , U - Update , D - Delete
    APPEND pocond.
    pocondx-itm_number = '00010'.
    pocondx-itm_numberx = 'X'.
    pocondx-cond_type = 'X'.
    pocondx-cond_value = 'X'.
    pocondx-currency = 'X'.
    pocondx-change_id = 'X'.
    pocondx-STAT_CON = 'X'.
    pocondx-accruals = 'X'.
    APPEND pocondx.
       CALL FUNCTION 'BAPI_PO_CHANGE'
            EXPORTING
              purchaseorder          = po_no
            TABLES
              return                 = return
              poitem                 = poitem
              poitemx                = poitemx
              pocond                 = pocond
              pocondx                = pocondx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.

    Hi ,
    Are you trying to pass the non char fields in CI_COBL. Please look at the link below .
    [http://forums.sdn.sap.com/thread.jspa?threadID=1137795] .
    Also serach for the similar threads when and notes while transferring currency and quantity field in different custom includes of the EKPO ...
    Thanks,
    Anjaneya .

Maybe you are looking for

  • [GeForceFX] Difference Between DVI-I And DVI-D

    I have a FX-5200-TD128 video card that is marked DVI-I and looking at LCD monitors I noticed some of them are marked DVI-D.  Is there a difference?

  • 5 system landscape for MDM?

    We are in the process to layout infrastructure for release 2 of our transformation project for ECC, MDM, PI, BODS. We are debating on possible solutions 1) typical 5 system landscape like below. DEV->QA->PRD DEV2->QA2 DEV2, QA2 are project landscape

  • Internal WiFi card not getting IP

    Hi there, I am having a problem with my Airport in the way of it not getting a valid IP address. At first I though this was due to the router. No so as my Sisters MacBook (exactly the same model and version) works fine. Also it will not connect to an

  • No audio in multicam CC

    Hello, working in Premiere Pro CC and can not get audio in multicam to work for some reason (1) selected clips AND THEIR AUDIO in timeline and selected Nest (2) enable multicam (3) double click nested compostion in timeline to open Multicam Window -

  • Generic Groupwise to Exchange Migration Advice

    Good afternoon folks, I am after some general advice/guideance on a migration project that I am about to start working on. We're taking a Novell eDirector/Groupwise environment to Microsoft AD/Exchange...I know there's tools/utils that will do the mi