*****************************************************************
*
* Program : ysearchl
* Purpose : Searches all Y and Z layout sets for a given string
*
*****************************************************************
REPORT ysearchl.
TABLES: stxl.
PARAMETERS: string(128).
DATA: BEGIN OF tlinetab OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF tlinetab,
subrc LIKE sy-subrc.
SELECT tdname
FROM stxl
INTO (stxl-tdname)
WHERE tdobject = 'FORM'
AND ( tdname LIKE 'Y%' OR tdname LIKE 'Z%' )
AND tdid = 'TXT'.
PERFORM display_status_text USING stxl-tdname.
REFRESH tlinetab.
PERFORM get_text_table TABLES tlinetab
USING 'FORM'
'TXT'
stxl-tdname
CHANGING subrc.
LOOP AT tlinetab.
IF tlinetab-tdline CS string.
WRITE : / stxl-tdname, tlinetab-tdline.
ENDIF.
ENDLOOP.
ENDSELECT.
* Display a message on the status bar
FORM display_status_text USING value(text) TYPE c.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = text.
ENDFORM. "DISPLAY_STATUS_TEXT
*
* Get the long texts for the object
*
FORM get_text_table TABLES tlinetab
USING value(tdobject) LIKE thead-tdobject
value(id) LIKE thead-tdid
value(tdname) LIKE thead-tdname
CHANGING subrc LIKE sy-subrc.
DATA: BEGIN OF xthead OCCURS 0.
INCLUDE STRUCTURE thead.
DATA: END OF xthead.
DATA: eintraege LIKE sy-tfill.
DATA xtdname LIKE thead-tdname.
REFRESH xthead.
CLEAR xtdname.
xtdname = tdname.
CALL FUNCTION 'SELECT_TEXT'
EXPORTING
id = id
language = sy-langu
name = tdname
object = tdobject
IMPORTING
entries = eintraege
TABLES
selections = xthead.
REFRESH tlinetab.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = id
language = sy-langu
name = tdname
object = tdobject
IMPORTING
header = xthead
TABLES
lines = tlinetab
EXCEPTIONS
id = 01
language = 02
name = 03
not_found = 04
object = 05
reference_check = 06.
subrc = sy-subrc.
ENDFORM. " FILL_ITEM_TEXT
*
* Program : ysearchl
* Purpose : Searches all Y and Z layout sets for a given string
*
*****************************************************************
REPORT ysearchl.
TABLES: stxl.
PARAMETERS: string(128).
DATA: BEGIN OF tlinetab OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF tlinetab,
subrc LIKE sy-subrc.
SELECT tdname
FROM stxl
INTO (stxl-tdname)
WHERE tdobject = 'FORM'
AND ( tdname LIKE 'Y%' OR tdname LIKE 'Z%' )
AND tdid = 'TXT'.
PERFORM display_status_text USING stxl-tdname.
REFRESH tlinetab.
PERFORM get_text_table TABLES tlinetab
USING 'FORM'
'TXT'
stxl-tdname
CHANGING subrc.
LOOP AT tlinetab.
IF tlinetab-tdline CS string.
WRITE : / stxl-tdname, tlinetab-tdline.
ENDIF.
ENDLOOP.
ENDSELECT.
* Display a message on the status bar
FORM display_status_text USING value(text) TYPE c.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = text.
ENDFORM. "DISPLAY_STATUS_TEXT
*
* Get the long texts for the object
*
FORM get_text_table TABLES tlinetab
USING value(tdobject) LIKE thead-tdobject
value(id) LIKE thead-tdid
value(tdname) LIKE thead-tdname
CHANGING subrc LIKE sy-subrc.
DATA: BEGIN OF xthead OCCURS 0.
INCLUDE STRUCTURE thead.
DATA: END OF xthead.
DATA: eintraege LIKE sy-tfill.
DATA xtdname LIKE thead-tdname.
REFRESH xthead.
CLEAR xtdname.
xtdname = tdname.
CALL FUNCTION 'SELECT_TEXT'
EXPORTING
id = id
language = sy-langu
name = tdname
object = tdobject
IMPORTING
entries = eintraege
TABLES
selections = xthead.
REFRESH tlinetab.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = id
language = sy-langu
name = tdname
object = tdobject
IMPORTING
header = xthead
TABLES
lines = tlinetab
EXCEPTIONS
id = 01
language = 02
name = 03
not_found = 04
object = 05
reference_check = 06.
subrc = sy-subrc.
ENDFORM. " FILL_ITEM_TEXT
No comments:
Post a Comment