SAP Function BAPI_SALESORDER_CHANGE - Sales order: Change Sales Order

Parameter Reference Type Length Default Optional Text
BEHAVE_WHEN_ERROR BAPIFLAG-BAPIFLAG C 1 SPACE X Error Handling
INT_NUMBER_ASSIGNMENT BAPIFLAG-BAPIFLAG C 1 SPACE X Internal Item Number Assignment
LOGIC_SWITCH BAPISDLS u 5 X SD Checkbox for the Logic Switch
NO_STATUS_BUF_INIT BAPIFLAG-BAPIFLAG C 1 SPACE X No Refresh of Status Buffer
ORDER_HEADER_IN BAPISDH1 u 778 X Order Header
ORDER_HEADER_INX BAPISDH1X u 108 Sales Order Check List
SALESDOCUMENT BAPIVBELN-VBELN C 10 Order Number
SIMULATION BAPIFLAG-BAPIFLAG C 1 X Simulation Mode

Parameter Reference Length Optional Text
CONDITIONS_IN BAPICOND 336 X Conditions
CONDITIONS_INX BAPICONDX 46 X Conditions Checkbox
EXTENSIONIN BAPIPAREX 990 X Customer Enhancement for VBAK, VBAP, VBEP
ORDER_CFGS_BLOB BAPICUBLB 256 X Internal Configuration Data (SCE)
ORDER_CFGS_INST BAPICUINS 233 X Configuration: Instances
ORDER_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of Specifications
ORDER_CFGS_REF BAPICUCFG 397 X Configuration: Reference Data
ORDER_CFGS_REFINST BAPICUREF 20 X Configuration: Reference Item / Instance
ORDER_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic Values
ORDER_CFGS_VK BAPICUVK 55 X Configuration: Variant Condition Key
ORDER_ITEM_IN BAPISDITM 1622 X Order Items
ORDER_ITEM_INX BAPISDITMX 195 X Sales Order Items Check Table
ORDER_KEYS BAPISDKEY 189 X Output Table of Reference Keys
ORDER_TEXT BAPISDTEXT 160 X Texts
PARTNERADDRESSES BAPIADDR1 1574 X BAPI Reference Structure for Addresses (Org./Company)
PARTNERCHANGES BAPIPARNRC 149 X Partner changes
PARTNERS BAPIPARNR 664 X Communications Fields: SD Document Partner: WWW
RETURN BAPIRET2 548 Return Code
SCHEDULE_LINES BAPISCHDL 198 X Schedule Lines
SCHEDULE_LINESX BAPISCHDLX 109 X Check Table for Schedule Lines

Functionality
You can use this method to change or delete sales orders.
You can change header, item, schedule line and configuration data.
In general, note that you should:

  • Only specify fields that should be changed

  • Select these fields by entering an X in the checkboxes

  • Enter a U in the UPDATEFLAG field

  • Always specify key fields when changing the data, including in the
  • checkboxes
    • The configuration is an exception here. If this needs to be changed,
    • you need to complete it again fully.
      • Maintain quantities and dates in the schedule line data

      • Possible UPDATEFLAGS:

      • U = change
        D = delete
        I = add

        Example
        Delete the whole order
        Delete order items
        Change the order
        Change the configuration
        RESET N1

        Notes
        Minimum entry:
        You must enter the order number in the SALESDOCUMENT structure.
        You must always enter key fields for changes.
        You must always specify the update indicator in the ORDER_HEADER_INX.
        Commit control:
        The BAPI does not run a database Commit, which means that theapplication must trigger the Commit so that the changes are read to thedatabase. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
        INCLUDE SD_BEHAVE_WHEN_ERROR OBJECT DOKU ID TX
        INCLUDE SD_BAPI_INTNUMASS OBJECT DOKU ID TX

        Description
        This parameter contains data for the sales document header.
        You can find more information about the individual parameter fields inthe relevant data element documentation in the ABAP Dictionary.
        INCLUDE SD_BAPISDHEADX1_DOCU OBJECT DOKU ID TX
        INCLUDE SD_BAPIVBELN_DOCU OBJECT DOKU ID TX
        INCLUDE SD_BAPI_SIMULATION OBJECT DOKU ID TX
        INCLUDE SD_BAPICONDITION_DOCU OBJECT DOKU ID TX
        INCLUDE SD_EXTENSIONIN OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_BLOB OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_INST OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_PART_OF OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_REF OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_REFINST OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_VALUE OBJECT DOKU ID TX
        INCLUDE SD_BAPI_CFGS_VK OBJECT DOKU ID TX

        Description
        This parameter contains the data for the sales document item.
        You can find more information about the individual paramter fields inthe relevant data element documentation in the ABAP Dictionary.
        INCLUDE SD_BAPISDITEMX_DOCU OBJECT DOKU ID TX
        INCLUDE SD_BAPI_KEYS OBJECT DOKU ID TX
        INCLUDE SD_BAPI_TEXT OBJECT DOKU ID TX
        INCLUDE SD_BAPI_RETURN OBJECT DOKU ID TX

        Description
        This parameter contains the data for schedule lines in sales documents.
        You can find more information about the individual parameter fields inthe relevant data element documentation in the ABAP Dictionary.
        INCLUDE SD_BAPISCHEDULEX_DOCU OBJECT DOKU ID TX

1470139Err. message VPD034 issued incorrectly when CHANGE BAPI used
700795Enhancement category of BAPI enhancement structures
555989BAPI SD: Status of preceding document is reset
522356Bills of material in the BAPI
333049BAPI_SALESORDER_CREATEFROMDAT2 and configuration
495964Check incorrect date in the BAPI
436247Enhancements for connection of R/3 to CRM Release 3.0
481102BAPI_SALESORDER_CREATEFROMDAT2 & configuration
446681Usage indicator for the CHANGE BAPIs
376539BAPI SD: Errors in partner/address specifications ignored
396530BAPI SD: Header texts are not copied when changing
391266Texts disappear with BAPI & EDI ( Change - case )
392934Problem with text changes by means of BAPI or IDocs
388015Message E00055 in CHANGE BAPI during third-party processing
350318Dialog box when changing ship-to party via BAPI
321313No address change with CHANGE BAPI
317511Errors V1331 during inernal item number assignment