‎2010 Aug 20 2:10 PM
I have copied program RIAUFK20 to ZRIAUFK20. I have made a few changes to set the G_repid to RIAUFK20 as it was before, in order to keep the same field cat and screen variants. BUt for some reaosn when performing the below call to the ALV grid, I don't get a PF-STATUS - no buttons.
The g_form_set_pf_stat is the same as the original program SET_PF_STAT_F14 but for some reason this does not pull through? Any ideas?
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = g_alv_buffer
i_callback_program = g_repid
i_callback_pf_status_set = g_form_set_pf_stat
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
is_layout = g_layout
it_fieldcat = g_fieldcat_tab[]
it_excluding =
it_special_groups = g_fieldgroups_tab[]
it_sort = g_sortfields_tab[]
it_filter =
is_sel_hide =
i_default = g_n
i_save = g_variant_save
i_save = g_a
is_variant = g_variant
it_events = g_events_tab[]
it_event_exit = g_event_exit_tab[]
is_print = g_print
i_screen_start_column = g_screen_start_column
i_screen_start_line = g_screen_start_line
i_screen_end_column = g_screen_end_column
i_screen_end_line = g_screen_end_line
importing
e_exit_caused_by_caller =
TABLES
t_outtab = object_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
‎2010 Aug 20 2:14 PM
I guess i_callback_program is used only for handling all your callback routines, not to determine PF status of that program.
I would suggest two approaches:
- copy pf status too and set it in your routine g_form_set_pf_stat
- in the same routine use FM RS_EXTERNAL_SELSCREEN_STATUS to set external program status
Regards
Marcin
‎2010 Aug 20 2:33 PM
I'm not sure I follow? I have treid the below code in the below form, but I'm not even sure how this form gets called as it wont break in this form?
FORM set_pf_stat_f14 USING rt_extag TYPE slis_t_extab. "#EC CALLED
*NEW CODE BEGIN>>>>>>>>>>>>>>
g_form_set_pf_stat = 'SET_PF_STAT_F14'.
CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS'
EXPORTING
p_fb = g_form_set_pf_stat
.
*NEW CODE END>>>>>>>>>>>>>>
*--- link to SAPPHONE not aktive -> deaktivate function -
IF NOT g_sapphone_active = g_x.
APPEND 'PHON' TO rt_extag.
ENDIF.
*--- not in select mode -> deaktivate function -
IF g_selmod = selmod_0 OR g_selmod = selmod_s.
APPEND 'ISEL' TO rt_extag.
ENDIF.
*--- customizing mode -> display/change mode inactive -
IF g_variant_save = g_x.
APPEND 'V-A ' TO rt_extag.
ENDIF.
*--- Monitorfunction not acitve with grid control
IF g_grid IS INITIAL.
APPEND 'MONI' TO rt_extag.
ENDIF.
SET TITLEBAR 'LVS' WITH tstct-ttext.
IF g_aktyp IS INITIAL.
g_aktyp = t370a-aktyp.
ENDIF.
*--- inactivate function (todo and slin) as not used in all programms
IF g_aktyp = 'V'. "#EC *
SET PF-STATUS 'AEND' EXCLUDING rt_extag. "#EC *
ELSE. "#EC *
SET PF-STATUS 'MAIN' EXCLUDING rt_extag. "#EC *
ENDIF. "#EC *
ENDFORM. "set_pf_stat_f14
‎2010 Aug 20 2:48 PM
Sorry I gave you wrong FM, this one is used for selection screen. Anyhow what I mean is
CALL FUNCTION 'REUSE ...'
i_callback_program = 'ZRIAUFK20' "your current program
i_callback_pf_status_set = 'SET_PF_STAT_F14' "your custom routine where you set your status
"Now set status of external program
FORM set_pf_stat_f14 USING rt_extag TYPE slis_t_extab.
"add functions to exclude
append ... to rt_extag.
SET PF-STATUS status OF PROGRAM RIAUFK20 EXCLUDING rt_extag.
ENDFORM.
That should do the job
Regards
Marcin
‎2010 Aug 20 2:37 PM