SAP找底表,我相信这是每一个顾问的必修课,F1是我们常用的方法, 然而F1在很多时候呢,找到的却是结构 。
于是乎,我们就开始寻求各种帮助,或者问度娘、或者问其他朋友。
到底有没有一种方法方法能找到所有的底表呢, 答案是没有 。
否则的话,也不会有个外国顾问总结了一套18种找表的方法,
Technique #1: Check the Technical Information Screen
技巧一:检查技术信息屏幕
I always start my search for the underlying data object by getting the names
of the field and Data
Dictionary object from the transaction screen. Call up the Technical
Information screen by positioning
your cursor in the target screen field and then pressing F1 or clicking on
the ? button. This will bring up
the initial Help screen. From within the Help screen, press F9 or click on
the Technical info button.
我通常从事务屏幕中开始搜寻潜在数据对象——如字段和数据字典对象的名字。如果想调出技术信
息屏幕,首先将光标定位在目标屏幕字段上,然后按 F1 或者点击 按钮图标,这将打开初始帮助屏
幕,在这个帮助屏幕中,按 F9 或者点击 技术信息 按钮
Figure 1 The Release 4.0B Technical Information Screen for the “Sold-to party”
Field
图 1 在发行版 4.0B 中关于“售达方”字段的技术信息屏幕
Take a look now at Figure 1 . It shows the Technical Information screen for
the Sold-to party field in the
Create Standard (Sales) Order screen for Release 4.0B. You see in the “Field
data” block that the Table
name is KUAGV and the Field name is KUNNR 1 . In Releases 4.0B and below,
this screen calls the
associated object a “table”, whether it’s a table, view, or structure. Notice
in Figure 2 that the 4.5B release
(and above) informs you that KUAGV is actually a structure.
现在看一下 图一 ,它显示了在发行版 4.0B 中,创建标准(销售)订单屏幕的 售达方 字段的技术信息
第 4 页 共 27 页 屏幕。你可以看到,在“字段数据”块中, 表名称 是 KUAGV 、 字段名称 是 KUNNR 注 1
。在发行版 4.0B
和以前的版本中,这个屏幕把相关对象都称为“表”,而不管它是个表、视图还是结构。注意 图二
中,在 4.5B (及以后版本)中,提示你 KUAGV 实际上是个结构(译注:在我们用的 ECC5 版中没有
区分, SAP 又退化了,直到双击查看对象时才显示出来它是表、结构还是视图)。
Figure 2 The Release 4.5B Technical Information Screen for the “Sold-to party”
Field
图二 在发行版 4.5B 中关于“售达方”字段的技术信息屏幕
1 The examples herein mention names of tables, structures, and fields that I
found in my searches. You may find a different name
in the same search — particularly a different structure’s name. For example,
the Sold-to party field in the Sales Order initial
screen may be KUAGV-KUNNR or RV45S-KUNNR (or maybe something else). I’ll show
one name in this article; don’t worry
if you find another. It’s a reflection of the continual enhancement of R/3,
not (I hope) an error in the article.
注 1 这里的例子提及了在我的研究中找到的表、结构和字段的名字。你可能在相同的研究中发现一个不同的名字——尤
其是不同的结构名称。例如,在销售订单初始屏幕中 售达方 字段可能是 KUAGV-KUNNR 或者 RV45S-KUNNR (还可能是
其他名字)。我在文章中只写其中一个,但是如果你发现了另外的名字也不必担心。它是 R/3 系统持续改进的一个反映,
并不是(至少我希望不是)文档中的错误。
In Releases 4.0B and below, to ascertain whether or not an object is a
structure you must take one more
step. Drill into the Table name field in the Technical Information screen to
see the Data Dictionary screen
for the object.
在发行版 4.0B 和以前的版本中,为了确定一个对象是否是一个结构,你必须多经过几步。深入技术
信息屏幕的 表名 字段,到数据字典屏幕查看对象(译注: ECC5 也是这样)。
Figure 3 The Release 4.0B Data Dictionary Screens for Table “VBAK,” View
“VIVEDA,” and
Structure “KUAGV”
图三 发行版 4.0B 中数据字典屏幕显示的表“ VBAK ”,视图“ VIVEDA ”和结构“ KUAGV ”
Figure 3 shows those screens for the table VBAK, the view VIVEDA, and the
structure KUAGV.
Corresponding screens in Releases 4.5 and 4.6 look very similar. As you can
see, the object type is easy to
recognize in these screens.
图三显示了表 VBAK 、视图 VIVEDA 、结构 KUAGV 的屏幕,在发行版 4.5 和 4.6 中,相应的屏幕也非
常类似。就像你看到的,对象类型在这些屏幕中非常容易辨认。
If the underlying object is a table, you’re home free. The information is
stored in that table in the field
with the same name as the one shown on the Technical Information screen.
Success! When you write your
report or ABAP Query, or when you program your enhancement, you can refer to
the data using these
table and field names.
如果潜在对象是一个表,你就相当轻松了。存储在那个表的字段的信息跟在技术信息屏幕中显示的
名字完全相同。成功!当你写报表、 ABAP 查询或者增强功能程序的时候,你可以直接使用这些表
和字段名来获取数据。
If the object is a view, then scroll to the View field in the view with the
same name as the one shown in
the Technical Information screen. See Figure 4 ; the Table and Field name
associated with the View field
is your goal. Success again!
如果对象是一个视图,在字段信息列表中找到与技术信息屏幕显示相同名字的 视图字段 。看图四,
与 视图字段 关联的 表 和 字段名 就是你的目标。又成功了!
Figure 4 Locating the “Table” and “Field name” Associated with the “View
field”
图四 定位与“视图字段”关联的“表”和“字段名”
If the object is a structure, then you have more digging to do, and you must
proceed to one or more of the
remaining 17 techniques described here. These techniques follow an order that
should get you to the finish
line in the fewest number of steps. Remember, as soon as you find the
associated table, you’re done with
the search. Look at the flowchart in Figure 5 to see my suggested sequence of
techniques.
如果对象是个结构,你还有许多挖掘工作要做,你必须执行下面描述的 17 个技巧中的一个或多个,
这些技巧的排列顺序有助于你以最少的步骤到达重点。记住,当你发现关联表的时候就完成了查找。
打开图五中画的流程图,看看我对这些技巧使用顺序的建议。
Racing Toward the Finish Line: Techniques 2-13
向终点冲刺:技巧 2-13
Remember, the finish line, or goal, of this exercise is to locate the table
and field names in which the
underlying data for a screen field is stored. At this point, we know only that
the underlying data object is a
structure. Techniques 2-13, which I detail in this section, will most likely
hold the answer. If techniques
2-13 do not hold the answer, try techniques 14-18 — the measures of last
resort! I suggest you hold off
trying these last five tactics until you’ve exhausted the other possibilities.
If none of these 18 techniques
work, you have an unusually difficult problem; I wish you good luck. I hope
you find your table quickly
and easily.
记住,本练习的终点或者说目标,是定位屏幕字段中对应的存储了潜在数据的表和字段名。从这一
点来说,我们只知道潜在数据对象是一个结构。我在这一节中详细描述的技巧 2 至 13 ,很可能包含
了答案。如果技巧 2 至 13 仍未找到结果,尝试技巧 14 至 18 ——这是最后的手段了!我建议你在完全
排除了其他可能性之后再去尝试这五种策略。如果这 18 种技巧都不奏效,你就是遇到了一个不同寻
常的困难问题,我只能祝你好运。我希望你快速而轻松的找到你的表。
Technique #2: Text Fields
技巧二:文本字段
Figure 6 Click the “Maintain long text” Icon to Get to the Long Text Screen
图六 点击“维护长文本”按钮到达长文本屏幕
If the screen label is “Short text”, or the field name is STTXT, or its data
element is CO_STTXT, then you
are looking for the source of a text field. As Figure 6 shows, the Short
text field often has a “Maintain
long text” icon stuck at the end that may look like a sheet of paper with a
pencil. Click on that icon to get
to the Long text screen.
如果屏幕标签是“短文本”,或者字段名是 STTXT ,或者它的数据元素是 CO_STTXT ,你就按 图六
所示去找文本字段的源头,短文本字段的后面通常紧接着一个“维护长文本”按钮,看上去象一张
纸和一支笔,点击这个按钮打开长文本屏幕。
Texts are stored all over the place in R/3, but frequently in tables STXH and
STXL, which are the text
header and text line, respectively. Their texts are stored in raw (i.e., non-
ASCII) form, so you must use
function modules to get them. There are several function modules for
processing these texts, including
Read_Text, which reads text lines from the database. In the Long text screen,
follow GoTo → Header
(see Figure 7 ) to get the Text name , Text ID , and Text object
parameters that you’ll need to execute the
function module.
在 R/3 中文本存在各种地方,但是通常是表 STXH 和 STXL 中,分别是文本标题和文本行。它们的文
本都以 raw (例如,非 ASCII 码)形态存储,所以你必须使用函数模块来取得它们。有几个函数模块
来处理这些文本,包括 Read_Text ,从数据库读文本行。在长文本屏幕,通过 转到 → 表头 (看图七)
来访问你在执行函数模块时需要的 文本名称 , 文本 ID 和 文本对象 参数。
Figure 7 Retrieving the Text Name, Text ID, and Text Object Parameters
图七 获得文本名称,文本 ID 和文本对象参数
If the field is not a text field, then you must continue to search.
如果这个字段不是一个文本字段,你必须继续查找。
Technique #3: “INCLUDE” Table
技巧三:“ INCLUDE ”表
A structure may contain one or more INCLUDEs. An INCLUDE may actually b
...