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: 

Column selection in SM30 screen

kirankumark2
Participant
0 Kudos
1,404

I have a table with TMG created for it. My requirement is to put 2 buttons in SM30 screen one is for Ascending and another is for Descending Order sort functionality. In sm30 screen if I try to select whole column, it is not getting selected as it does in reports. In reports if we click on any Column heading automatically whole column will be selected. Here, if i click on Column heading(Field name) nothing is selected. I can see that SM30 program is a module pool program. It's an urgent requirement. Can anyone help me to implement logic for selecting whole column when user clicked on any column heading and sort operation.

3 REPLIES 3

rajkumarnarasimman
Active Contributor
0 Kudos
588

Hi Kiran,

In Table control, we can select the column as like ALV. Just change the table control properties as shown below.

Modify the TMG PF-STATUS by adding the Ascending and Descending button. Also write the respective code under PAI section.

Regards

Rajkumar Narasimman

0 Kudos
588

Thanks Raj for your Quick reply.

But here TMG is SM30 means standard Table control program. if I make any changes to that program does it reflects in all the tables in future?. I am bit confused about TMG related program, Generally that code will be created in the Function group which we are providing at the time of TMG Creation. Can you clarify me about these points.

0 Kudos
588

Hi Kiran,

Is the change related to standard table or custom table?

If it is custom table, we can modify the table control properties in TMG function group at where the screen is mapped.

For adding the buttons, please find the document link

https://blogs.sap.com/2016/12/21/sorting-columns-dynamically-in-a-table-control/

Regards

Rajkumar Narasimman