on 05-30-2007 2:38 PM
Hello Experts,
Is there a way to search for a string in all Z SAP scripts, like ABAP source scan?
Regards,
Hari.
I use this ABAP:
REPORT ybc_so10_such LINE-SIZE 250.
REY/TK: 21.12.2004
*----
Programmbeschreibung:
Das Programm sucht in den angegebenen Textbausteinen (TEXT)
oder SAP-Script Formularen (FORM) nach dem zu suchenen Text.
*----
TABLES: stxh,rssce.
SELECT-OPTIONS:
s-name FOR stxh-tdname,
s-id FOR stxh-tdid DEFAULT 'ST',
s-langu FOR stxh-tdspras.
PARAMETERS: pobjid LIKE stxh-tdobject DEFAULT 'TEXT'.
PARAMETERS: ftext(30).
DATA: BEGIN OF istxh OCCURS 100,
tdobject LIKE stxh-tdobject,
tdid LIKE stxh-tdid,
tdname LIKE stxh-tdname,
tdspras LIKE stxh-tdspras,
END OF istxh.
DATA: lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA: BEGIN OF istxh_line OCCURS 100,
tdobject LIKE stxh-tdobject,
tdid LIKE stxh-tdid,
tdname LIKE stxh-tdname,
tdspras LIKE stxh-tdspras,
tdline LIKE tline,
END OF istxh_line.
DATA: stext LIKE tline-tdline.
DATA: zskip(1).
SELECT * FROM stxh INTO CORRESPONDING FIELDS OF TABLE istxh
WHERE tdobject = pobjid
AND tdid IN s-id
AND tdspras IN s-langu
AND tdname IN s-name.
SORT istxh BY tdobject tdid tdname tdspras.
LOOP AT istxh.
AT NEW tdspras.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = istxh-tdid
language = istxh-tdspras
name = istxh-tdname
object = istxh-tdobject
TABLES
lines = lines.
LOOP AT lines.
CLEAR istxh_line.
MOVE-CORRESPONDING istxh TO istxh_line.
MOVE-CORRESPONDING lines TO istxh_line-tdline.
APPEND istxh_line.
ENDLOOP.
ENDAT.
ENDLOOP.
LOOP AT istxh_line.
AT NEW tdname.
IF NOT zskip IS INITIAL.
SKIP 1.
CLEAR zskip.
ENDIF.
ENDAT.
stext = istxh_line-tdline-tdline.
TRANSLATE stext TO UPPER CASE. "#EC TRANSLANG
SEARCH stext FOR ftext.
IF sy-subrc = 0
OR ftext IS INITIAL.
WRITE:/ istxh_line-tdid,
istxh_line-tdobject,
istxh_line-tdspras,
istxh_line-tdname(20),
istxh_line-tdline-tdformat,
istxh_line-tdline-tdline.
HIDE istxh_line.
zskip = 'X'.
ENDIF.
ENDLOOP.
AT LINE-SELECTION.
rssce-tdobject = istxh_line-tdobject.
rssce-tdname = istxh_line-tdname.
rssce-tdid = istxh_line-tdid.
rssce-tdspras = istxh_line-tdspras.
SET PARAMETER ID 'TXT' FIELD rssce.
CALL TRANSACTION 'SO10' AND SKIP FIRST SCREEN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Created a custom tool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.