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

Adding a New button in ALV Grid

Former Member
0 Likes
393

Hello Guys,

I have to added a new button in ALV I am following the below mention step.

But new button are not appearing in ALV.

a) New PF-STATUS is required , say 'ABCD'.

b) Handle user_commmand

2. First of all, from Function group SALV,

copy the STANDARD gui status to your program,

from SE80, by right clicking.

3. come to your program.

start-of-selection.

SET PF-STATUS 'ABCD'.

4. Double click ABCD and activate the gui status.

4. In gui status,

add/change your own buttons

Save and activate.

Can some one guide me where is the problem,

Thanks

Swati..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
361

hi

after that, you should be passing the name of the pf-status in the alv grid fm..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SAT_REPID

I_CALLBACK_PF_STATUS_SET = 'ZSTANDARD' --> yours would be ABCD

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IS_LAYOUT = SAT_LAYOUT

IT_FIELDCAT = SAT_FIELDCATALOG[]

IT_EVENTS = SAT_EVENTS[]

TABLES

T_OUTTAB = ITAB_FINAL

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.

make sure there is a form ABCD in your program...

FORM ZSTANDARD USING P_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'ZSTANDARD1' EXCLUDING P_EXTAB.

ENDFORM. "ZSTANDARD

if helpful, reward

Sathish. R

hi

after that, you should be passing the name of the pf-status in the alv grid fm..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SAT_REPID

I_CALLBACK_PF_STATUS_SET = 'ZSTANDARD' --> yours would be ABCD

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IS_LAYOUT = SAT_LAYOUT

IT_FIELDCAT = SAT_FIELDCATALOG[]

IT_EVENTS = SAT_EVENTS[]

TABLES

T_OUTTAB = ITAB_FINAL

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.

make sure there is a form ABCD in your program...

FORM ZSTANDARD USING P_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'ZSTANDARD1' EXCLUDING P_EXTAB.

ENDFORM. "ZSTANDARD

if helpful, reward

Sathish. R

1 REPLY 1
Read only

Former Member
0 Likes
362

hi

after that, you should be passing the name of the pf-status in the alv grid fm..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SAT_REPID

I_CALLBACK_PF_STATUS_SET = 'ZSTANDARD' --> yours would be ABCD

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IS_LAYOUT = SAT_LAYOUT

IT_FIELDCAT = SAT_FIELDCATALOG[]

IT_EVENTS = SAT_EVENTS[]

TABLES

T_OUTTAB = ITAB_FINAL

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.

make sure there is a form ABCD in your program...

FORM ZSTANDARD USING P_EXTAB TYPE SLIS_T_EXTAB.

SET PF-STATUS 'ZSTANDARD1' EXCLUDING P_EXTAB.

ENDFORM. "ZSTANDARD

if helpful, reward

Sathish. R