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

Layout in ALV

Former Member
0 Likes
931

HI

I set a layout in ALV with asscending order on any field. On runtime is there any way (i mean any variable) by which i know the sort order of layout.

I am using class cl_salv_layout.

any answer with different class are also welcome.

Regards

Aditya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
905

Hi,

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6]

Regards,

Sravanthi

HI

I set a layout in ALV with asscending order on any field. On runtime is there any way (i mean any variable) by which i know the sort order of layout.

I am using class cl_salv_layout.

any answer with different class are also welcome.

Regards

Aditya

5 REPLIES 5
Read only

Former Member
0 Likes
905

Aditya,

look in IT_SORT table on which field sorting is performed.

Amit.

Read only

Former Member
0 Likes
905

Hi Aditya,

Check this method GET_SORT_CRITERIA of CL_GUI_ALV_GRID.

OR

SORT_TABLE method of same class

OR

SORT_TABLE_UP_OR_DOWN method of CL_GUI_ALV_GRID

Hope this would help you.

Regards

Narin Nandivada

Read only

Former Member
0 Likes
905

You have the field cat and the sort table, you can find out what are the sort fields.You can dynamically change the sort field if you want.

What do you want to do after you know what is your sort field?

If the hint is usefulu2026 Say thanks by rewardu2026.

Regards,

Prabhu Rajesh

Read only

Former Member
0 Likes
906

Hi,

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6]

Regards,

Sravanthi

Read only

Former Member
0 Likes
905

Hi Aditya,

You can use get_sort_criteria in CL_GUI_ALV_GRID .

CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->get_sort_criteria

IMPORTING

ET_SORT = <internal table of type LVC_T_SORT > .

Check This Link:

http://help.sap.com/saphelp_erp2004/helpdata/en/ba/e92737739ce038e10000009b38f889/content.htm

Hope this helps you.

Regards,

Chandra Sekhar