2013 Aug 15 3:47 AM
Hi experts,
I have a requirement like when I click on a button on the ALV grid report the same report has to be send as email attachment to an outside mail. I am using function module to generate this ALV. So is it possible to overwrite the mail recipient function. (FCode: %SL) or if I want to create my own button for the same purpose what has to be done. I tried copying the STANDARD status of saplkkbl program and then add my own button. But it is not showing the button on ALV grid.
Regards,
Marina.
2013 Aug 15 4:26 AM
you can hide standard mailing button to avoid any confusion. you should be able to add button in ALV toolbar...whats the issue with adding button?
2013 Aug 15 4:43 AM
Hi, I am not clear about what are you using ?
- CL_GUI_ALV_GRID - BCALV_GRID_05 - Add a Self-Defined Button to the Toolbar
- REUSE_ALV_LIST_DISPLAY - BCALV_TEST_FULLSCREEN_EDIT (There is "test" button)
In CL_GUI_ALV_GRID you can also overriding standard functions using event “before_user_command” .
Search GOOGLE in for "An Easy Reference for ALV Grid Control" its a PDF book you might find it useful
Regards.
2013 Aug 15 5:01 AM
im talking about it_toolbar_excluding parameter of set_table_for_first_table. by this you can exclude std. button and can add additional functionality IF standard button is not suitable for your requirement.
2013 Aug 15 5:04 AM
Hi Eitan,
I am not using OOPS alv. I am using function module generated ALV. So please give me an example with the same.
Regards,
Marina.
2013 Aug 15 4:49 AM
1.in method SET_TABLE_FOR_FIRST_DISPLAY of class CL_GUI_ALV_GRID there is 1 parameter called IT_TOOLBAR_EXCLUDING.
append your toolbar button which you don't want to this table.
code like this:
REFRESH GT_EXCLUDE.
GS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_DETAIL.
APPEND GS_EXCLUDE TO GT_EXCLUDE.
2. in the toolbar initial event TOOLBAR of class CL_GUI_ALV_GRID add your own button.
3. in event USER_COMMAND, catch this fcode, and do your own logic.
hope this help you to resolve your issue.
2013 Aug 15 5:16 AM
If the objective is to sending ALV as an attachment to an external id, you may use the in-built facility in ALV through:
List --> Send to --> Mail Recipient.
Here use 'External address' option in the drop-down available.
Here you can type a message also if you desire so.
-Jogeswara Rao K
2013 Aug 15 5:31 AM
Hello,
I need all these functions to happen in just one button click. Not manually. By the way is there i any configuration change which I have to do if I want to send ALV like you have mentioned. I have tried sending the ALV to my maid id, but its not sending. Eventhough this is not my requirement I would like to know how to do it.
Regards,
Marina.
Regards
2013 Aug 15 8:16 AM
you should contact with basis, confirm scot setting is correct or not.
2013 Aug 15 8:45 AM
Hi
Follow the below steps,
1. Declare a handler method for the event TOOLBAR of class cl_gui_alv_grid
2. For the above event you will have e_object as importing parameter.
3. In that e_object you will have mt_toolbar as a attribute which is a internal table.
4. In this internal table you will have details of all the buttons of toolbar.
5. Loop that internal table with the ICON name and modify the field disabled = 'X'.
Go through the standard program BCALV_GRID_05 for reference in which the functionality of adding a new button is present.
Regards,
Sandeep