如何在SAP的Screen中编写List报表
2016-01-19 · 知道合伙人数码行家
huanglenzhi
知道合伙人数码行家
向TA提问 私信TA
知道合伙人数码行家
采纳数:117538
获赞数:517193
长期从事计算机组装,维护,网络组建及管理。对计算机硬件、操作系统安装、典型网络设备具有详细认知。
向TA提问 私信TA
关注
展开全部
1、相关命令
LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN ].
LEAVE LIST-PROCESSING.
2、使用说明
3、推荐设计思路
设计一个空屏幕,在需要调用list的屏幕的逻辑流中使用CALL SCREEN调用空屏幕。空屏幕的next screen设置为0,不需要PAI,只需要在PBO中设计一个Module,这个module的具体步骤如下:
首先调用LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
为list设置GUI status ;如:设置SPACE 或者为自己定义的.
使用下列语句使空屏幕不输出:
SUPPRESS DIALOG.
or
LEAVE SCREEN.
进行List输出和处理.
4、示例
REPORT demo_leave_to_list_processing .
TABLES sdyn_conn.
DATA: wa_spfli TYPE spfli,
flightdate TYPE sflight-fldate.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100.
CALL SCREEN 500.
SET SCREEN 100.
ENDMODULE.
MODULE call_list_500 OUTPUT.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
SUPPRESS DIALOG.
SELECT carrid connid cityfrom cityto
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = sdyn_conn-carrid.
WRITE: / wa_spfli-carrid, wa_spfli-connid,
wa_spfli-cityfrom, wa_spfli-cityto.
HIDE: wa_spfli-carrid, wa_spfli-connid.
ENDSELECT.
CLEAR: wa_spfli-carrid.
ENDMODULE.
TOP-OF-PAGE.
WRITE text-001 COLOR COL_HEADING.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE sy-lisel COLOR COL_HEADING.
ULINE.
AT LINE-SELECTION.
CHECK not wa_spfli-carrid is initial.
SELECT fldate
FROM sflight
INTO flightdate
WHERE carrid = wa_spfli-carrid AND
connid = wa_spfli-connid.
WRITE / flightdate.
ENDSELECT.
CLEAR: wa_spfli-carrid.
该示例屏幕100只包含一个输入字段(SDYN_CONN-CARRID ),在屏幕100的逻辑流中会调用list处理.屏幕100的逻辑流如下:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE USER_COMMAND_0100.
在屏幕100的PAI的module USER_COMMAND_100 将使用CALL SCREEN调用屏幕500。屏幕500的逻辑流中封装了所有List处理,屏幕500的逻辑流如下:
PROCESS BEFORE OUTPUT.
MODULE CALL_LIST_500.
PROCESS AFTER INPUT.
屏幕500的PBO的module CALL_LIST_500定义了list处理代码。另外由于屏幕500的屏幕流设置为0,该程序从List处理返回时到屏幕100的USER_COMMAND_100的调用CALL SCREEN 500的语句之后.
该程序会在list处理时显示一个明细List,具体代码参见AT LINE-SELECTION、TOP-OF-PAGE 和 TOP-OF-PAGE DURING LINE-SELECTION事件代码.
LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN ].
LEAVE LIST-PROCESSING.
2、使用说明
3、推荐设计思路
设计一个空屏幕,在需要调用list的屏幕的逻辑流中使用CALL SCREEN调用空屏幕。空屏幕的next screen设置为0,不需要PAI,只需要在PBO中设计一个Module,这个module的具体步骤如下:
首先调用LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
为list设置GUI status ;如:设置SPACE 或者为自己定义的.
使用下列语句使空屏幕不输出:
SUPPRESS DIALOG.
or
LEAVE SCREEN.
进行List输出和处理.
4、示例
REPORT demo_leave_to_list_processing .
TABLES sdyn_conn.
DATA: wa_spfli TYPE spfli,
flightdate TYPE sflight-fldate.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100.
CALL SCREEN 500.
SET SCREEN 100.
ENDMODULE.
MODULE call_list_500 OUTPUT.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
SUPPRESS DIALOG.
SELECT carrid connid cityfrom cityto
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = sdyn_conn-carrid.
WRITE: / wa_spfli-carrid, wa_spfli-connid,
wa_spfli-cityfrom, wa_spfli-cityto.
HIDE: wa_spfli-carrid, wa_spfli-connid.
ENDSELECT.
CLEAR: wa_spfli-carrid.
ENDMODULE.
TOP-OF-PAGE.
WRITE text-001 COLOR COL_HEADING.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE sy-lisel COLOR COL_HEADING.
ULINE.
AT LINE-SELECTION.
CHECK not wa_spfli-carrid is initial.
SELECT fldate
FROM sflight
INTO flightdate
WHERE carrid = wa_spfli-carrid AND
connid = wa_spfli-connid.
WRITE / flightdate.
ENDSELECT.
CLEAR: wa_spfli-carrid.
该示例屏幕100只包含一个输入字段(SDYN_CONN-CARRID ),在屏幕100的逻辑流中会调用list处理.屏幕100的逻辑流如下:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE USER_COMMAND_0100.
在屏幕100的PAI的module USER_COMMAND_100 将使用CALL SCREEN调用屏幕500。屏幕500的逻辑流中封装了所有List处理,屏幕500的逻辑流如下:
PROCESS BEFORE OUTPUT.
MODULE CALL_LIST_500.
PROCESS AFTER INPUT.
屏幕500的PBO的module CALL_LIST_500定义了list处理代码。另外由于屏幕500的屏幕流设置为0,该程序从List处理返回时到屏幕100的USER_COMMAND_100的调用CALL SCREEN 500的语句之后.
该程序会在list处理时显示一个明细List,具体代码参见AT LINE-SELECTION、TOP-OF-PAGE 和 TOP-OF-PAGE DURING LINE-SELECTION事件代码.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询