BAPI_TRADINGCONTRACT_HISTORY is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_TRADINGCONTRACT_HISTORY into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
2124
Released Date:
04.02.2000
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_TRADINGCONTRACT_HISTORY' "Trading Contract: Changes to a Contract
EXPORTING
tradingcontractno = " bapitckey-document_number Trading contract: Trading contract number
* TABLES
* headdataout = " bapitchheado Communication Structure: Header Data Versions Trading Contract:
* itemdataout = " bapitchitemo Communication Structure: Trading Contract Versions, Item
* scheduledataout = " bapitchshlo Comm. Structure: Trading Contract Versions, Schedule Line Data
* businessdataout = " bapitchbuso Comm. Structure: Trading Contract Versions, Business Data
* buspartyout = " bapitchpartyo Comm. Structure: Trading Contract Versions, Partner
* changeout = " bapitchchange Change Document Header
* extensionout = " bapiparex Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* return = " bapiret2 Return parameter
* headtextout = " bapitchheadctext Trading Contract: Header Text Versions in Case of Change
* itemtextout = " bapitchitemctext TC: Item Texts in Case of Change Including Version
. " BAPI_TRADINGCONTRACT_HISTORY
The ABAP code below is a full code listing to execute function module BAPI_TRADINGCONTRACT_HISTORY including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| it_headdataout | TYPE STANDARD TABLE OF BAPITCHHEADO,"TABLES PARAM |
| wa_headdataout | LIKE LINE OF it_headdataout , |
| it_itemdataout | TYPE STANDARD TABLE OF BAPITCHITEMO,"TABLES PARAM |
| wa_itemdataout | LIKE LINE OF it_itemdataout , |
| it_scheduledataout | TYPE STANDARD TABLE OF BAPITCHSHLO,"TABLES PARAM |
| wa_scheduledataout | LIKE LINE OF it_scheduledataout , |
| it_businessdataout | TYPE STANDARD TABLE OF BAPITCHBUSO,"TABLES PARAM |
| wa_businessdataout | LIKE LINE OF it_businessdataout , |
| it_buspartyout | TYPE STANDARD TABLE OF BAPITCHPARTYO,"TABLES PARAM |
| wa_buspartyout | LIKE LINE OF it_buspartyout , |
| it_changeout | TYPE STANDARD TABLE OF BAPITCHCHANGE,"TABLES PARAM |
| wa_changeout | LIKE LINE OF it_changeout , |
| it_extensionout | TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM |
| wa_extensionout | LIKE LINE OF it_extensionout , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return , |
| it_headtextout | TYPE STANDARD TABLE OF BAPITCHHEADCTEXT,"TABLES PARAM |
| wa_headtextout | LIKE LINE OF it_headtextout , |
| it_itemtextout | TYPE STANDARD TABLE OF BAPITCHITEMCTEXT,"TABLES PARAM |
| wa_itemtextout | LIKE LINE OF it_itemtextout . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_tradingcontractno | TYPE BAPITCKEY-DOCUMENT_NUMBER , |
| it_headdataout | TYPE STANDARD TABLE OF BAPITCHHEADO , |
| wa_headdataout | LIKE LINE OF it_headdataout, |
| it_itemdataout | TYPE STANDARD TABLE OF BAPITCHITEMO , |
| wa_itemdataout | LIKE LINE OF it_itemdataout, |
| it_scheduledataout | TYPE STANDARD TABLE OF BAPITCHSHLO , |
| wa_scheduledataout | LIKE LINE OF it_scheduledataout, |
| it_businessdataout | TYPE STANDARD TABLE OF BAPITCHBUSO , |
| wa_businessdataout | LIKE LINE OF it_businessdataout, |
| it_buspartyout | TYPE STANDARD TABLE OF BAPITCHPARTYO , |
| wa_buspartyout | LIKE LINE OF it_buspartyout, |
| it_changeout | TYPE STANDARD TABLE OF BAPITCHCHANGE , |
| wa_changeout | LIKE LINE OF it_changeout, |
| it_extensionout | TYPE STANDARD TABLE OF BAPIPAREX , |
| wa_extensionout | LIKE LINE OF it_extensionout, |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| it_headtextout | TYPE STANDARD TABLE OF BAPITCHHEADCTEXT , |
| wa_headtextout | LIKE LINE OF it_headtextout, |
| it_itemtextout | TYPE STANDARD TABLE OF BAPITCHITEMCTEXT , |
| wa_itemtextout | LIKE LINE OF it_itemtextout. |
You use this method to provide the trading contract history.
You use the document number to select the trading contract you want to
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_TRADINGCONTRACT_HISTORY or its description.
BAPI_TRADINGCONTRACT_HISTORY - Trading Contract: Changes to a Contract BAPI_TRADINGCONTRACT_GET_LIST - Trading Contract: Determine Document Information BAPI_TRADINGCONTRACT_GET_FLOW - Trading Contract: Read Document Flow BAPI_TRADINGCONTRACT_GETSTATUS - Trading Contract: Supply Status of Trading Contract BAPI_TRADINGCONTRACT_CREATE - Trading Contract: Create from Template Data BAPI_TRADINGCONTRACT_CHANGE - Trading Contract: Change Template Data