Application Development and Automation 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: 
Read only

ALV Mail Send Button

former_member207873
Participant
0 Likes
2,888

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.



9 REPLIES 9
Read only

Former Member
0 Likes
1,753

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?

Read only

0 Likes
1,753

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.

Read only

0 Likes
1,753

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.

Read only

0 Likes
1,753

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.

Read only

Aiolos
Active Participant
0 Likes
1,753

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.

Read only

jogeswararao_kavala
Active Contributor
0 Likes
1,752

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

Read only

0 Likes
1,752

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

Read only

0 Likes
1,752

you should contact with basis, confirm scot setting is correct or not.

Read only

Former Member
0 Likes
1,752

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