Fonction SAP BAPI_SALESDOCUMENT_CHANGE - BAPI Change Sales Document

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
ORDER_HEADER_IN BAPISDHEAD1 u 768 Sales Document Header
ORDER_HEADER_INX BAPISDHEAD1X u 102 Sales Document Header Checkbox
SALESDOCUMENT BAPIVBELN-VBELN C 10 X Sales and Distribution Document Number
SIMULATION BAPIFLAG-BAPIFLAG C 1 SPACE X Simulation Mode

Paramètre Reférence Long. Facultatif Description
ITEM_IN BAPISDITEM 1131 X Sales and Distribution Document Item
ITEM_INX BAPISDITEMX 149 X Sales Document Item Checkbox
RETURN BAPIRET2 548 Return Code
SALES_CFGS_BLOB BAPICUBLB 256 X Internal Configuration Data (SCE)
SALES_CFGS_INST BAPICUINS 233 X Configuration: Instances
SALES_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of specifications
SALES_CFGS_REF BAPICUCFG 397 X Configuration: Reference Data
SALES_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic Values
SCHEDULE_IN BAPISCHEDULE 182 X Schedule Lines
SCHEDULE_INX BAPISCHEDULEX 105 X Schedule Line Checkbox

Functionality
Using this method, you can change or delete sales documents.
You can change header data, item data, schedule line data andconfiguration data.
This is a general rule:
1. You only need to enter the fields you wish to change.
2. Select these with an X in the relevant checkboxes.
3. Fill in the UPDATE field with a U.
4. You must always enter key fields if you make a change, inculding in
the checkbox.
5. The configuration is an exception. If you change it, you must
fill it in completely.
Maintain the quantities and dates via schedule line data.
7. Possible UPDATEFLAGS:
U = Change
D = Delete
I = Insert

Example
1.Completely delete sales document
2.Delete sales document item
3.Changes to sales documents
4.Change configuration

Notes
1.Miminum entries:
The sales document number must definitely be created in the structure
SALESDOCUMENT.
Key fields must always be entered when making a change.
The Update indicator in ORDER_HEADER_INX must always be entered.
2.Commit control The BAPI does not do a database Commit. As a result,the application being used must call up Commit, so that changes can becarried out on the database. The BAPI BAPI_TRANSACTION_COMMIT isavailable for this.
INCLUDE SD_BAPIVBELN_DOCU OBJECT DOKU ID TX
INCLUDE SD_BAPI_RETURN OBJECT DOKU ID TX

495964Check incorrect date in the BAPI