cancel
Showing results for 
Search instead for 
Did you mean: 

Customer sales order block

former_member252592
Participant
0 Kudos

Hi Experts I want to Block Sales order of some specific customers whoes Payment terms are excceds for example if a customer has 90 days term so sap automatically blocks its sales orders when its gone 91

Can anyone guide me

Regards

Jamil

Accepted Solutions (1)

Accepted Solutions (1)

former_member252592
Participant
0 Kudos

i tried the following procedure it works but for all customers i want only specifid customers

--Sales Order Block

if @Object_type = '17' and @transaction_type ='A'

begin

IF EXISTS (select T0.DocNum FROM OINV T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode

Left Join ORDR T2 on T2.CardCode = T1.CardCode left join OCTG T3 on T3.PymntGroup = T1.GroupNum

WHERE T2.CardCode = 'C0002' and T0.docentry = @list_of_cols_val_tab_del AND Convert(numeric, GetDate())-convert(numeric, T0.DocDueDate ) > 90 )

BEGIN

SET @error = 2

SET @error_message = 'Customer Exceeds the Payment Term over 90 Days!'

END

end

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check this thread .

Let me know if not working.

Thanks.

Answers (0)