Application Development 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: 

Remove checkbox retain leftmost checkbox by FM REUSE_ALV_GRID_DISPLAY

calvinkarlo
Explorer
0 Kudos

Dear All,

I would like to remove this checkbox and retain the leftmost checkbox.

DATA: I_LAYOUT TYPE SLIS_LAYOUT_ALV.
LS_FIELDCAT-COL_POS = '1'.
LS_FIELDCAT-FIELDNAME = 'LCHECK'.
LS_FIELDCAT-TABNAME = 'TS_PFOUTPUTREPORT'.
LS_FIELDCAT-SELTEXT_M = 'Checkbox'.
LS_FIELDCAT-EDIT = 'X'.
LS_FIELDCAT-INPUT = 'X'.
LS_FIELDCAT-CHECKBOX = 'X'.
APPEND LS_FIELDCAT TO LT_FIELDCAT.
CLEAR:LS_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "'REUSE_ALV_LIST_DISPLAY' "'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = LT_FIELDCAT
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = TS_PFOUTPUTREPORT.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
4 REPLIES 4

Eduardo-CE
Active Participant

Don´t append it to fieldcat

Or declare the field as 'technical' in the field catalog.

Sandra_Rossi
Active Contributor

Why using both standard I_LAYOUT-BOX_FIELDNAME + custom column in the field catalog?

Just use standard I_LAYOUT-BOX_FIELDNAME.

See example here: https://stackoverflow.com/a/73174243/9150270

calvinkarlo
Explorer
0 Kudos

It worked! Thanks a lot!