Skip to Content
0
Former Member
Dec 19, 2008 at 04:40 AM

function Routine

101 Views

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