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: 

ALV event PF_STATUS_SET??

Former Member
0 Kudos

Hi,

I am trying to set my own STATUS to a ALV report.

To do this iam passing the form name into it_events tabled through

REUSE_ALV_GET_EVENTS and REUSE_ALV_GRID_DISPLAY.

but when the list is displayed there is no STATUS at all.

I also tried giving the form anme in I_CALLBACK_PF_STATUS_SET.

the same problem occurs.

Can you please tell me how to declare the form for set pf-status... bcoa i think that is where this problem is occuring.

Thanks.

Goldie

1 ACCEPTED SOLUTION

RoySayak
Active Participant
0 Kudos

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.

Reward if useful

Thanks

Sayak

3 REPLIES 3

RoySayak
Active Participant
0 Kudos

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.

Reward if useful

Thanks

Sayak

former_member194669
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you all very much.

I didnt mention the I_CALLBACK_PROGRAM

thats why it wasnt working.

and....

we shouldn't pass sy-repid directly into the above field.

I wont in that case either.

Thanks