Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

hi experts select statment

Former Member
0 Likes
701

select matnr netpr aedat from ekpo INTO table IT_EKPO where matnr = BOM-idnrk

for this 11 records are coming to internal table, for this i need latest date price,

how to take that .

can u guide me.

select matnr netpr aedat from ekpo INTO table IT_EKPO where matnr = BOM-idnrk

for this 11 records are coming to internal table, for this i need latest date price,

how to take that .

can u guide me.

5 REPLIES 5
Read only

Former Member
0 Likes
672

Hi use this

select matnr netpr aedat

from ekpo

up to 1 rows

INTO table IT_EKPO

where matnr = BOM-idnrk

order by aedat decending.

Here u will get last price

Regards

Srimanta

Read only

Former Member
0 Likes
672

Hi,

Sort your internal table descending order..then read the internal table at index 1.


sort itab descending by aedat.

read table itab index 1.

Arunima

Read only

Former Member
0 Likes
672

Hi,

use like this:

select matnr netpr aedat upto 1 rows from ekpo INTO table IT_EKPO where matnr = BOM-idnrk

order by aedat descending.

Read only

Former Member
0 Likes
672

Hi,

You can do as below:

Once IT_EKPO is filled up with the data. Use the code below :



SORT IT_EKPO BY aedat.

READ TABLE IT_EKPO INDEX 1.

WRITE : IT_EKPO.

Thanks,

Sriram POnna.

Read only

Former Member
0 Likes
672

hi,

If you want latest date or hight price the you can write select statement

select matnr

max( netpr )

aedat from ekpo INTO ekpo where matnr = BOM-idnrk

this may solve your problem.

Thanks & regards