2017 May 18 2:05 PM
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.
2017 May 18 2:54 PM
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
2017 May 18 3:28 PM
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.
2017 May 19 8:35 AM
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