cancel
Showing results for 
Search instead for 
Did you mean: 

Replace symbols in e-mail subject

former_member211575
Participant
0 Kudos

Hi

How can I create the subject of an e-mail that is send when I crete a delivery that depends of the delivery data?

I want that the subject is ' Delivery (LIKP - VBELN) reference to (VBAK -BSTKD).

Thanks

Dora

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183879
Active Contributor
0 Kudos

Hi,

In your output type,

In NACE, double click on the otuput type and on the left hand side, click the MAIL TITLE and TEXTS. Now on teh right side for lang EN, put the title as Delivery &nast-objky&. This will print the Delivery number. If you want to print the PO number also, this method will nto help, as it is in different table and not in NAST or in LIKP. You may have to code for it. But if you want to print any other field which is in LIKP, you can just say &LIKP-VBELN&, &LIKP-KUNNR&, something like this.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

Check Note 49174 - NAST: VF01 Replacement of symbols does not work and related notes

Regards

Eduardo

former_member211575
Participant
0 Kudos

Hi

My problem is in deliveries (VL0X) and not in the billing documents.

Thanks

Dora

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

As I tell you, if you read related notes you can read note Note 718017 - Replacement of text symbols in spool title/MAIL and Note 213511 - Processing text symbols in mail messages. By analogy with SO (that this notes explains), you can see that in report SAPMV50A you can call the subroutine TEXT_SYMBOL_REPLACE. If you don't have the field that you want to edit in subject, these notes explains you how to enhance (ZZ_TEXT_SYMBOL_REPLACE ). Check Note 699554 - Parameter LIKP-VBELN replaced incorrectly in mail and fax too.

You have this code in report MV50AF0


*&---------------------------------------------------------------------*
*&      Form  mail_texts
*&---------------------------------------------------------------------*
form mail_texts tables it_xtlines structure tline
                using  is_xthead type thead
                       is_nast type nast.
  data:
    lf_vbeln type vbeln_vl.

* get likp for nast in case of multiple xlikp entries
  lf_vbeln = is_nast-objky(10).
  if lf_vbeln ne likp-vbeln.
    read table xlikp with key vbeln = lf_vbeln.
    move-corresponding xlikp to likp.
  endif.

* replace text symbols in mail
  perform text_symbol_replace tables it_xtlines
                               using is_xthead
                                     is_nast.

endform.                    " mail_texts                     ^_n_699554

Regards

Eduardo

Former Member
0 Kudos

It worked for me. Thanks a lot.