‎2006 Feb 08 11:02 AM
Gurus,
Is there any method to find out Hard coded TEXT in an abap Program? For Example
*************************************
write:/ TEXT-T01,
'Hello World',TEXT-T02.
*************************************
In which i need to find out Hello world which is inside ''. I am not able to find with Search command.
Can you Please guide me,
Regards,
Lijo Joseph
Message was edited by: Lijo Joseph vazhappilly
‎2006 Feb 08 11:17 AM
Hi,
Just enter into the Program through Transaction Code SE38 and choose Goto->Text Elements->Text Symbols.
I hope this might help you to find out the Word assigned to a text symbol.
Regards,
Anbu
‎2006 Feb 08 11:23 AM
Anbalagan,
I need to find out Text literals (Hard coded Texts)through program not manually.
Regards,
Lijo Joseph
‎2006 Feb 08 11:37 AM
HI,
I think u can do that by parsing the whole pogram on the required criteria..and find out the literals..
Regards,
Sudheer..
‎2006 Feb 08 11:28 AM
Hi,
Double click on the Text element. It will take U
to the TEXT associated with it.
Regards,
GSR.
‎2006 Feb 08 11:30 AM
try ctrl-f and type the search key in that. but this wont work if the required words are in the text element.
‎2006 Feb 08 11:33 AM
check out this program
RPR_ABAP_SOURCE_SCAN which will help you to implement this search programatically
Regards
Raja
‎2006 Feb 08 11:39 AM
Raja,
Program RPR_ABAP_SOURCE_SCAN is giving the line number. But what i need is the exact position including the column number. Is that possible?
Thanks&Regards,
Lijo Joseph
‎2006 Feb 08 11:52 AM
try this.
data: report_pg type SY-REPID ,
rpt_source type standard table of D022S .
REFRESH rpt_source .
move: <rpt name> to report_pg .
READ REPORT report_pg INTO rpt_source .
now do a search/find in rpt_source.
Regards
Raja
‎2006 Feb 08 12:06 PM
HI,
Use the standard program : RSRSCAN1 for searching the string in any ABAP programs.
If you want to search hard coded text in custome programs,Then enter Z* in the program parameter and enter the hard coded string in "Find string parameter".
Hope this will be helpful.
‎2006 Feb 08 12:12 PM
Go to SE38 in menu Utilities -> Find in source code or Use program SAPLS_SEARCH.
‎2006 Feb 08 12:41 PM
Just do "Program>Check>Extended Program Check". Check all the boxes and execute. It will tell you all those literals which are hardcoded like this with a warning saying that they may not be translated. You don't need to do anything else.
‎2006 Feb 08 12:49 PM
‎2015 Nov 23 11:53 AM
REPORT zrtext.
TABLES :rs38m,textpool.
DATA : BEGIN OF i_tab OCCURS 0,
name TYPE progname.
INCLUDE STRUCTURE textpool.
DATA : END OF i_tab.
DATA : texts LIKE textpool OCCURS 50 WITH HEADER LINE,
w_text LIKE textpool.
DATA : it LIKE LINE OF i_tab OCCURS 0,
lines TYPE i,
myalv TYPE REF TO cl_salv_table,
myfunctions TYPE REF TO cl_salv_functions_list,
mycolumns TYPE REF TO cl_salv_columns_table.
SELECTION-SCREEN : BEGIN OF BLOCK b WITH FRAME TITLE text-001.
SELECT-OPTIONS : zprg FOR rs38m-programm.
SELECTION-SCREEN : END OF BLOCK b.
START-OF-SELECTION.
SELECT progname FROM reposrc INTO i_tab-name WHERE progname IN zprg.
READ TEXTPOOL i_tab-name INTO texts LANGUAGE 'E'.
LOOP AT texts INTO w_text . "WHERE id EQ 'I'.
MOVE-CORRESPONDING w_text TO i_tab.
APPEND i_tab TO i_tab.
ENDLOOP.
ENDSELECT.
it[] = i_tab[].
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = myalv
CHANGING
t_table = it[].
CATCH cx_salv_msg.
ENDTRY.
DESCRIBE TABLE i_tab LINES lines.
MESSAGE s375(po) WITH lines '' 'records found..'.
mycolumns = myalv->get_columns( ).
mycolumns->set_optimize( ).
myfunctions = myalv->get_functions( ).
myfunctions->set_all( ).
CALL METHOD myalv->display.
This code will show you all the Text Symbols & Report Title & Selection Text of the reports..
Give Reward and like if ans is usefull
‎2015 Nov 23 1:21 PM
Hi,
Please execute the SLIN T-code for your program and check(tick) the parameter 'Character Strings' and execute. You will be able to find all the Hard-coded values under the 'Messages' Column of the row Character strings.