cancel
Showing results for 
Search instead for 
Did you mean: 

FMS query erroring out Help

0 Kudos

Hi All

When i want to sum up quantities of each item to an UDF in Sales Order I get an following error.

SELECT SUM(Quantity) FROM ORDR, RDR1 WHERE U_NoOfPcs=$[RDR1.quantity.number]

Incorrect syntax near 'RDR1.quantity.number'.

Thanks in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Could you post your working FMS here to check? Your first post and reply is not related.

Regards,

Nagarajan

0 Kudos

Kindly help me for creating dropdown list for UDF...

My task is:

I've mapped some attributes( user defined table ) to an item in OITM

Now mapped attributes only have to display in UDF at Sale order but here all attributes are showing.

Johan_H
Active Contributor
0 Kudos

Hi,

That query makes no sense at all.

Don't you mean that FMS to be in the U_NoOfPcs UDF, triggered by each change in DocTotal, and shouldn't the query be something like this?

SELECT SUM(ISNULL(t1.Quantity,0)) 
FROM ORDR t0
     INNER JOIN RDR1 t1 ON t0.DocEntry = t1.DocEntry
WHERE t0.DocNum = $[ORDR.DocNum]

Regards,

Johan

0 Kudos

Thanks but for a particular sale order i need to calculate no of pieces of various styles

the below worked for me but I cant able to update automatically. For the updation i need to select picker's indicator

select sum(quantity) from RDR1 where DocEntry=N'14'

Johan_H
Active Contributor
0 Kudos

Unfortunately I cannot see your screen, I cannot access your database, and I cannot read your mind.

Please give us a little more details, about the scenario, and the (user defined) fields involved.

0 Kudos

The above is the working FMS and i modified to my first post and worked.