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.
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.
2. 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’.
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.
3. Assign this routine to your manual discount condition types and ZBAS condition in pricing procedure in field Calculation type.
4. Ad field VBAP-CEPOK in your sale order line item incompletion log and assign to your order types in Incompletion log node in IMG.
5. 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.
6. This field CEPOK works only in sale order. If you want restrict users to enter manual discounts during creating billing in VF01 you can control this with SHD0. Condition fields can be put in display mode with SHD0 in VF01.