‎2007 Aug 15 5:06 PM
hi,
i,y requirement is to place a new button in ALV applicaton toolbar.
for that i have copied a standard pf status and trying to change it
but nothing display when i exe. program using that status.
even the standard layout dissappears.
is there any solution.
‎2007 Aug 15 5:11 PM
hi
check this code..
set pf-status and add ur custom buttons there.
************************************************************************
Setting the pf_status which are from ALV Grid function
************************************************************************
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'DELE'.
ENDFORM. "Set_pf_status
************************************************************************
*User command.
************************************************************************
code to ur buttons and place ur logic here
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
case r_ucomm.
when delete button is click on alv tool bar
when '%CI'.
leave to screen 0 .
when cancel button is click on alv toobar
when '%CJ'.
leave to screen 0 .
endcase.
ENDFORM. "User_command
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = w_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
<b>I_CALLBACK_USER_COMMAND = 'USER_COMMAND'</b>
IT_FIELDCAT = gt_fieldcat[]
I_SAVE = 'A'
TABLES
T_outtab = ITAB
EXCEPTIONS
PROGRAM_ERROR = 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.
<b>reward points for useful ans</b>
Regards
ankit
Message was edited by:
ankit harjai
‎2007 Aug 15 5:16 PM