Skip to Content

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 :

How to Implement minimum Price check in Sale order and billing.

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.

  1. Create Pricing condition for bottom price ZBAS and maintain condition records in it for bottom price. Also add this condition in your pricing schema and tick      static. Dont assign any account key with it.
  1. Create a pricing routine with following logic. Take help of your ABAPER if you don’t know how to create pricing routine.

Logic of Routine:

  • Assign any sub total variable from XWORKD to XWORKM to your credit amount. The amount you are transferring in FI or customers ledger.
  • Compare bottom price condition value with this variable. This is the comparison of net price with bottom price. You can have your other requirements too like if you want to exclude some user or condition from this check you can exclude.

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.

  1. Assign this routine to your manual discount condition types and ZBAS condition in pricing procedure in field Calculation type.
  1. Ad field VBAP-CEPOK in your sale order line item incompletion log and assign to your order types in Incompletion log node in IMG.

  1. Now maintain prcies as 100 invoice PR00 90 bottom ZBAS and enter discount 11 and system will put this order incomplete. Users are not able to           process order untill some authorize person corrects its pricing.

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 SYMANDT = ‘445’ OR SYMANDT = ‘916’.
IF SYTCODE = ‘VA01’ OR SYTCODE = ‘VA02’.

  LOOP AT TKOMV WHERE KPOSN = XKOMVKPOSN AND ( KSCHL = ‘DIFF’ OR KSCHL = ‘DIFZ’ OR  KSCHL = ‘ZBAS’).

    IF TKOMVKSCHL = ‘DIFF’ OR TKOMVkschl = ‘DIFZ’.
     CLEAR xkomvkwert.

     IF TKOMVKSCHL = ‘DIFF’.
      DIFF = TKOMVKWERT.
     ENDIF.

*    XKOMV-KWERT = TKOMV-KWERT.

     IF TKOMVKSCHL = ‘DIFZ’.
      DIFZ = TKOMVKWERT.
     ENDIF.

  IF KOMPMGLME > 0.
       FULLQTY = KOMPMGLME.
       PR00DIFF = ( KOMPNETWR DIFF DIFZ ).
       split FULLQTY at ca into INTQTY DECQTY. ” This worked   KOMP-NETPR  – FINAL PRICE
       KOMPNETPR = PR00DIFF / INTQTY.   “KOMP-MGAME
       NETPRICE = kompnetpr. ” * komp-kumne  / komp-kumza  / komp-kpein.
*      NETPRICE = komp-netpr  * komp-kumne  / komp-kumza  / komp-kpein.
  ENDIF.
    ENDIF.

     IF TKOMVKSCHL = ‘ZBAS’ .
           BOTTOMPRICE = xkomvkbetr.
*          BOTTOMPRICE = xkomv-kbetr * xkomv-kumne / xkomv-kumza / xkomv-kpein.
     ENDIF.

     kompcepok  = ‘ ‘.

    ENDLOOP.

*    IF BOTTOMPRICE > 0.
         IF NETPRICE < BOTTOMPRICE.
             kompcepok = ‘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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply