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: 

Email Title Modification

JMorozowski
Active Participant
0 Kudos

I have created a copy of SAP code and am trying to add static text to an email title.  I don't have much ABAP experience so please bear with me.  I am trying to modify the code below to add a bit of static text before the dynamic elements, but I'm not really sure how to do so.

REPLACE '&' WITH ls_orderadm_h-object_id

    INTO ls_output_options-tdtitle.

I think that is the place, but here is the whole snippet of code in case I am looking in the wrong spot.

* set mail title

  SELECT SINGLE caption INTO ls_output_options-tdtitle

    FROM stxfadmt WHERE

    formname = ip_smart_form AND

    langu    = lv_language.



  IF ls_output_options-tdtitle  IS INITIAL.

    SELECT SINGLE caption INTO ls_output_options-tdtitle

     FROM stxfadmt WHERE

     formname = ip_smart_form.

  ENDIF.



  REPLACE '&' WITH ls_orderadm_h-object_id

    INTO ls_output_options-tdtitle.

Thanks!

1 ACCEPTED SOLUTION

Puneet_Gupta
Contributor
0 Kudos

If  ls_output_options-tdtitle is being passed to the email title, then you

CONCATENATE statictext  ls_output_options-tdtitle INTO  ls_output_options-tdtitle.

Make sure the size of the data after concatenation does not exceed the variable

- Puneet

3 REPLIES 3

Puneet_Gupta
Contributor
0 Kudos

If  ls_output_options-tdtitle is being passed to the email title, then you

CONCATENATE statictext  ls_output_options-tdtitle INTO  ls_output_options-tdtitle.

Make sure the size of the data after concatenation does not exceed the variable

- Puneet

0 Kudos

Puneet,

Thanks! This may be a stupid question, but I'm assuming that CONCATENATE would go after the

INTO ls_output_options-tdtitle that is already there?

Regards,

Jon

0 Kudos

Yes that is correct. I will go after the REPLACE statement that you have.

REPLACE '&' WITH ls_orderadm_h-object_id

    INTO ls_output_options-tdtitle.

CONCATENATE ls_statictext ls_output_options-tdtitle INTO ls_output_options-tdtitle SEPARATED BY SPACE.