Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing Condition value change

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can use the FM <b>SD_SALES_ITEM_COND_MAINTAIN.</b>

5 REPLIES 5

Former Member
0 Kudos

You can use the FM <b>SD_SALES_ITEM_COND_MAINTAIN.</b>

0 Kudos

Can you please tell me as what are the parameters we need to pass to this function module ?

0 Kudos

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

0 Kudos

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

uwe_schieferstein
Active Contributor
0 Kudos

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