‎2008 Dec 05 9:24 AM
Hi there,
I have a problem with the standard FM READ_TEXT of SAP. In the standard text (SO10) I have defined a text that includes variables (for example &BANFN&).
How can I fill this variables? I thought that global variablesin the report/class are used to replace this objects in the standard text with the content of the variable...
How can I implement this? is there any function module??
Thanks a lot
With kind regards
Markus
‎2008 Dec 05 9:26 AM
Use the READ_TEXT function module then loop at the results and use
REPLACE '&VARIABLE&' IN wa_tline-tdline WITH 'Your Text'.
‎2008 Dec 05 9:29 AM
Is there really no function module that can do this automaticly?
And how can I make this if in a standard text an other standard text should appear?
‎2008 Dec 05 9:35 AM
I've always used the above code, but I've done a quick search in SE37 and found the following FMs which might help you:
FB_RC_REPLACE_TMPLTEXT Replaces placeholders with text
REPLACE_TEXTSYMBOL SAPscript: Replace text symbols by value
‎2008 Dec 05 10:37 AM
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = ls_header
program = 'myprogrammname' "sy-cprog
TABLES
lines = pt_lines.
replacing all global defined variables.
same then sapscript replacement logic &myvariable&
Regards
Stefan Seeburger
Edited by: Stefan Seeburger on Dec 5, 2008 11:37 AM
‎2009 Feb 27 3:55 PM
‎2009 Feb 27 4:14 PM