2008 Jan 19 12:37 PM
hi friends,
could u plz tell me about the event 'PF_STATUS_SET' in ALV....how can we use in alv report .
send me some programs regarding that.
thanks in advance.
regards,
priya.s
hi friends,
could u plz tell me about the event 'PF_STATUS_SET' in ALV....how can we use in alv report .
send me some programs regarding that.
thanks in advance.
regards,
priya.s
2008 Jan 19 12:43 PM
2008 Jan 19 1:03 PM
Hi Priya,
Use class cl_gui_alv_grid and not the old SLIS modules
I've coded an example in a previous post.
However for the PF status just have a standard Status with EXIT, BACK and CANCEL buttons (SE41).
In the PBO code
set pf-status '001'.
set titlebar '000'.
Code this after the display of the grid statement in your PBO module.
call method grid1->set_table_for_first_display
exporting is_layout = struct_grid_lset
changing
it_outtab = <dyn_table>
it_fieldcatalog = it_fldcat.
Then in your PAI just code something like
module user_command_0100 input.
case sy-ucomm.
when 'BACK'.
leave program.
when 'EXIT'.
leave program.
when 'RETURN'.
leave program.
when others.
endcase.
endmodule
cheers,
Hema.
2008 Jan 19 1:05 PM
Hi Priya, also check this.
Check
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/set_pf_s.htm
kindly reward if found helpful.
cheers,
Hema.
2008 Jan 20 6:54 AM
Hi
specify a subroutine name in I_CALLBACK_PF_STATUS_SET.
(say PF_SET)
this subroutine will be triggered. & don't forget to mention I_CALLBACK_PROGRAM
and u need to copy the pf-status from any standard alv in order to get the standard functionalities. using SE41 menu painter. use BALVBH01 to copy its STANDARD pf-status to ur own program.
FORM PF_SET USING T_EXTAB TYPE SLIS_T_EXTAB.
use SET_PF_STATUS here. name it as u've named while copying it in SE41.
endform.
Hi,
Please check this code
refresh p_events. clear p_events.
perform f_event_build using p_events[].
p_header = text-033.
data : v_status_set type slis_formname value 'F_PF_STATUS_SET'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = p_fieldcat2[]
it_excluding = p_excltab2[]
is_layout = p_layout2
i_callback_program = sy-repid
i_callback_html_top_of_page = p_header
i_callback_pf_status_set = v_status_set
it_events = p_events[]
tables
t_outtab = i_message1.
&----
Form f_pf_status_set *
&----
For setting PF status to REUSE *
&----
form f_pf_status_set using rt_extab type slis_t_extab..
set pf-status '9000'.
endform. " F_pf_status_set
*
&----
Form f_event_build *
&----
For build event for grid *
&----
form f_event_build using p_events type slis_t_event.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_events.
read table p_events with key name = slis_ev_pf_status_set
into ls_event.
if sy-subrc = 0.
move v_status_set to ls_event-form.
append ls_event to p_events.
endif.
endform. " F_event_build
2008 Jan 20 8:40 AM
Hi..
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = ws_repid
i_callback_pf_status_set = 'GUI_STAT'
i_callback_user_command = 'STAT'
is_layout = gs_layout
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = i_zaw_pol_plan.
ENDFORM. " change_data
**--Setting Status of outout screen
FORM gui_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
SET TITLEBAR text-005.
ENDFORM.
Double click on 'STANDARD' and set the status.
If you do like this, you dont get standard ALV application tool bar.
So before writing this,
follow these navigations.
se80 -> give function group name as SALV -> enter -> then you click on GUI_STATUS
-> Right click on STANDARD and Copy to your program.
-> go to se41 -> give your program name and pf_status name -> activate.
-> if you want to do any changes, you can do according to your requirements.
Regards
sandeep.
Edited by: Sandeep Reddy on Jan 20, 2008 9:43 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |