Skip to Content
0
Former Member
Feb 13, 2007 at 09:41 AM

Button action in ALV

46 Views

HELLO FRIENDS,

This is the code to get a windows when click on the button basic.

No compilation errors .But no action performed even i click button 'basic'.

TYPE-POOLS : slis.

DATA: vt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: vt_fieldcat1 TYPE slis_t_fieldcat_alv.

DATA : BEGIN OF itab OCCURS 0,

p1 TYPE i VALUE 2,

p3 TYPE i VALUE 3,

END OF itab.

APPEND itab.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_client_never_display = 'X'

i_inclname = sy-repid

CHANGING

ct_fieldcat = vt_fieldcat.

.

IF sy-subrc <> 0.

ENDIF.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = sy-repid

I_callback_user_command = 'USER_COMMAND' "see FORM

i_callback_pf_status_set = 'SET_PF_STATUS' "see FORM

it_fieldcat = vt_fieldcat

TABLES

t_outtab = itab.

IF sy-subrc <> 0.

ENDIF.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'ZNEWSTATUS'.

"Copy of 'STANDARD' pf_status from fgroup SALV

ENDFORM.

FORM user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

CASE UCOMM.

WHEN 'BASIC'.

WINDOW STARTING AT 1 1

ENDING AT 20 20.

ENDCASE.

endform.