Skip to Content
avatar image
Former Member

Customer sales order block

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



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 03, 2015 at 08:16 AM

    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'


    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 )


    SET @error = 2

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



    Add comment
    10|10000 characters needed characters exceeded