Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dump while updating contract

Former Member
0 Kudos

Hi friends,

I need to update contract (providing new price by creating new condition validity periods) and then I need to display the details of the Purchase Order of that contract.

For this I am using BAPI_CONTRACT_CHANGE first and then BAPI_PO_GETDETAIL1. But I am getting a dump saying "Access via NULL object reference not possible" in the method if_purchase_out_header~is_contract.

When I use these Bapis (I am calling it in a function module) separately, both works fine.

Note: While updating the contract, I am getting a warning saying "Error transferring ExtensionIn data for enhancement CI_EKKODB" but the contract is updated as required. Is the dump related to this..? please help...

5 REPLIES 5

raymond_giuseppi
Active Contributor
0 Kudos

Have you validated the change via a COMMIT_WORK or BAPI_TRANSACTION_COMMIT with WAIT option between the two calls. There may also be some delay due to database update delay.

Regards

0 Kudos

Hi Raymond,

I have used BAPI_TRANSACTION_COMMIT after update. I also tried with the statement "WAIT UP TO 10 second". But still I got the dump..

0 Kudos

>Note: While updating the contract, I am getting a warning >saying "Error transferring ExtensionIn data for enhancement >CI_EKKODB"

if you are getting the error then The commit work code will never trigger. why because you might be calling the commit work function only if it is success. since there is error the lock on the contract still exists. to avoid that first release(DEQUE) the lock and then try. If there is any error locks will not be released automatically. unless we do something.

0 Kudos

Maybe there are OSS note to implement, like [Note 1156334 - Customer Fields are not updated from EXTENSIONIN|https://service.sap.com/sap/support/notes/1156334]

Also did you analyze the return table for an error (type Error or Abend) i supposed yes, cause you mentioned a Warning message.

You may also execute a DO/ENDDO trying to lock the purchase order EMEKKOE, before calling the second BAPI. if the do/enddo last too long, look at SM13 or via transaction ME23N for updating of the order.

Regards

Former Member
0 Kudos

I changed the sequence of calling the function modules. Then it worked fine.

First we need to update the contract (using BAPI_CONTRACT_CHANGE) and then we can make change in the PO (using BAPI_PO_GETDETAIL1)

Note: This applies only when we use the above two function modules.