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.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. simon franco

    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.

    (0) 
    1. Chakri Reddy yannam Post author

      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:

         i_bapicondit_line-condcurr   = ‘%’.

      Then you can directly pass this table to Bapi.

      Thanks and Regards,

      Chakradhar.

      (0) 
  2. VIJAYKRISHNA GUDALA

    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

    (0) 

Leave a Reply