cancel
Showing results for 
Search instead for 
Did you mean: 

Check on (Bank)account when adding an AP Invoice

Former Member
0 Kudos

Dear all,

I'm trying to make SAP (via B1 UP) validate if the (bank)account of the BP is filled when adding or updating an AP invoice. This will make our payment-process more efficient.

I'm having difficulties with the SQL which I have to add as SQL Condition in the B1 UP Validation Configuration (the action which start the UF: showing a message).

I have till now:

IF (SELECT T0."DflAccount" FROM OCRD T0 WHERE T0."CardCode" = $[$4.0.0]) = ''
BEGIN
SELECT 'SHOW_ERROR' FOR BROWSE
END

When I test the validation, SAP gives me a syntax error of the SQL. I'm doing something wrong, but I don't know what.

Could you help me?

Thanks in advance!

Greets,
Jakob

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

First it seems that your query is wrong , you need to check if the result is null  not ' '

IF (SELECT T0."DflAccount" FROM OCRD T0 WHERE T0."CardCode" = $[$4.0.0]) is null

BEGIN

SELECT 'SHOW_ERROR' FOR BROWSE

END

can you attache screen shot so I can see the error ?

shachar