‎2008 Dec 19 4:40 AM
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
‎2008 Dec 19 5:39 AM
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
‎2008 Dec 19 5:46 AM
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.
‎2008 Dec 19 5:50 AM
‎2010 Apr 21 11:21 AM