cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Populating 'Pricing Conditions' for Contracts using FM BBP_PD_CTR_CREATE .

Former Member
0 Likes
141

Hi Experts ,

I am creating the contracts through FM BBP_PD_CTR_CREATE .

I have to popluate the 'Pricing conditions' of the contracts also while creating the contracts .

I think that the parameter IT_CONDITIONS of the FM can popluate these conditions .

Could any one provide the code for the same , i am not sure what values to pass ...

Below is the code i am using

CALL FUNCTION 'BBP_PD_CTR_CREATE'
            EXPORTING
              i_save     = 'X'
              i_header   = rec_header_export
            IMPORTING
              e_header   = rec_header_import
            TABLES
              i_item     = t_item
              i_partner  = t_partner
              i_longtext = t_longtext
              i_orgdata  = t_org_data
              e_status   = t_status
              e_messages = t_messages.

Or else if these 'Pricing conditions' are populated some where else you can also suggest the same.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Solved By own ...

*// Populating Pricing Conditions .

CLEAR:rec_condn_det.
      PERFORM f_generate_guid CHANGING rec_condn_det-guid.
      rec_condn_det-cond_type     = c_cond_type.
      rec_condn_det-date_from     = rec_header_export-vper_start.
      rec_condn_det-date_to       = rec_header_export-vper_end.
      rec_condn_det-p_guid        = rec_item-guid.
      rec_condn_det-cond_rate     = rec_item-price .
      rec_condn_det-cond_curr     = c_waers.
      rec_condn_det-cond_prc_unit = rec_load2-peinh.
      rec_condn_det-cond_tab      = c_cond_tab.
      APPEND rec_condn_det TO t_condn_det.
     
          CALL FUNCTION 'BBP_PD_CTR_CREATE'
            EXPORTING
              i_save     = 'X'
              i_header   = rec_header_export
              it_conditions = t_condn_det
            IMPORTING
              e_header   = rec_header_import
            TABLES
              i_item     = t_item
              i_partner  = t_partner
              i_longtext = t_longtext
              i_orgdata  = t_org_data
              e_status   = t_status
              e_messages = t_messages.

Former Member
0 Likes

Hi

What are the values that you are passing in the tables?

Thanks