Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

READ_TEXT with parameters?

Former Member
1,677

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,166

Use the READ_TEXT function module then loop at the results and use


REPLACE '&VARIABLE&' IN wa_tline-tdline WITH 'Your Text'.

Read only

0 Likes
1,166

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?

Read only

0 Likes
1,166

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

Read only

Former Member
0 Likes
1,166

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

Read only

Former Member
0 Likes
1,166

not possible

Read only

0 Likes
1,166

Yeahhhhh not possible