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

Function Module PRICING to get Rebate Agreement Values

Former Member
0 Likes
1,182

I need to simulate pricing a sales order as an invoice so I can capture predicted rebate agreement condition amounts... I call the pricing fucntion module as in the following but I never get the rebate conditions that would end up on the billing document. I only get the standard sales order pricing conditions. Does anyone know if this function module (or other) function module can be used to get the rebate values which have requirment type 24 (billing document)?

Any help is very much appreciated,

Chuck

CALL FUNCTION 'PRICING'

EXPORTING

calculation_type = 'C'

comm_head_i = tp_komk

comm_item_i = tp_komp

PRELIMINARY = 'X'

  • NO_CALCULATION = ''

  • OIA_TR_TYPE = ' '

  • OIC_NO_READ =

  • OIR_INVINFO =

  • IMPORTING

  • COMM_HEAD_E =

  • COMM_ITEM_E =

  • OIA_PRICE_INCLUDED =

TABLES

tkomv = ta_komv

  • SVBAP =

  • XOICQ7 =

  • XOICQ8 =

  • XOICQ9 =

  • XOICINT_CAL =

  • T_OIR_ADDAGG =

  • T_OIRIT683S =

  • T_ADDDATA =

  • XOIUQ9 =

  • CHANGING

  • REBATE_DETERMINED = ' '.

I need to simulate pricing a sales order as an invoice so I can capture predicted rebate agreement condition amounts... I call the pricing fucntion module as in the following but I never get the rebate conditions that would end up on the billing document. I only get the standard sales order pricing conditions. Does anyone know if this function module (or other) function module can be used to get the rebate values which have requirment type 24 (billing document)?

Any help is very much appreciated,

Chuck

CALL FUNCTION 'PRICING'

EXPORTING

calculation_type = 'C'

comm_head_i = tp_komk

comm_item_i = tp_komp

PRELIMINARY = 'X'

  • NO_CALCULATION = ''

  • OIA_TR_TYPE = ' '

  • OIC_NO_READ =

  • OIR_INVINFO =

  • IMPORTING

  • COMM_HEAD_E =

  • COMM_ITEM_E =

  • OIA_PRICE_INCLUDED =

TABLES

tkomv = ta_komv

  • SVBAP =

  • XOICQ7 =

  • XOICQ8 =

  • XOICQ9 =

  • XOICINT_CAL =

  • T_OIR_ADDAGG =

  • T_OIRIT683S =

  • T_ADDDATA =

  • XOIUQ9 =

  • CHANGING

  • REBATE_DETERMINED = ' '.

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
894

KOMK-kalsm or tp_komk what ever you call it will decide what condition types to pull KALSM is basically the pricing procedure

v/08 is the Tr. where you can find all the pricing procedures in your system..

Read only

0 Likes
894

Thank you for the info. I review the KALSM value and it is being set to the correct pricing procedure. I'm just not getting back billing document pricing conditions for rebates and conditions... Only sales document conditions. Am I missing a parameter that says I want billing pricing and not sales order pricing?

Read only

0 Likes
894

If I remeber right.. KNTYP needs to be B or ....

Read only

0 Likes
894

After a serious commitment to the debugger tool I figured it out... I had to set the relevent for rebate flag of komk: lwa_komk-borel = 'X'. " relevant for rebate

Thanks for your help!