cancel
Showing results for 
Search instead for 
Did you mean: 

Variable subject for SmartForms email

Former Member
0 Kudos

Hi All,

At my clients SAP system (ECC 5.0), we are using SmartForms for the output of documents.

In this case I am talking about invoices.

Customzing is setup to use standard SAP program RLB_INVOICE and an invoice smartform which is copy of SAP invoice, but then adjusted for my clients needs. This works perfect for quite some time now.

Since recently email was setup so these invoices can be mailed directly to the customers, but we face the problem that when invoices are sent via email, the subject is always the same.

This makes sence because it is set in the output type (mail title and texts), But we would like to make this a variable text, e.g. Invoice_1234567890 (where 1234567890 is the SAP invoice number)

Has anyone experience in doing this?

- Is there a way to insert a variable in the subject of the email?

- Which veriables can be chosen?

- Is there a user-exit to overrule the Standard SAP behaviour (I could not find it)

Of couse a Z program can be created to convert the OTF to PDF and sent your own created email, but I would really like to keep using the standard SAP program.

Thanks very much.

Kind regards,

Dave Verkoelen

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Naimesh and Michael,

Thanks for your reply but both are not an option.

Naimesh, updating the parameter from the Smartform or badi BADI_INV_PRTDATA is not allowed / SAP ignores this. That's why your field symbol does not make a difference (and TDCOVTITLE is not the correct field anyway)

Michael, TDTITLE is indeed the correct field, but I don't want to create a Z program for this.

As I did not get any other options, I will raise a SAP error for missing functionality.

If SAP offeres a solution, I will insert it in here.

Thanks for your time.

Kind regards,

Dave

Former Member
0 Kudos

Hi Dave,

try to populate field TDTITLE which is contained in exporting structure OUTPUT_OPTIONS when calling Your smartform function module.

Best regards,

Michael

naimesh_patel
Active Contributor
0 Kudos

I think OUTPUT_OPTIONS-TDCOVTITLE generate a subject in the Email.

I have tried to update that field using field symbols in the Smartform but, I was not successful.


* Modifying in Smartform Main program
field-symbols: <fs> type SSFCOMPOP.
assign ('(SAPLSTXBC)SSFPO') to <fs>.
<fs>-TDCOVTITLE = 'test Title from Smartform'.

* Modifying in FM's parameter
field-symbols: <fs1> type SSFCOMPOP.
assign ('(/1BCDWB/SAPLSF00000166)OUTPUT_OPTIONS') to <fs1>.
<fs1>-TDCOVTITLE = 'test Title from Smartform'.

So, I think you need to copy the RLB_INVOICE to Z and than change the title.

Regards,

Naimesh Patel