Skip to Content
0

SPT Not working

Jan 08 at 09:07 AM

25

avatar image

Dear Experts

i had created a SPT for blocking user who try to add Good issue with out Cost Center and Project, both are Mandatory.

but its not working could any one help me to solve it

Pls the attache SPT

Regards

IF @transaction_type IN ('A','U') AND @Object_type = '60'
BEGIN
IF EXISTS (SELECT T0.[DocEntry] FROM IGE1 T0  INNER JOIN OIGE T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.OcrCode IS NULL and T1.Project IS NULL and 
T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 18, @error_message = 'Please Select the Cost Center or Project Code'
END
End
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Nagarajan K Jan 08 at 01:59 PM
0

Hi,

Try this,

IF @transaction_type IN ('A','U') AND @Object_type = '60'

BEGIN

IF EXISTS (SELECT T0.[DocEntry] FROM IGE1 T0 INNER JOIN OIGE T1 ON T0.[DocEntry] = T1.[DocEntry]

WHERE ISNULL(T0.OcrCode,' ') = '' and ISNULL(T1.Project,'')='' and T0.DocEntry = @list_of_cols_val_tab_del)

BEGIN SELECT @Error = 18, @error_message = 'Please Select the Cost Center or Project Code'

END

End

Share
10 |10000 characters needed characters left characters exceeded