Document for bapi BAPI_PRICES_CONDITIONS
Hi All,
This attachment contains the detail documentation of bapi “BAPI_PRICES_CONDITIONS”.This document mainly focus on the parameters that are passed to the bapi and the tables that are affected while the execution of bapi.
BAPI_PRICES_CONDITIONS
Documentation
Short Text: BAPI for Price and Rebate Usage Condition.
Functionality: Using this BAPI we can change the price of the condition records.
Parameters:
PI_INITIALMODE
PI_BLOCKNUMBER
PI_PHYSICAL_DELETION
Tables:
TI_BAPICONDCT
TI_BAPICONDHD
TI_BAPICONDIT
TI_BAPICONDQS
TI_BAPICONDVS
TO_BAPIRET2
TO_BAPIKNUMHS
TO_MEM_INITIAL
Procedure:
Create a condition record using a tcode Vk11.
Once we enter condition type in the vk11 it opens a popup as below.
Based on the radio button we selects the respective table gets affected.
Suppose if we select 1st radio button then the record gets created in the following tables
A305 , KONH,KONP.
Suppose if we select 2nd radio button then the record gets created in the following tables
A306 , KONH,KONP.
Suppose if we select 3rd radio button then the record gets created in the following tables
A304 , KONH,KONP.
Once the creation of records is completed .You can see the record in the above specified tables.
Now if we want to change the value of price (KBETR) for the above condition record (00000030830) present in the KONP table.
The steps to be followed are listed below:
Open a se37 tcode and enter the bapi BAPI_PRICES_CONDITIONS and select on display button. It opens a bapi and you will find a function module on left top corner just click on it and then select execute option and then followed by test sequences as shown below.
After once you click on test sequences it opens a following screen.
Now enter the bapi’s under the function modules tab as shown above and click on execute button. As soon as you click on execute button the following screen appears.
Values to be passed for the table ti_bapicondct are:
Get these details based on the table A304/A305/A306.
table_no = ‘306’. “ table name excluding the ‘A’
COND_USAGE = ‘A’.
applicatio = ‘V’.
cond_type = ‘PR00’.
operation = ‘023’. “ modify-023
varkey = ‘302014L1USD E101_COPY’. “it is the combination of vkorg,
vtweg,pltyp,waerk and matnr
valid_to = ‘99991231’.
valid_from = ‘20050118’.
cond_no = ‘0000030830’. “Condition record number
You can refer the below screen while entering the values to the table it_bapicondct.
Values to be passed for the table ti_bapicondhd are:
Get these details based on the table KONH.
operation = ‘023’.
cond_no = ‘0000030830’.
created_by = ‘PERRON’.
creat_date = ‘20050318’.
cond_usage = ‘A’.
table_no = ‘306’.
applicatio = ‘V’.
cond_type = ‘PR00’.
varkey = ‘302014L1USD E101_COPY’.
valid_from = ‘20050118’.
valid_to = ‘99991231’.
You can refer the below screen while entering the values to the table it_bapicondhd.
Values to be passed for the table it_bapicondit are:
Get these details based on the table KONP.
operation = ‘023’.
cond_no = ‘0000030830’.
cond_count = ’01’.
applicatio = ‘V’.
cond_type = ‘PR00’.
scaletype = ‘A’.
scalebasin = ‘ ‘.
scale_qty = ‘0’.
calctypcon = ‘C’.
cond_value = ‘10.00’. “ You can update the changed price value here.
condcurr = ‘USD’.
cond_p_unt = ‘1’.
cond_unit = ‘SHT’.
You can refer the below screen while entering the values to the table it_bapicondit.
Once the all values are passed to the tables of the bapi you can execute it. Once the bapi_prices_conditions is executed then bapi_transaction_commit must be done.
Here you can provide the target system and then execute it.
Then you can see the changed value of price(KBETR) in the KONP table.
Regards,
Chakradhar.
Thank you! it was very useful. I have a question, what if I want to load an entry without CONDCURR, I mean, I need to load a '%' in the KONP-KONWA but the function return an error.
Hi Simon,
Thanks for your comments and regarding your problem I think you can pass the '%' to the condcurr field direclty while filling bapi structures.
As below method:
Then you can directly pass this table to Bapi.
Thanks and Regards,
Chakradhar.
Thank you! But if i want to undo deletion flag. What i need to do?
Hi ,
Can we change the validity dates also using this BAPI ?
Hello,
Nice documentation.
I have tried this Function module to update the condition prices. After execution of this FM KONH and KONP tables were getting updated well. But the combination related tables (say A304, A305, A306) were NOT getting updated. How to update these tables as well..???
Thanks,
Vijay
A bit late, but might be useful to others...
I have a similar case where I need to update A954 using this same BAPI. To get this working properly, you need 2 lines: a change line (operation 004, existing condition record) and a create line (operation 009, condition record '$000000001'). This way it adjusts the dates of the current record and it inserts a new one with the new period.
Without the 004 line I always lost my original record, which is not what we want.