Skip to Content
0

FMS NOT WORKING CORRECTLY

Dec 04, 2017 at 12:08 PM

38

avatar image

Hi experts

I had created a FMS to join 2 UDF and the result should be pop up in Unit price in AP credit memo

1. U_GrdPrice

2.U_GrdAmt1

Both are Numeric type

The above given is the tables in SAP

if GrdPrice > 0 then the unit Price should be from Grade amount

Else unit price should be Grade Price

Also pls see my FMS Query

Regards

IF $[RPC1.U_GrdPrice] > 0
THEN $[RPC1.U_GrdPrice]
ELSE
$[RPC1.U_GrdAmt1]
End

untitled.png (5.2 kB)
10 |10000 characters needed characters left characters exceeded

Hi,

Could you please let us know in what way it is not working?

Regards,

Johan

0

if the GrdPrice = 0 then also GrdAmt1 value pop up

also i get an error

1). [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax near the keyword 'THEN'. 2). [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Statement(s) could not be prepared. FMS execution failed on field '' with query name 'Test'

when i copy AP Invoice to AP Credit Memo

Regards

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Inga Babco Dec 04, 2017 at 02:04 PM
0

SELECT

CASE WHEN $[$38.U_GrdPrice.Number] > 0

THEN $[$38.U_GrdPrice.Number]

ELSE $[$38.U_GrdAmt1.Number]

END as Price

Share
10 |10000 characters needed characters left characters exceeded
Agustin Marcos Cividanes Dec 04, 2017 at 05:09 PM
0

Hi

try this query:

IF $[RPC1.U_GrdPrice]>0 THEN select $[RPC1.U_GrdPrice] ELSE select $[RPC1.U_GrdAmt1] 

Kind regards

Agustín Marcos Cividanes

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the support

Regards

0