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 Routine

Former Member
0 Likes
734

Moderator message: please use a more meaningful subject in future

Hi All.

I have requierment to code the function rountine to satisfy the condition of pricing.

YVRD is a scale based group condition, so while calculating VRD system is considering the total sales order quantity, but it should exclude the line item quantity for which special base price (ZPWS,ZPPG) is applied.

To achieve this we can write a group condition routine for YVRD.

We have the following tables where we can fetch the required data,

TKOMP ( structure type KOMP): pricing communication item

TKOMK ( structure type KOMK): communication header for pricing

TKOMV : pricing communication condition records

From the above tables we can get the item details (quantity) from TKOMP and pricing condition details for each line item from TKOMV.

With the above details we can calculate the quantity for YVRD excluding the line items quantity for which base price special (ZPPG,ZPWS) is applied.

The calculated quantity should further be passed to some structure to check the condition record of VRD and pass the required discount.

  • Entire document independent of condition type

form frm_gruppenkey_002.

xvakey = '002'.

gkomv_key-kschl = '++++'.

endform.

I debuged the rountine the passed the values in xvakey and gkomv_key structure :

xvakey(10) = knumh.

xvakey10(2) = posnr like 50

gkomv_key-ZBD1P = % amount .

but it is not working .

I want to know how to calculate % based on the scaling, is there any table for that.

Edited by: Matt on Dec 19, 2008 6:49 AM

4 REPLIES 4
Read only

Former Member
0 Likes
633

Hi Shilpi,

Apart from passing the new values, you also need to set the sy-subrc to 0.

Have you done that ?

Best regards,

Prashant

Read only

0 Likes
633

where i ahve to use sy-subrc ?

if i am appending the value in the structure XKONV then it is working fine . Let me know is it right approach .

Secondly do u knw any table where scale based % defiend for particular condtn in VA02 transaction.

Read only

matt
Active Contributor
0 Likes
633

Please use a more meaningful subject in future

Read only

Former Member
0 Likes
633

solved