on 12-09-2014 2:13 PM
I copy trading contracts (SAP GTM) using function module BAPI_TRADINGCONTRACT_CREATE. First I use function module BAPI_TRADINGCONTRACT_CHANGE to read the contract I want to copy and then I create the new trading contract with function module BAPI_TRADINGCONTRACT_CREATE.
On the trading contract I have sales conditions marked as delivery costs (KNTYP = B). For these conditions the vendor field is displayed when double-clicking on the condition.
The problem is when creating trading contract with BAPI_TRADINGCONTRACT_CREATE I can't update the value in the vendor field.
Please help.
/Torben
Torben,
have you tried to fill CONDITIONITEMDATAIN-VENDOR_NO?
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
The message class is W_CB.
I have tried FM WB2_CONTRACT_CREATE_FROM_DATA. I have filled the table T_KOMTCKOEC and T_KOMTCKOC but I'm not able to create header sales conditions. I fill the table with item 0 but I think this goes wrong in FM WB2_CURR_CONV_KOND_CREATE. Here the item number from wbhi is used when reading T_KOMTCKO.
/Torben
Hi Peter,
I just succeeded in getting the sales condition updated on the contract using FM wb2_pricing_post. I will then create the contract using FM bapi_tradingcontract_create and afterwards insert the conditions using FM wb2_pricing_post.
Thanks for your ideas and responses. I wish you a Merry Christmas.
Torben
Hi Kevin,
First I use FM BAPI_TRADINGCONTRACT_CREATE and BAPI_TRANSACTION_COMMIT to create the contract. Then I read the conditions on the original contract using table WBHK and KONV. I insert these conditions in structure VKOMV with UPDKZ = I. I fill structure KOMWBHK from the new contract with fields TKONN, KNUMV_SD, PRICING_TYPE, UPDKZ = U and KONV_CHANGE = X.
Hope this can help you.
Torben
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.