Skip to Content
0

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

Jan 03 at 09:35 AM

130

avatar image

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

10 |10000 characters needed characters left characters exceeded

Hi experts

any one can help with a SP

Regards

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

I H Jan 04 at 09:43 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Mil

I don't want to give Approval Procedure,

i need to block and never allow the user

Regards

0
Jimmy Liang Jan 16 at 01:23 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi jimmy

Thanks for the Great information and support

I had create a SPT, it is for only down side selling blocking from the price list price, but i face an issue, if i revaluate or change the price of any item from price list or from master data , then the SPT will not allow to sell even for the same Price assigned in Price list down or up or for the same price

Jimmy, am not a expert in Technical,

Could u pls help me to get the SPT Code, pls find the SPT i created

Consider it as a Request

Regards

IF @transaction_type IN ('A') 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  
  AND T0.DocEntry = @list_of_cols_val_tab_del
       )
   BEGIN 


    SELECT @Error = 03, @error_message ='You are trying to sell below Sales Price list' 
END
End

0

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

0
Nagarajan K Jan 16 at 02:28 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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

0