Skip to Content
avatar image
Former Member

Dump while updating contract

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...

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 20, 2008 at 01:54 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Feb 24, 2009 at 04:23 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded