Tuesday, January 4, 2011
We create one SORT button in application toolbar. Highlight the column by clicking the header to find what column to sort by and press SORT button to sort table control values.
Steps to implement SORT in table control
Steps to implement SORT in table control
- Define table control.
- Define COLS table for table control column properties.
- Check whether column has been selected or not.
- Sort the table with selected column.
CONTROLS: TC_SPFLI TYPE TABLEVIEW USING SCREEN 100.
DATA:fld_list LIKE tc_spfli-cols. DATA:wa_fld_list LIKE LINE OF fld_list.
LOOP AT tc_spfli-cols INTO wa_fld_list. IF wa_fld_list-selected = 'X'. APPEND wa_fld_list TO fld_list. ENDIF. ENDLOOP.
DATA: fldname(100). SORT fld_list BY index. READ TABLE fld_list INDEX 1 INTO wa_fld_list. fldname = wa_fld_list-screen-name+9. SORT it_spfli BY (fldname).
Demo programs
- DEMO_DYNPRO_TABCONT_LOOP_AT
- RSDEMO02
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.