cancel
Showing results for 
Search instead for 
Did you mean: 

AMDP in BW transformation: UP TO 1 ROWS

yj
Participant
0 Kudos

Dear all,

in BW I have a transformation with an end routine in which I would like to select data from another table.

It is a table with material prices for each month/year, company code, plant and material.

How do I get only the latest price in my AMDP coding? E.g. I only need the price for September 2023 and not for all months.

This code does not work:

MAT_PRICES = SELECT

"CALMONTH",

"COMP_CODE",

"PLANT",

"PRICE_VAL"

UP TO 1 ROWS

FROM "/BIC/ACOPC_O2"

ORDER BY "CALMONTH" DESC

ENDSELECT;

I get the following error: SQLSCRIPT: sql syntax error: incorrect syntax near "TO"

Thanks & best regards,

Yvonne

View Entire Topic
Torsten_
Advisor
Advisor
0 Kudos