05-03-2006 6:11 AM
Hi,
I need to add a custom button to the alv grid menu and i couldnt able to see the screen when i execute this program. Will u please tell me how to add a new button to the existing application toolbar of the ALV grid. I had tried this code but couldnt succeeded.
Here is my code.
REPORT ZZZZ .
&----
*& Report ZZZZ
*&
&----
*&
*&
&----
type-pools: slis.
Data to be displayed
data: gt_wrkpool type table of zte_wrkpool.
data: gs_wrkpool type zte_wrkpool.
data: gs_layout type slis_layout_alv.
DATA:G_REPID TYPE SY-REPID.
----
Selection
select * from zte_wrkpool into corresponding fields of table gt_wrkpool.
Eingabebereit
gs_layout-edit = 'X'.
G_REPID = SY-REPID.
Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
I_CALLBACK_PROGRAM = g_repid
I_CALLBACK_USER_COMMAND = 'ACTION'
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
i_structure_name = 'zte_wrkpool'
is_layout = gs_layout
IT_SORT = SORT[]
IT_EVENTS = events[]
tables
t_outtab = gt_wrkpool.
FORM pf_status_set USING gt_extab TYPE slis_t_extab.
SET PF-STATUS <ZSTANDARD>.
ENDFORM.
Create another subroutine:
&----
*& Form user_command
&----
Takes the User command and acts accordingly
----
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
call function 'sAP_WI_FORWARD'
..............
endform.
05-03-2006 6:59 AM
Hey Vicky,
I have uploaded a PDF on ALV on this link :
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
You go through this, your functionality will be achieved.
Thanks and Regards,
Kunal.
05-03-2006 6:30 AM
Hi vicky,
1. The important things are :
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.
6. AT USER-COMMAND.
IF sy-ucomm = 'MYFCODE'.
ENDIF.
regards,
amit m.
05-03-2006 6:34 AM
Did you see the program BCALV_TEST_FULLSCREEN_CALLS?
Regards,
Ravi
Note : Please mark the helpful answers
05-03-2006 6:36 AM
HI
TRY THIS OUT LINK
/people/ravikumar.allampallam/blog/2005/12/07/need-a-way-to-add-custom-buttons-to-standard-alv-report-toolbar--part-ii
THANKS
MRUTYUN
05-03-2006 6:43 AM
Hi Vicky,
Refer this pdf link...it ll definitely help u..
Rewward points if it helps.
With Regards,
Manikandan R
05-03-2006 6:55 AM
05-03-2006 6:59 AM
Hey Vicky,
I have uploaded a PDF on ALV on this link :
http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
You go through this, your functionality will be achieved.
Thanks and Regards,
Kunal.
05-03-2006 7:06 AM
Checkout these !!
/people/ravikumar.allampallam/blog/2005/12/07/need-a-way-to-add-custom-buttons-to-standard-alv-report-toolbar--part-ii
http://www.sapgenie.com/abap/controls/alvgrid.htm#Customize%20the%20appearence%20of%20the%20grid
http://www.abap4.it/download/ALV.pdf
also if you search on SDN , you`ll find lots of post with code!!