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: 

pf-status

Former Member
0 Kudos

hi experts,

i have a pf-status which is applicable to 2 'REUSE_ALV_LIST_DISPLAY' function module.I want to hide certain user defined buttons for the first list_display and hide certain others for second list_display.

How can this be achieved ?

Thank you in advance.

2 REPLIES 2

anversha_s
Active Contributor
0 Kudos

hi,


call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  
            i_callback_pf_status_set = 'SET_PF_STATUS'   "see FORM 
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.

*------------------------------------------------------------------*
*       FORM SET_PF_STATUS                                         *
*------------------------------------------------------------------*
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'ZNEWSTATUS'. 
                  "Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM.

***********copy pf status***********

1)goto se80

2)open function group SALV

3) In that STANDARD gui-status will be there.

4)right click on that and ther is option of copy

5)just copy it and save it with ur name 'status_name'.

6) now in ur program SET PF-STATUS '(status_name)'.

7)don't forget to active it again

Regards

Anver

Former Member
0 Kudos

first go to se80 choose fn grp SALV. take GUI status standard and copy for your program.

then code like this.

data : ievent type slis_t_event,

wevent type slis_alv_event.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = ievent

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

read table ievent into wevent with key name = 'TOP_OF_PAGE'.

if sy-subrc = 0.

wevent-form = 'TOP_OF_PAGE'.

endif.

in alv list display define

IT_EVENTS = ievent

in top of page form..

form TOP_OF_PAGE using extab type slis_t_extab.

data : wextab type slis_extab.

wextab-fcode = '&IC1'.

append wextab to extab.

<whatever you want to exclude just append that in extab>

set pf-status 'ZSTANDARD' excluding extab.

endform.

regards

shiba dutta