Mailtext (SAPscript) enrichment with program variables
I have a SAPscript text, which contains an email text, I have to send via bcs-classes. Email sending is working fine, but now I am supposed to translate some program variables within the SAPscript text.
I think "program symbols" and the FM text_symbol_replace are the right way, but which attributes such a program variable has to have to be determined?
I have to say, that my mail is sent by a method, not by a report (so, no "global" fields are available).
Eitan Rosenberg replied
DATA: st_options TYPE itcpo.
st_options-TDGETOTF = abap_true .
CALL FUNCTION 'PRINT_TEXT'
OPTIONS = st_options
dialog = abap_false
header = st_thead
lines = it_lines