‎2007 Jan 31 6:52 PM
Hi all,
I've used BAPI_CUSTOMERCONTRACT_CHANGE to modify dates of a contract (rent) (stored in VEDA).
My problem is that I want to modify item dates and not header dates(I can modify header already)...I call BAPI using
IMPORTING
VALUE(SALESDOCUMENT) LIKE BAPIVBELN-VBELN
VALUE(CONTRACT_HEADER_IN) LIKE BAPISDH1 STRUCTURE BAPISDH1
VALUE(CONTRACT_HEADER_INX) LIKE BAPISDH1X STRUCTURE BAPISDH1X
OPTIONAL
TABLES
RETURN STRUCTURE BAPIRET2
*" CONTRACT_ITEM_IN STRUCTURE BAPISDITM OPTIONAL
*" CONTRACT_ITEM_INX STRUCTURE BAPISDITMX OPTIONAL
CONTRACT_DATA_IN STRUCTURE BAPICTR OPTIONAL
CONTRACT_DATA_INX STRUCTURE BAPICTRX OPTIONAL
Do I have to use
CONTRACT_ITEM_IN STRUCTURE BAPISDITM OPTIONAL
*" CONTRACT_ITEM_INX STRUCTURE BAPISDITMX OPTIONAL
to modify only the items?
Any help¿?
Thanks and REgards.
‎2007 Jan 31 6:57 PM
The document says this:
FU BAPI_CUSTOMERCONTRACT_CHANGE
____________________________________________________
Short text
Change Customer Contract
Functionality
Using this method, you can change or delete contracts.
You can change header data, item data, schedule line data, contract data and configuration data.
In general the following applies:
1. Only enter fields that you want to change.
2. Mark the fields you want to change with an X.
3. Fill in the UPDATEFLAG field with a U.
4. Always enter the key fields when making changes, including in the checkbox list.
5. An exception is configuration. If you change this, you must fill it in completely.
6. Enter quantities and dates under schedule line data.
7. Possible update flags: U = change
D = delete
I = insert
Example
1. Delete complete contract
2. Delete contract item
3. Changes to contract
4. Change configuration
Notes
1. Minimum entries required:
You MUST enter the contract number in the SALESDOCUMENT structure.
You must always enter key fields when you make a change.
You must always enter the update indicator in the INQUIRY_HEADER_INX.
2. Commitment control
The BAPI does not carry out a database commit. This means that the calling application must leave the commit in order to have changes made to the database. BAPI_TRANSACTION_COMMIT is available for this purpose.
Parameter
SALESDOCUMENT
CONTRACT_HEADER_IN
CONTRACT_HEADER_INX
SIMULATION
BEHAVE_WHEN_ERROR
INT_NUMBER_ASSIGNMENT
LOGIC_SWITCH
NO_STATUS_BUF_INIT
RETURN
CONTRACT_ITEM_IN
CONTRACT_ITEM_INX
PARTNERS
PARTNERCHANGES
PARTNERADDRESSES
CONDITIONS_IN
CONDITIONS_INX
CONTRACT_CFGS_REF
CONTRACT_CFGS_INST
CONTRACT_CFGS_PART_OF
CONTRACT_CFGS_VALUE
CONTRACT_CFGS_BLOB
CONTRACT_CFGS_VK
CONTRACT_CFGS_REFINST
CONTRACT_TEXT
CONTRACT_DATA_IN
CONTRACT_DATA_INX
CONTRACT_KEYS
EXTENSIONIN
Exceptions
Function group
2034
So, i think you can go ahead try using those structures to change item dates.
Thanks,
Santosh
‎2007 Jan 31 6:57 PM
The document says this:
FU BAPI_CUSTOMERCONTRACT_CHANGE
____________________________________________________
Short text
Change Customer Contract
Functionality
Using this method, you can change or delete contracts.
You can change header data, item data, schedule line data, contract data and configuration data.
In general the following applies:
1. Only enter fields that you want to change.
2. Mark the fields you want to change with an X.
3. Fill in the UPDATEFLAG field with a U.
4. Always enter the key fields when making changes, including in the checkbox list.
5. An exception is configuration. If you change this, you must fill it in completely.
6. Enter quantities and dates under schedule line data.
7. Possible update flags: U = change
D = delete
I = insert
Example
1. Delete complete contract
2. Delete contract item
3. Changes to contract
4. Change configuration
Notes
1. Minimum entries required:
You MUST enter the contract number in the SALESDOCUMENT structure.
You must always enter key fields when you make a change.
You must always enter the update indicator in the INQUIRY_HEADER_INX.
2. Commitment control
The BAPI does not carry out a database commit. This means that the calling application must leave the commit in order to have changes made to the database. BAPI_TRANSACTION_COMMIT is available for this purpose.
Parameter
SALESDOCUMENT
CONTRACT_HEADER_IN
CONTRACT_HEADER_INX
SIMULATION
BEHAVE_WHEN_ERROR
INT_NUMBER_ASSIGNMENT
LOGIC_SWITCH
NO_STATUS_BUF_INIT
RETURN
CONTRACT_ITEM_IN
CONTRACT_ITEM_INX
PARTNERS
PARTNERCHANGES
PARTNERADDRESSES
CONDITIONS_IN
CONDITIONS_INX
CONTRACT_CFGS_REF
CONTRACT_CFGS_INST
CONTRACT_CFGS_PART_OF
CONTRACT_CFGS_VALUE
CONTRACT_CFGS_BLOB
CONTRACT_CFGS_VK
CONTRACT_CFGS_REFINST
CONTRACT_TEXT
CONTRACT_DATA_IN
CONTRACT_DATA_INX
CONTRACT_KEYS
EXTENSIONIN
Exceptions
Function group
2034
So, i think you can go ahead try using those structures to change item dates.
Thanks,
Santosh
‎2007 Feb 06 8:33 AM