07-22-2008 4:41 PM
HI,
I WANT EXICUTION BUTTON ON THE APPLICATION TOOLBAR IN LIST SCREEN USING ALVGRID...
pls help me..
07-22-2008 4:43 PM
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
07-23-2008 12:40 PM
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