Skip to Content
author's profile photo Former Member
Former Member

E-mail title and replacement of text symbols

Hello,

I'm trying to modify sales order confirmation e-mail title using transaction NACE (V1,Output types). I'm using standard output type for order confirmations (=BA00). E-mail sending is working nicely and I can change the title of the e-mail and use system variables in the title too, but...

On General data -sheet there is a possibility to give a program name and ABAP form routine to replace text symbols . I need to put customer's order number to the e-mail title and I suppose I have to fill in "Replacement of text symbols" -program and form to do the trick.

My problem is that I don't know what the program should look like. =) How do I make a simple program to replace the text symbols in the e-mail title? SAP help says... "Parameters have to be evaluated by a special program with form routine". I couldn't find any information about this "special program" nor the structure of this program.

Any Ideas (any help would be appreciated)?

Kind Regards,

-ilkka

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2005 at 09:02 AM

    Hi

    First create a program ( subroutine pool ) in SE38 with following code .

    <u><b>

    REPORT ZTEST.

    DATA WA_VBELN LIKE VBAK-VBELN.

    DATA: CHANGED,

    CURRENTPROGRAM LIKE SY-REPID.

    DATA: X_NEW_CURSOR_COLUMN LIKE SY-TABIX,

    X_NEW_CURSOR_LINE LIKE SY-TABIX.

    FORM TEXT_SYMBOL_REPLACE TABLES XTLINES STRUCTURE TLINE

    USING XTHEAD STRUCTURE THEAD

    SNAST STRUCTURE NAST.

    • This routine is set in customizing in output type.

    • It dynamically replaces the text symbols mainatianed in output type

    • mail title

    DESCRIBE TABLE XTLINES LINES SY-TABIX.

    IF SY-TABIX EQ 0 AND NOT XTHEAD IS INITIAL.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    ID = XTHEAD-TDID

    LANGUAGE = XTHEAD-TDSPRAS

    NAME = XTHEAD-TDNAME

    OBJECT = XTHEAD-TDOBJECT

    • IMPORTING

    • HEADER =

    TABLES

    LINES = XTLINES

    EXCEPTIONS

    ID = 01

    NOT_FOUND = 04

    OBJECT = 05

    • SAVEMODE = 06

    LANGUAGE = 02

    NAME = 03.

    ENDIF.

    DESCRIBE TABLE XTLINES LINES SY-TABIX.

    CHECK SY-TABIX GT 0.

    CURRENTPROGRAM = SY-REPID.

    WA_VBELN = SNAST-OBJKY .

    CALL FUNCTION 'TEXT_SYMBOL_REPLACE'

    EXPORTING

    ENDLINE = SY-TABIX

    HEADER = XTHEAD

    • INIT = 'X'

    • OPTION_DIALOG = E04

    PROGRAM = CURRENTPROGRAM

    • REPLACE_PROGRAM = E06

    • REPLACE_STANDARD = 'X'

    • REPLACE_SYSTEM = 'X'

    • REPLACE_TEXT = 'X'

    • STARTLINE = E10

    IMPORTING

    CHANGED = CHANGED

    • NEWHEADER =

    TABLES

    LINES = XTLINES.

    CALL FUNCTION 'FORMAT_TEXTLINES'

    • EXPORTING

    • CURSOR_COLUMN = E01

    • CURSOR_LINE = E02

    • ENDLINE = E03

    • FORMATWIDTH = E04

    • LINEWIDTH = E05

    • STARTLINE = E06

    IMPORTING

    NEW_CURSOR_COLUMN = X_NEW_CURSOR_COLUMN

    NEW_CURSOR_LINE = X_NEW_CURSOR_LINE

    TABLES

    LINES = XTLINES.

    ENDFORM. " TEXT_SYMBOL_REPLACE</b></u>

    Then in NACE select the output type and click on Details ( Cntrl + Shift + F2 ) on application tool bar. In this screen ( In the block "replacement of text symbols) add the program & subroutine created above . Save it . Next goto Mail Title & Texts . In the title Put something like "<b>Sales Order No. &WA_VBELN&</b> " and save. This will be replaced at runtime by the actual sales order number.

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.