Product Lifecycle Management Blogs by Members
Get insider knowledge about product lifecycle management software from SAP. Tap into insights and real-world experiences with community member blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshthangam_e
Participant
0 Kudos

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 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

1 Comment