Dear Sir
First of all I thank Mr.Moazzam .Because I have tried with document posted by Mr.moazzam and getting some good result . So I wish to share here...
Mr.Moazzam's Document :
created by moazzam.ali on Oct 26, 2012 10:50 AM, last modified by moazzam.ali on Nov 3, 2012 12:27 PM
Business Process:
If client gives you a requirement that they have two prices. Invoice price and bottom price. End users should have access to enter manual discount within this limit e.g If invoice price is 100 and bottom price is 90, end user can enter discount only 10 or less. How to map this in standard configuration.
Solution:
For this you have to follow these steps.
Logic of Routine:
This logic will work against ZBAS condition.
IF it_komv-kwert > XWORKF.
komp-cepok = 'B'.
endif.
This field KOMP-CEPOK will take this order to incomplete and change its status. This order can not be processed until you rectify its pricing issue.
You can modify this as per your own requirment. I have excluded my user SD-02 from this check and also If there is ZMON condition in sale order line item system will not run this bottom price check because ZMON condition is exclusively for discounts below bottom price.
Improved Document from me..
I have used following Pricing Procedure with our own customized routine . By using this , We can release this document through V.25
My Pricing Procedure
My Routine
FORM FRM_KONDI_WERT_901.
*{ INSERT D00K932683 1
DATA:IT_KOMV TYPE STANDARD TABLE OF KOMV_INDEX
WITH HEADER LINE INITIAL SIZE 50,
IT_KOMV2 TYPE STANDARD TABLE OF KOMV_INDEX
WITH HEADER LINE INITIAL SIZE 50.
IT_KOMV[] = XKOMV[].
*-----------------------------------------------------------------------------*
*
*This is bottom price check.it checks after discount amount.
*it will compare after discount amount with ZBAS condition and if Zbas is Greater it will incomplete the order.
*********************************06.02.14**********************
DATA: PR00DIFF(08) TYPE P DECIMALS 2.
DATA: FULLQTY(17) type c,
INTQTY(13) type c,
DECQTY(3) type c.
data: netprice(08) TYPE P DECIMALS 2,
BOTTOMprice(08) TYPE P DECIMALS 2.
constants : ca(1) type c value '.'.
DATA:DIFF(08) TYPE C,
DIFZ(08) TYPE P DECIMALS 2,
PR00(08) TYPE C.
data: maximum(3) type p , "value 0
difference(6) type p.
IF SY-MANDT = '445' OR SY-MANDT = '916'.
IF SY-TCODE = 'VA01' OR SY-TCODE = 'VA02'.
LOOP AT TKOMV WHERE KPOSN = XKOMV-KPOSN AND ( KSCHL = 'DIFF' OR KSCHL = 'DIFZ' OR KSCHL = 'ZBAS').
IF TKOMV-KSCHL = 'DIFF' OR TKOMV-kschl = 'DIFZ'.
CLEAR xkomv-kwert.
IF TKOMV-KSCHL = 'DIFF'.
DIFF = TKOMV-KWERT.
ENDIF.
* XKOMV-KWERT = TKOMV-KWERT.
IF TKOMV-KSCHL = 'DIFZ'.
DIFZ = TKOMV-KWERT.
ENDIF.
IF KOMP-MGLME > 0.
FULLQTY = KOMP-MGLME.
PR00DIFF = ( KOMP-NETWR - DIFF - DIFZ ).
split FULLQTY at ca into INTQTY DECQTY. " This worked KOMP-NETPR - FINAL PRICE
KOMP-NETPR = PR00DIFF / INTQTY. "KOMP-MGAME
NETPRICE = komp-netpr. " * komp-kumne / komp-kumza / komp-kpein.
* NETPRICE = komp-netpr * komp-kumne / komp-kumza / komp-kpein.
ENDIF.
ENDIF.
IF TKOMV-KSCHL = 'ZBAS' .
BOTTOMPRICE = xkomv-kbetr.
* BOTTOMPRICE = xkomv-kbetr * xkomv-kumne / xkomv-kumza / xkomv-kpein.
ENDIF.
komp-cepok = ' '.
ENDLOOP.
* IF BOTTOMPRICE > 0.
IF NETPRICE < BOTTOMPRICE.
komp-cepok = 'B'.
* xkomv-fxmsg = '249'.
* MODIFY xkomv.
ENDIF.
* ENDIF.
ENDIF.
ENDIF.
*} INSERT
ENDFORM.
By using V.25 T CODE authorized person can release the document
Regards
Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.