Application Development and Automation 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: 
Read only

BAPI_PRICES_CONDITIONS using

Former Member
0 Likes
887

Hi all,

I need to creat Prices Condition through a program that simulate transaction VK11, I found bapi BAPI_PRICES_CONDITIONS that I guess is indicated for my scope, but I don't understand how fill its structures. My questions are, do I have to fill all input tables? where can I pass Sales Organisation, Distribution Channel and Division?

Thanks

GN

6 REPLIES 6
Read only

Former Member
0 Likes
814

HI,

try to use: SALES_CONDITIONS_POSTE !

In px_t_calp_vb you can maintain Sales Organisation, Distribution Channel and Division.

Read only

0 Likes
814

Hi Gordon,

thank for your answer, I tried function module you suggested, it works but it create a Condition Price without material although I fill MATNR field in the internal table... do you have any other suggest for this issue?

Thanks

GN

Read only

0 Likes
814

Hi Gabriele,

this is an code example:


          lw_calp-matnr = pi_matnr.
          lw_calp-vrkme = 'ST'.
          lw_calp-vkorg = <pi_t_vtweg>-vkorg.
          lw_calp-vtweg = <pi_t_vtweg>-vtweg.
          lw_calp-kbetr = condition_value.
          lw_calp-waers = currency.
          lw_calp-kpein = condition_base.
          lw_calp-kmein = 'ST'.
          lw_calp-vkkab = cond_valid_from.
          lw_calp-vkkbi = cond_valid_to.
          lw_calp-kschl = l_kschl.
          lw_calp-kappl = 'V'.
          lw_calp-kotabnr = '073'.
          append lw_calp to lt_vk_conditions.

...
        call function 'SALES_CONDITIONS_POSTE'
          exporting
            pi_commit_work         = ''
          tables
            px_t_calp_vb           = lt_vk_conditions
          exceptions
            no_records_for_posting = 1
            others                 = 2.

Read only

0 Likes
814

Hi Gordon,

unfortunatley it doesn't still work, it continue to create conditions record without material number...

Read only

0 Likes
814

I found the problem, my table is A672 that as material number field has YMATLU, probably I have to look for an user exit into the function module.

Thanks

Read only

Former Member
0 Likes
814

This message was moderated.