2011年3月30日 星期三

[ABAP] Add Button to ALV Toolbar

Add Button to ALV Toolbar with REUSE_ALV_LIST_DISPLAY
How to add button to ALV toolbar using REUSE_ALV_LIST_DISPLAY?
In the program which calls ALV using REUSE_ALV_LIST_DISPLAY,
I have to add a new button.
I saw the demo program BCALV_GRID_08, which is written using ABAP-Controls.
In that example, the button is added using TOOLBAR event of cl_gui_alv_grid.
Could you help me to implement the same logic using REUSE_ALV_LIST_DISPLAY parameters.
you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 -->Programming SubObjects--> Gui Status. 
( SE90 --> 程式庫 --> 程式子物件 --> Gui 狀態) 
Or use SE41 ( Thanks Eunice )
Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality such as sorting/subtotaling etc...

沒有留言:

張貼留言