cancel
Showing results for 
Search instead for 
Did you mean: 

Query for Business Partner Past dues in SAP Business one

former_member546322
Participant
0 Kudos

Dear All,

If a customer has any past dues, then an approval process should trigger while creating new Sales order for that customer. I need a query that I can use to setup my approval process in SAP Business One on HANA...

Thanks,

RV

Accepted Solutions (1)

Accepted Solutions (1)

kvbalakumar
Active Contributor
0 Kudos

Hi,

Please check the below:

SELECT DISTINCT 'TRUE' 
FROM OINV
WHERE "CardCode" = $[ORDR.CardCode] AND DAYS_BETWEEN(CURRENT_DATE,"DocDueDate") < 0 AND "DocStatus" = 'O'

Regards,

Bala

former_member546322
Participant
0 Kudos

Thanks Bala. its working. I will do few more test and let you know if i get any issue...Great help

Answers (1)

Answers (1)

former_member546322
Participant
0 Kudos

Hi Bala,

Thanks for the solution..I am getting syntax error, incorrect syntax near $. I am running this query in HANA db.

Thanks for the help!

RV

kvbalakumar
Active Contributor
0 Kudos

Hi,

Did you execute this query at HANA studio or query generator? If yes, you will get the error since the $[] value is representing the on screen data.