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

how to sort internal table using table control, ALV and SAPscript.

aris_hidalgo
Contributor
0 Likes
479

Guys,

I have a few important questions. My first question is how can I sort my internal table that is inside a table control? I would like it that if I press a button, it would sort either ascending or descending order.

Also, Is there a way to diplay usign ALV? so for example when I press a button all the data from my table would be shown via ALV and/or sapscript?

examples preferred...

Thanks!

2 REPLIES 2
Read only

Former Member
0 Likes
457

Hi viraylab,

1. y first question is how can I sort my internal table that is inside a table control?

For this u will have to capture the function

code and use the syntax

SORT Itab.

Then accordingly u will have to refresh/populate

your table control (if u require)

2. Also, Is there a way to diplay usign ALV?

Well, For this again, u have to write

your own code

using the routine FMs

REUSE_ALV_LIST_DISPLAY

REUSE_ALV_FIELDCATALOG_MERGE

and passing the requisite internal table.

3. and/or sapscript?

Directly Not Possible !

There is no way like ALV FMs

which can show data in internal table

in the form of a sapscript !

Yes, one must SPECIFICALLY design a sapscript

and its driver program, to show the data. Only

then can it be called to show sapscript,

OTHERWISE NOT.

Hope it helps.

Regards,

Amit M.

Read only

0 Likes
457

can you guys give me examples on my questions. I'm just a beginner on SAP.Thanks!