cancel
Showing results for 
Search instead for 
Did you mean: 

Custom attachment name when pressing email button

Former Member
0 Kudos

Hello everyone,

Who knows a possible solution for the following:

When I click my e mail button on the custom interactive form (e.g. custom salesorder print, or custom contract print etc.) it creates an e mail with an attachment name such as: 133a078_21461.pdf (by using the event.target.mailDoc function).

What I want is to build up my own attachment filename such as SalesOrder2010-12-30.pdf

How can this be best achieved?

I already searched the 'whole' internet, but couldn't find it. What I don't want is to create my own javascript file and save it the pc of each enduser. I already thought of the possibility to do some coding on the ABAP side, just before the form is started... but I have no clue.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

Did you find the solution? I have the same requirement.

If you have implemented, please share.

Thank you

Meet Vajaria

Former Member
0 Kudos

Hi Sai,

Thank you for your response.

It's not a webdynpro. (It's true that there is info available where you can set the filename in case of a webdynpro.)

When you set any pdf form in your NACE transaction, whether it's for billing, delivery, sales etc., all pdf forms have a filename similar like as7df7asdf8.pdf. Just like you also mentioned.

So I guess one solution would be to write abap code that does not preview the pdf, but rather downloads the pdf with the custom filename in my case, where the requirement is to have a custom filename.

OttoGold
Active Contributor
0 Kudos

So I guess one solution would be to write abap code that does not preview the pdf, but rather downloads the pdf with the custom filename in my case, where the requirement is to have a custom filename.

Yes, the only way is to write a program that will download the form for you and set your filename. You cannot configure LCD/ SAP to follow some kind of a mask or file name template at the moment (I believe).

Cheers Otto

Former Member
0 Kudos

Hi Mehmet,

The pdf file attached to the mail carries the form name.

If you are publishing the form using SFP TCODE specify the file name in the doc parameters.

On the form at runtime we cannot modify the filename this has to be done even before pusblishing the form as in above procedure.

I am not sure how to acheive this if its in Web dynpro...but i belive in the web dynpro view where we have the form component, we have option to set the doc parameters.

Cheers,

Sai