Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP code to select maximum value of a characteristic

Hello All,

we have a requirement to select the value of A based on the highest value of VALID TO field.

Eg:

If my DSO has the following values:

If A = 1 for VALID TO = 201111,

A =2 for VALID TO = 201112

and A =3 for VALID TO = 201201.

then while moving the data to the Infocube, we need to write code to pickup the data of A =3 since it hs the highest VALID TO value. I tried writing the following statement

select single max ([DISTINCT] /BIC/ZVLID_TO) from /BIC/AZTESTB00

but this is giving me a syntax error

'E:Unknown column name "MAX" until runtime, you cannot specify a field

list.'

Please advice..

Regards

Sneha

Former Member
Not what you were looking for? View more on this topic or Ask a question