cancel
Showing results for 
Search instead for 
Did you mean: 

VALIDATION ON JOURNAL VOUCHER ENTRY IN SAP B1 THRU SP NOTIFICATION

0 Kudos
934

Dear Expert,

I had created on UDF in Journal Voucher Entry and want to restrict the entry while the UDF is not selected by user.But its not working.

if(@object_type = '30' And (@transaction_type = 'A' OR @transaction_type = 'U')) Begin If Exists (Select 1 From OBTF Where TransId = @list_of_cols_val_tab_del And ISNULL(U_Status,'') = 'Select' ) Begin Select -3334, 'Status Can be change by Manager only' Return End END.

plz assist..

regards,

Pankajk

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

For Journal Entry same SP is working fine..Only in Journal voucher entry throwing error..

regards,

pankajK

0 Kudos

Dear Aziz,

Thanks for your reply....I am getting this error while trying to update journal voucher in any case...

[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the nvarchar value '44541' to data type int. 'Company Info' (CINF) (CINF)

regards,

PankajK

azizelmir
Contributor
0 Kudos

Make sure about the type of your user-defined field "U_Status"

KennedyT21
Active Contributor
0 Kudos

Hi

Try this

IF (@object_type = '29' AND (@transaction_type = 'A' OR  @transaction_type = 'U'))
BEGIN
 If Exists (Select TransId From OBTF Where TransId = @list_of_cols_val_tab_del  AND  ISNULL(U_Status,'') = '' )
 BEGIN
     set @error =5
	  set @error_message ='You need to select UDF'
 END
	
END
0 Kudos

Dear Kennedy,

Still not working.....

regards,

pankajK

azizelmir
Contributor
0 Kudos

Pankaj,

I think @object_type ='28'is the right one!

Thank you,

Aziz

former_member566317
Active Participant
0 Kudos

Use this one. Hope you will get result.

IF (@object_type = '30' AND (@transaction_type = 'A' OR  @transaction_type = 'U'))
BEGIN
 If Exists (Select TransId From OBTF Where TransId = @list_of_cols_val_tab_del  AND  ISNULL(U_Status,'') = '' )
 BEGIN
     set @error =5
	  set @error_message ='You need to select UDF'
 END
	
END


0 Kudos

Still Same...Not working..

regards,

PankajK

former_member566317
Active Participant
0 Kudos

use object type 28