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

Former Member
0 Kudos

HI,

I WANT EXICUTION BUTTON ON THE APPLICATION TOOLBAR IN LIST SCREEN USING ALVGRID...

pls help me..

2 REPLIES 2

Former Member
0 Kudos

hi,

U can Add Buttons and give a SYMBOL to this button in ALV and also write the code to process when this Button is HIt.

Please look into the PF-status of the program and add but in the PF-Status.

Please open the program in Se80 and look at the PF.

Hope this helps

Shreekant

ankurgodre
Active Contributor
0 Kudos

Hi Radha Krishna,

Tocreate a custom pushbutton you can follow the follwing steps:

1. First create a PF-status in ur code as follows:

FORM STAT USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'TEST' EXCLUDING rt_extab.

ENDFORM.

2.After the above step, u need to double click on ''TEST which can be any name u want to give (I have used TEST for example) & once u double click on it, it will ask u for langiage maintenance: u can click 'Maintain original language'. Then after U reach the 'Maintain Status' screen where in u can click on the Button (An arrow coming out from a square sign) against 'Application Toolbar'..Here u need to type &PUSH (where puch will be the name of ur pushbutton which will appear on the output list's application toolbar), hit enter after that & save & activate it & go back to the code.

3.Now in the coding part, in the ALV FM: 'REUSE_ALV_GRID_DISPLAY', u will need to set the following parameters as mentioned below:

A. I_CALLBACK_PF_STATUS_SET = 'STAT'

B. I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

4.Now finally, u can give the function of the pushbutton by putting the follwing in ur code :

FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM I_SELFIELD TYPE SLIS_SELFIELD.

CASE F_UCOMM.

WHEN '&PUSH'.

**put the function u want to execute****

(Ex: Leave Program.)

ENDCASE.

I AM SURE THIS WILL RESOLVE UR PROBLEM.

Cheers

Ankur Godre