ABAP的PAI和PBO中的字段传递顺序

来源:互联网 发布:泰坦尼克号阴谋 知乎 编辑:程序博客网 时间:2024/05/21 06:24

最近做了一个题,涉及PAI和PBO中字段传递的顺序,根据题目总结一下。

题目是:

In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT a true statement?
A: Fields in PBO are transported directly from PAI.
B: Fields with identical names are transported to the ABAP side.
C: Fields not defined in FIELD statements are transported first.
D: Fields that are defined in FIELD statements are transported when their corresponding module is called.


教材《BC410_EN_Col63.pdf》第200页写到:

In the PAI processing block, all screen fields that do not belong to a table control and that are not listed in a FIELD statement are transported back to the work
fields in the ABAP program first.

意思就是在屏幕字段中,“既不属于Field指定的字段,又不属于Table Control中的字段  的其他字段,才会在处理PAI其他的事件块之前被传递”。C选项逻辑不严谨,所以错误。

A C D都正确,即同名的变量直接传递,指定FIELD的字段,只有相应的module被调用时才会传递,这里需要注意,指定field的只对相应的module可见,对其他module不可见,参考连接https://help.sap.com/abapdocu_731/en/abendynpro_field_abexa.htm。

其他相关连接:

Data transport at point of time PAI

(上面这个链接里,并没有提到字段传递的先后顺序。)

FIELD 

0 0