Skip to Content
0
Former Member
May 16, 2010 at 12:02 PM

Reuse_alv_grid the Pf status and user command pblm

166 Views

Hi All,

I am using Reuse_alv_grid_display FM.

Eg: My Internal table has 3 fields 1. Chk box 2. Matnr 3. Value (1, 2. 3) which are editable.

I want to show pop ALV screen where user will select the check box and change the value from 1 to 3 and proceed further.

I have displayed the list which are edit able chk boz and values.

My pblm the Pf-status after declaring coming blank and user command does able to recognize changes on ALV list.

How to handle when your calling pop up alv and user command is showing value '&ONT' not usual '&IC1'

My eg: below.

alv_lay-zebra = 'X'.

alv_lay-colwidth_optimize(1) = 'X'.

alv_slis_alv_event-name = 'USER_COMMAND'.

alv_slis_alv_event-form = 'USER_COMMAND'.

APPEND alv_slis_alv_event TO alv_slis_t_event.

CLEAR : alv_slis_alv_event.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = sy-cprog

I_CALLBACK_PF_STATUS_SET = 'STATUS1'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_STRUCTURE_NAME = 'IT_FINAL_TARGET'

IS_LAYOUT = alv_lay

IT_FIELDCAT = it_fldcat

I_DEFAULT = 'X'

I_SAVE = 'X'

IT_EVENTS = ALV_SLIS_T_EVENT

I_SCREEN_START_COLUMN = 1

I_SCREEN_START_LINE = 1

I_SCREEN_END_COLUMN = 81

I_SCREEN_END_LINE = 20

TABLES

t_outtab = IT_FINAL_TARGET

FORM set_pf_status USING p_rt_extab.

SET PF-STATUS 'STATUS1' EXCLUDING p_rt_extab.

ENDFORM.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&ONT'. "User Command value on the screen

READ TABLE it_final_target INTO wa_final_target INDEX rs_selfield-tabindex.

IF rs_selfield-fieldname = 'FROM_SP'.

ELSEIF rs_selfield-fieldname = 'CHK'.

endif.

ENDCASE.

ENDFORM.

Do help me out. Thanks