cancel
Showing results for 
Search instead for 
Did you mean: 

Block user from deleting line item

Anu
Explorer
0 Kudos


I want to stop the user/s to delete the line at the time of flipping sales order to delivery. If a user is flipping sales order the user should not be allowed to delete the line item at delivery stage.

Also, I want to disable the customize button at the time of flipping as shown in the attachment.

Any help will be appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anu,

You can use transaction notification to block those delivery notes,

Use this notification

IF @OBJECT_TYPE = '15' AND @TRANSACTION_TYPE  IN ('A', 'U')

BEGIN

IF EXISTS(

select r.DocEntry

from dln1 r

where r.BaseType=17 and r.DocEntry = @list_of_cols_val_tab_del

group by  r.DocEntry

having sum(r.LineNum ) <> (select sum(dr.LineNum ) from rdr1 dr where dr.DocEntry=r.DocEntry )

   

)

BEGIN

SELECT @ERROR=1,@ERROR_MESSAGE='You cant Delete items in Sale order'

END

END

Anu
Explorer
0 Kudos


Bharathiraj,

I tried to save the file and execute and getting the attached error message.

Do I have to save the query normally or at a different location.

Thanks,

Anu

Former Member
0 Kudos

you need to put this code in SQL, not in a formated serach

greetings

Anu
Explorer
0 Kudos

Thanks Bharathiraj and Luis.

Luis, I ran the query in SQL studio and getting the result. One last question, How do I save in SAP , same like formatted search or stored procedures

Former Member
0 Kudos

SAP have a stored procedure named SBO_SP_TRANSACTIONNOTIFICATION, you need to replace the code provided and re compile the script this will be update SAP in automatic


here´s the TN Documentation



Answers (0)