on 06-25-2012 7:19 PM
For billing output types configured for External Send (email pdf) we're using "&XVBRK-VBELN&" in the Text for cover page for the condition records communication parameters via VV32 to display the Invoice/Bill Document number in the Email subject line. We'd like to add the Delivery Number (LIKP-VBELN) as well to the subject (if there are multiple delivery numbers, just the first one). Any ideas? The delivery number isn't apart of NAST or XVBRK.
Hi Joseph,
You can try like this.
*&---------------------------------------------------------------------*
*& Subroutine Pool Z_MAIL_TITLE_TEXT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSD_MAIL_TITLE_TEXT.
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.
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.
and in nace try like this.I think it will work.
EN " Sales Order No. &WA_VBELN& "
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can check the following;
In t.code VTFL, at header level, check what value is assigned in the field Reference number. If value C -delivery number is assigned, then I think you can find the value VBRK-XBLNR.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.