Application Development and Automation 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: 
Read only

Mail format from SAP

tony_shen7
Participant
0 Likes
919

Hi all,

I have a requirement from my client: Get mail and attachment file---PO from SAP.

Now, the test is OK. I have received the mail and the file.

But one more issue is: When I receive the mail, I want to show the mail title is "PO NUM" and in the mail body is "NO Replying"

Regards

1 ACCEPTED SOLUTION
Read only

JackGraus
Active Contributor
0 Likes
873

Hi, if you call the default SAP sapscript or smartform function module to send mail then changing the mail content is not possible. The mail subject can be set in the output type configuration by setting the text symbol replace program and form. The subject text itself is also configuration in the mailtitle screen of the output type. Variable texts like &EKKO-EBELN& can be used in here.

Regards Jack

Hi all,

I have a requirement from my client: Get mail and attachment file---PO from SAP.

Now, the test is OK. I have received the mail and the file.

But one more issue is: When I receive the mail, I want to show the mail title is "PO NUM" and in the mail body is "NO Replying"

Regards

6 REPLIES 6
Read only

JackGraus
Active Contributor
0 Likes
874

Hi, if you call the default SAP sapscript or smartform function module to send mail then changing the mail content is not possible. The mail subject can be set in the output type configuration by setting the text symbol replace program and form. The subject text itself is also configuration in the mailtitle screen of the output type. Variable texts like &EKKO-EBELN& can be used in here.

Regards Jack

Read only

0 Likes
873

Hi,

Thank you for your prompt reply.

The mail subject can be set in the output type configuration by setting the text symbol replace program and form

I wanner know how to do it.

Regards

Read only

former_member189779
Active Contributor
0 Likes
873

Are you using standard output configuration?

If yes check SAP Note 191470 and relavent notes.

Also refer http://scn.sap.com/thread/1751485

Hope this helps.

Read only

0 Likes
873

Thankyou!

I do not use standard output config.

I revised the progam and smartforms.

Read only

0 Likes
873

Create standard text in S010 exapmle

Purchase Order &PONO&

Now retrive this text

CALL FUNCTION 'READ_TEXT'

  EXPORTING

   client                        = sy-mandt

    id                            = 'ST'

    language                      = 'E'

    name                          ='ZTEXTCAP1'

    object                        ='TEXT'

IMPORTING

   header                        = ls_docu_head

  TABLES

    lines                         = i_line2

EXCEPTIONS

   id                            = 1

   OTHERS                        = 8

Define global varibale PONO in your program which will have value PONO = "34567889".

CALL FUNCTION 'TEXT_SYMBOL_REPLACE'

  EXPORTING

   endline                = sy-tabix

    header                 = ls_docu_head

    program                = sy-repid

    replace_program = 'X'



   replace_standard       = 'X'

*   replace_text           = 'X'

      startline              = 1

     TABLES

    lines                  = i_line2.

You will get the required text in i_line2

Read only

tony_shen7
Participant
0 Likes
873

Issue Closed.

Thank you!