Skip to Content

Need to block user who try to sell item below price list price also above 20 % of price list price

Hi experts

I need to block my User who will try to change the price list price which appears in Delivery document >> Unit price

if its below or above 20%

for ege: item - ABC price is 20 in Price list 1 and the same price list is assign to Customers. if the user try to sell the item for 19.5 or 24 the user should be blocked

Pls any one can help me out of this issue

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 04 at 09:43 AM

    Hi,

    You may use Approval Procedure.

    Set a condition and whenever user try to add the delivery, it will send to someone to be approved/rejected first.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 01:23 AM

    Hi P Vinod,

    You may try to put the price check logic in the Delivery's TransactionalNotification stored procedure. It's from the database layer, so whenever someone tries to create or update the Delivery, SQL will check the price before the change gets executed.

    If the price doesn't meet the requirement, the user will receive a message stating the reason why the action is denied.

    You may refer to this post for more info: https://blogs.sap.com/2009/05/22/the-sptransactionnotification-stored-procedure/

    Cheers,

    Jimmy

    Add comment
    10|10000 characters needed characters exceeded

    • Hello P Vinod,

      According to the query you provided, the Delivery will get blocked if the adjusted price is less than the price from the price list. I don't think you need to modify the price from price list or master data once the regular price is set.

      Just to make sure I understand the rule provided in your example:

      • The price is allowed to be adjusted within a +/-20% range in Delivery;
      • The item price is $20 from price list;
      • If the price the user put in is less than $16 or greater than $24, the Delivery should get blocked and the user should be notified.

      Please see if the followings help:

      1. In the @transaction_type condition in line 1, you may need to consider if the user is updating an existing Delivery.

      2. Put your +/-20% policy in the logic so it will compare the price user adjusts in the Delivery line item with a specific price range.

      IF @transaction_type IN ('A','U') AND @Object_type = '15'
      Begin	
      IF EXISTS (  
           SELECT T0.DocNum From ODLN T0
        INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry 
        INNER JOIN ITM1 T3 ON T1.ItemCode = T3.ITEMCODE
        
        WHERE 
        (T1.Price < T3.Price * (1-0.2) OR T1.Price > T3.Price * (1+0.2))  
        AND T0.DocEntry = @list_of_cols_val_tab_del
        )
         BEGIN 
          SELECT @Error = 03, @error_message ='You are trying to sell below/above price range.' 
      END
      End

      Cheers,

      Jimmy

  • Jan 16 at 02:28 PM

    Hi,

    Please create sample transaction as per your requirement in test DB and then below query,

    SELECT T0.DocNum From ODLN T0
      INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry 
      INNER JOIN ITM1 T3 ON T1.ItemCode = T3.ITEMCODE
      
      WHERE 
      T1.Price < T3.Price  
    

    If above query picks correct document means, your SPT should work. If not, try until above query get correct result.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi rajan

      when am giving discount in row wise then this SPT is not allowing to save the document, but if i give document total it will allow,

      am having some customer who need discount specific items wise , so i need to given in line wise

      same way this works only for a single Price list, am having multi Price List like., Trader Price List, End User Price List, Low Volume Price List, Seasonal Price List, in which price are different

      Pls can you help me to Sort it out

      Regards