Application Development 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: 

any provision to view mail prior to sending ?

former_member197696
Participant
0 Kudos

Hi All ,

           I have written an  ALV report  where we can send mail to selected customers . Now i want to add an additional functionality such that the user can see the mail and even edit (if possible)  prior to sending  . Is there any thing called as 'Print Preview' for abap reports . I would like to know how to approach to achieve this functionality .

regards,

kishhore

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hii,

U can view mail by using this fm,

  call function 'SO_DOCUMENT_DISPATCH_MANAGER'

    exporting

      activity = 'DSPO'

    tables

      objects  = lt_objects

    exceptions

      others   = 1.

Its working for me, same functional module is called sost tcode to preview mail

11 REPLIES 11

FredericGirod
Active Contributor
0 Kudos

Hi,

you can't print preview a Smartforms if you ask the Smartforms to be sent by email.

You can't print preview if you print-it

but, you can simulate the print, catch the OTF, convert it in PDF  and send it by email, or you could ask for XSF and convert it in HTML and insert in the mail body ..

to edit the smartforms, I have do something like that.

Ask the user to enter or complete a text in an cl_gui_textedit and send this information to the Smartforms ...

Regards

Fred

0 Kudos

Hi Frederic ,

                      My requirement is on ALV reports but not smartforms .

Regards

kishore

0 Kudos

ooops

so ALV edit, save ...

you have to catch the print preview ...

not easy but you can do it

Fred

0 Kudos

Hi Frederic ,

                      Can you please guide me on where to start  .

Regards,

Kishore

former_member209120
Active Contributor
0 Kudos

Dear Kishore,

In your case, I think you can use editable alv.

See this link http://saptechnical.com/Tutorials/ALV/Edit/demo.htm

Regards,

Ramesh.T

Former Member
0 Kudos

Hi Kishore,

U can convert a alv report in pdf file and can be sent as an attachment to the email.

Regards,

Prashant N.

former_member217316
Contributor
0 Kudos

Hi Kishore

I would suggest you to display the ALV report (make the ALV editable).

Once the user has satisfactorily reviewed the report and made changes to it in case needed, provide the button to 'send mail'. Since the mail will comprise of the report fields only, this should be an acceptable option.

Hope this helps.

Harsh

0 Kudos

Hello Harsh ,

                       Yes it is a good option about editing the text but what about the email preview .

My email consists of a logo , text(header,body and footer) along with the background color(some color as per the requirement) .

Regards ,

kishore

Former Member
0 Kudos

Hii,

U can view mail by using this fm,

  call function 'SO_DOCUMENT_DISPATCH_MANAGER'

    exporting

      activity = 'DSPO'

    tables

      objects  = lt_objects

    exceptions

      others   = 1.

Its working for me, same functional module is called sost tcode to preview mail

0 Kudos

is lt_objects email template ??

0 Kudos

Hello ,

              I have read the documentation and searched for code for using that function module and was unsuccessful . Can you please help me in sending code help regarding function module

SO_DOCUMENT_DISPATCH_MANAGER or guide me about exactly should i pass , is it the html template . Please help

Regards

Kishore