cancel
Showing results for 
Search instead for 
Did you mean: 

FMS NOT WORKING CORRECTLY

pvinod_kumar
Participant
0 Kudos

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

Johan_H
Active Contributor
0 Kudos

Hi,

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

Regards,

Johan

pvinod_kumar
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

inga_babco2
Explorer
0 Kudos

SELECT

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

THEN $[$38.U_GrdPrice.Number]

ELSE $[$38.U_GrdAmt1.Number]

END as Price

Answers (1)

Answers (1)

agustin_marcoscividanes
Active Contributor
0 Kudos

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

pvinod_kumar
Participant
0 Kudos

Thanks for the support

Regards