本文介绍了如何在SapScript或SmartForm中查找标准文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要跟踪在大量自定义文字和smartforms中使用特定标准文本(SO10)的位置.
I need to track down where within a large number of custom sapscripts and smartforms a specific standard text (SO10) is being used.
除了检查每个打印脚本的代码"等效之外,我还没有在线找到可行的解决方案.有什么建议吗?
Apart from the equivalent of "check the code for each print script", I've not found a workable solution online. Any suggestions?
推荐答案
发布后,我找到了部分解决方案.下面的代码将在文字描述中搜索标准文本,而不是smartforms.
After posting, I found a partial solution. The code below will search for a standard text within sapscripts, but not smartforms.
PARAMETERS: p_sttxt LIKE stxh-tdname.
DATA: BEGIN OF t_stxh OCCURS 0,
tdname LIKE stxh-tdname,
tdspras LIKE stxh-tdspras,
END OF t_stxh.
DATA t_lines LIKE tline OCCURS 0 WITH HEADER LINE.
SELECT tdname tdspras FROM stxh INTO TABLE t_stxh
WHERE tdobject = 'FORM'
AND tdid = 'TXT'
AND tdspras = 'E'.
LOOP AT t_stxh.
REFRESH t_lines.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = 'TXT'
language = t_stxh-tdspras
name = t_stxh-tdname
object = 'FORM'
TABLES
lines = t_lines
EXCEPTIONS
id = 0
language = 0
name = 0
not_found = 0
object = 0
reference_check = 0
wrong_access_to_archive = 0
OTHERS = 0 .
SEARCH t_lines FOR p_sttxt.
IF sy-subrc EQ 0.
WRITE:/ t_stxh-tdname, t_stxh-tdspras.
ENDIF.
ENDLOOP.
这是此处的代码(固定)版本: http://scn.sap.com/thread/179142
This is a (fixed) version of the code found here: http://scn.sap.com/thread/179142
这篇关于如何在SapScript或SmartForm中查找标准文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!