如果可能的话,我需要帮助,因为我被困在一个没有语法错误的地方。我正在使用 abap 将数据从我的数据库表中检索到屏幕 0300 中的表控件。每当我在屏幕 0300 中按直接处理时,我的表控件上都没有任何信息。这就是屏幕 0300 的流程逻辑:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0300.
LOOP at it_customers into WA_customerS WITH CONTROL tc300.
MODULE fill_ctable_control .
ENDLOOP.
PROCESS AFTER INPUT.
LOOP at it_CUSTOMERs .
module read_ctable_control .
ENDLOOP.
MODULE USER_COMMAND_0300.
这就是 PBO / PAI 代码:
module FILL_CTABLE_CONTROL output.
IF it_CUSTOMERS is initIAl.
SELECT * FROM zy2014_42_CUSTOM
INTO CORRESPONDING FIELDS OF TABLE it_CUSTOMERS.
ENDIF.
endmodule. " FILL_CTABLE_CONTROL OUTPUT
*&---------------------------------------------------------------------*
*& Module READ_CTABLE_CONTROL OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module READ_CTABLE_CONTROL intput.
IF sy-stepl = 1.
tc300-lines = tc300-top_line + sy-loopc - 1.
ENDIF.
* move fields from work area to scrren fields
MOVE-CORRESPONDING wa_CUSTOMERs TO zy2014_42_TCCUSTOMERS.
endmodule.
module USER_COMMAND_0300 input.
case ok_code .
when 'BACK'.
LEAVE TO SCREEN 100.
ENDCASE.
SELECT * FROM zy2014_42_CUSTOM
INTO CORRESPONDING FIELDS OF TABLE it_CUSTOMERS.
CLEAR OK_CODE.
endmodule.
考虑到我正在使用 dynpro 程序
提前谢谢大家