‎2010 Sep 21 8:00 AM
Hi,
I had a requirement of replacing the text symbol of standard text with dynamic values.
Text maintained is - PO &PO_NUM& has been approved
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ST'
language = sy-langu
name = 'ZTEST'
object = 'TEXT'
IMPORTING
header = header
TABLES
lines = it_text.
DATA: PO_NUM TYPE char30 VALUE 'TEST1234'.
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = header
TABLES
lines = it_text.
When i am executing the above code in a report , it is working fine ,
but when i had copy the above code inside a function module,
Text symbol is getting replaced with blank value.
So,is there are some limitations of using TEXT_SYMBOL_REPLACE or please suggest if there is some other issue.
Thanks
‎2010 Sep 21 8:49 AM
‎2010 Sep 21 9:35 AM
Its a normal Z Function Module. Even i tried declaring the variables in Global Data also, still its not working
‎2010 Sep 21 9:45 AM
‎2010 Sep 21 9:55 AM
Thanks for the quick reply Sujay and Maen. I tried using below code ,still not working inside function module
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = header
program = sy-repid
ENDLINE = cnt
replace_text = 'X'
TABLES
lines = it_text.
‎2010 Sep 21 8:53 AM
Possibly declare DATA: PO_NUM TYPE char30 VALUE 'TEST1234' in your TOP-include of your functionpool.
‎2010 Sep 21 8:57 AM
Hi,
I checked the FM, it is having the TDLines andetc. When you run this code using the report the system will have the values., but when use it in standard code, then u need to generate some internal tables which will be used by the FM. In general you need to find pre required function modules.
Check this function pool SAPLSTXV.
Regards
Shiva
‎2010 Sep 21 9:44 AM
Hi,
Pass replace_text = 'X' and try. You can provide the start line and end line.
Check the exporting parameter changed
Hope it helps.
Sujay
‎2010 Sep 21 10:00 AM
‎2010 Sep 21 9:59 AM
Hi,
What is the tline-tdformat for the line you are trying to change?
Sujay
‎2011 Jul 21 3:57 PM
Hi,
I see that you marked this as answered, could you please provide the solution, I have the same problem.
Thanks.
Cumps,
Diogo Silva-