Skip to Content

SAP B1

Hi Experts,

Please guide me..

I have fixed a SP Notifications in Purchase Quotation for Project Mandatory and also i have set a approval on Purchase Quotation but SP Notification is not Working.

SP Notification Query is..

If @object_type in ('540000006') and @transaction_type in ('A','U')

BEGIN

If Exists (Select * from dbo.DRF1 T0

Where T0.DocEntry = @list_of_cols_val_tab_del and (T0.Project='' or T0.Project IS NULL)) --And T0.Handwrtten='N' )

BEGIN

Select @error = -1,

@error_message = 'Project Code is mandatory. Please update Project before adding the document.'

End

End

Thanks'

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 14, 2012 at 12:06 AM

    hi,

    please try this code.

    IF (@object_type = '112') and (@transaction_type IN ('A','U'))
    BEGIN
    	IF EXISTS (SELECT T0.Docentry from ODRF T0 Inner Join DRF1 T1 ON T0.Docentry=T1.Docentry where
    	T1.DocEntry = @list_of_cols_val_tab_del and (T0.Project is null or T0.Project =''))
    	BEGIN
    		SET @error = 10
    		SET @error_message = N'Project Code is mandatory. Please update Project before adding the document.'
    	END
    END

    note: 112 is the object_type for draft Documents

    regards,

    Fidel

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.