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

sorting on variable

Former Member
0 Likes
411

Hi friends,

I want to sort my output by deliver date and i fetch del date in one variable

see like that

SELECT SINGLE eket~eindt FROM eket INTO (l_eindt)

WHERE ebeln = iekpo-ebeln AND ebelp = iekpo-ebelp.

iekpo1-eindt = l_eindt.

here I fetch delivery date in l_eindt. ok

so now i want to sort this field.

so plz tell me.its urgent so.

Thnaks in advance.

Prashant.

2 REPLIES 2
Read only

Former Member
0 Likes
372

Hi,

How can you SORT one variable.It contains only one values.

For this foolow below code.

create internal table

DATA : BEGIN OF i_eket OCCURS 0,

eindt LIKE eket-eindt,

END OF i_eket.

IF not iekpo[] IS INITIAL.

SELECT eindt

FROM eket

INTO TABLE l_eket

FOR ALL ENTRIES IN iekpo

WHERE ebeln = iekpo-ebeln AND

ebelp = iekpo-ebelp.

ENDIF.

Read only

Former Member
0 Likes
372

hi,

what is the point of sorting that variable..your select query will any way fetch one value into the variable.

Can you be little more specific about the scenario..

Regards,

Abhi