Application Development and Automation 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: 
Read only

problem when using gui in alv

Former Member
0 Likes
318

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.

2 REPLIES 2
Read only

Former Member
0 Likes
301

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

Read only

Former Member
0 Likes
301

hi

<b>check this link:</b>

<b>reward points</b>

<i>Regards

vivek</i>