09-20-2006 7:33 AM
Hi All,
Can anyone suggest me the name of the BAPI or Function Module, using which we can change the value of particular condition type in an document.
For example, in my sales document i have PR00 condition.and it has some value $100. based on some conditions i want to change the value from $100 to $110.
Regards,
Durga.
09-20-2006 7:41 AM
09-20-2006 7:41 AM
09-20-2006 9:34 AM
Can you please tell me as what are the parameters we need to pass to this function module ?
09-20-2006 9:43 AM
You have to pass a table IT_KONVKOM_ITEM LIKE STANDARD TABLE OF KONVKOM containing the condition details to be changed.Check out the structure KONVKOM
09-20-2006 10:03 AM
Hi
You can use BAPI: BAPI_SALESORDER_CHANGE.
Parameters to be passed:
Import Parameters:
SALESDOCUMENT: Sales Document Number
ORDER_HEADER_INX: Update flag to be set 'X'.
Tables:
CONDITIONS_IN: ITM_NUMBER - Sales Document Item Number
Condition Type - PR00 in your case
Condition Value - 110.00
Currency = 'USD'.
CONDITION_INX: ITM_NUMBER - Sales Document Item Number
Condition Type - PR00
Update Flag - 'X'
Condition Value = 'X'
Currency = 'X'
Note that you have explicitly do the commit work using
FM: BAPI_TRANSACTION_COMMIT.
Kind Regards
Eswar
11-26-2006 5:58 AM
Hello Durga
When updating price condition using BAPI_SALESORDER_CHANGE you may run into the problem of duplicating instead of updating your price condition.
A solution for this problem has been provided by Eswar Rao Boddeti in another thread:
<x>Import Paramters:</x>
SALESDOCUMENT - Sales Document Number
ORDER_HEADER_INX - UPDATEFLAG as <x>'U'</x>.
LOGIC_SWITCH - Import Structure - Pass 'X' to LOGIC_SWITCH-COND_HANDL.
<x>Tables:</x>
CONDITIONS_IN - ITM_NUMBER,
COND_COUNT, -> Condition counter same as KONV-ZAEHK generally it is <x>'01'</x>
COND_TYPE,
COND_VALUE,
CURRENCY.
CONDITIONS_INX - ITM_NUMBER,
COND_COUNT,
COND_TYPE,
UPDATEFLAG as <x>'U'</x>,
CURRENCY.
The condition counter COND_COUNT usually should be = '01'. To retrieve this counter you can use <b>BAPISDORDER_GETDETAILEDLIST</b> for your sales order.
Regards
Uwe