DATA: lt_syms TYPE TABLE OF itcst,
ekko TYPE ekko.
CALL FUNCTION 'ME_EKKO_SINGLE_READ'
EXPORTING
pi_ebeln = CONV ebeln( is_nast-objky ) " Purchasing Document Number
IMPORTING
po_ekko = ekko " Purchasing Document Header
EXCEPTIONS
no_records_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
RETURN.
ENDIF.
CHECK sy-subrc EQ 0.
SELECT SINGLE name1 FROM adrc AS a
INNER JOIN t001 AS t
ON t~adrnr = a~addrnumber
AND t~bukrs = @ekko-bukrs
INTO @DATA(x_t001_name1).
CALL FUNCTION 'INIT_TEXTSYMBOL'.
CALL FUNCTION 'TEXT_SYMBOL_COLLECT'
TABLES
lines = lt_tlines " Text lines
symbols = lt_syms. " Symbols found
LOOP AT lt_syms INTO DATA(ls_symb).
ASSIGN (ls_symb-name) TO FIELD-SYMBOL(<fs_textsym>).
DATA(lv_textsym) = |&{ ls_symb-name }&|.
IF <fs_textsym> IS ASSIGNED.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = lv_textsym " Symbol name
value = <fs_textsym>. " Symbol value
ENDIF.
ENDLOOP.
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = ls_thead
TABLES
lines = lt_tlines.
CALL FUNCTION 'FORMAT_TEXTLINES'
EXPORTING
formatwidth = 128
TABLES
lines = lt_tlines
EXCEPTIONS
bound_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |