Skip to Content

Conditions are not removed from KONV after BAPI execution

Hi everyone

I'm trying to use the FM BAPI_SALESORDER_CHANGE to remove items from a sales order and insert a new one. But after BAPI execution the conditions values in the header become wrong. I've checked the KONV table and the conditions from the removed items still there.

Someone here had a problem like that? How can I use this BAPI to update the conditions after removing items?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 18, 2017 at 08:11 PM

    I am not entirely convinced that the linked thread is a suitable match for this specific case.

    The archived thread is about modifying condition values in existing order items, while here the OP is deleting order items.

    From what I read in 366265 - How should I fill the BAPI parameters?, p.3 a) for deleting items you just need to pass information in BAPISDITM, BAPISDITMX, BAPISDH1X and the order number, there is no mention that you have to delete conditions in the bapi on top of that (and even when you modify items you might not be able to delete all conditions).

    When I followed the steps for deleting items from this note, the KONV entries were removed after bapi_transaction_commit.

    Hevanderson Maria , as a part of the troubleshooting try this:

    1. starting point order with items 10, 20.

    2. delete via bapi item 20 and commit.

    3. check the outcome.

    4. add item 20 via bapi and commit.

    5. check the outcome in konv.

    ---

    Then make another test:

    1. starting point order with items 10, 20.

    2. delete via bapi item 20, add via bapi item 30. commit.

    3. check the outcome in konv.

    Edit: the reason why I suggested these tests is because making simple examples (without complicating the case with additional pricing modification in condition handling) are easier to troubleshoot especially if your pricing procedure is complex. After you ensure that these two tests are successful, you will only need to investigate what you pass in conditions (if you made any adjustments there via the bapi).

    Add comment
    10|10000 characters needed characters exceeded

    • Please add all your further updates under Comment and not under Answer, as you only share additional informations asked by the members to help you and not answering. By the way, your above post has been converted by me from Answer to Comment.

  • Dec 18, 2017 at 04:57 PM

    Hi!

    Well this was a question I had not too long ago. The quickest was to get to the answer is to try google. The following is what I used just now: sap bapi change sales order condition

    The answers are a little hard to understand and it took me a bit.

    Basically: You have to pull all the values from KONV and pass them to the BAPI. For example make sure the step number and condition counter are filled.

    Take a look at this link the last answer in the thread:
    https://archive.sap.com/discussions/message/4221547#4221547

    Best of luck,

    Michelle

    Add comment
    10|10000 characters needed characters exceeded