on 03-02-2007 3:14 PM
Hi,
I am trying to edit an existing contract in R/3. I am using the FM 'BAPICUSTOMERCONTRACT_CHANGE' but not able to achieve the desired result.
Actually, there is a contract existing with number say 1234, having 4 Items with Item numbers say 100,101,102,103. Now i am trying to update the item details of 100.
Initial values present for item 100 :- Material - H51-YY001, Quantity = 2
Now i am trying to update the Material to H49-XX014 and quantity to 5
d_VBELN = '50000172'.
contract_header_inx-updateflag = 'U'.
CLEAR contract_items_in.
contract_items_in-itm_number = '100'.
contract_items_in-material = 'H51-YY019'.
contract_items_in-target_qty = '2'.
APPEND contract_items_in.
contract_items_inx-updateflag = 'U'.
contract_items_inx-itm_number = '100'.
contract_items_inx-material = 'X'.
contract_items_inx-target_qty = 'X'.
APPEND contract_items_inx.
CALL FUNCTION 'BAPI_CUSTOMERCONTRACT_CHANGE'
EXPORTING
SALESDOCUMENT = D_VBELN
contract_header_in = contract_header_in
contract_header_inx = contract_header_inx
TABLES
return = return
contract_item_in = contract_items_in
contract_item_inx = contract_items_inx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Can some one tell me how to achieve this.
All helpful answers will b rewarded.
Regards,
Udaya
Hi,
I missed out to specify the error message.
Err: Material : H51-EE001 is not defined for sales org.xxxx distr.chan.10,language EN
Which table should i refer and how to solve this.
Regards,
Udaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Udaya,
You need to refer MVKE(Sales Data for Material) table to know for the sales organization and distribution channel.
If your material is aviable in the particular sales organization and distribution channgel, You will find a entry in this table; otherwise You need to create a material in this Sales organization and distribution channel (or) extend the material to this Sales organization and distribution channel.
Just create this material and re-run your BAPI.
Thanks,
Vinay
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
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.