LEAVE常用的语句:
LEAVE PROGRAM. 退出整个程序
LEAVE TO TRANSACTION ta
LEAVE LIST-PROCESSING. 从list processor回到dialog processor
LEAVE TO LIST-PROCESSING 控制权从dialog processor转交给list processor
LEAVE { SCREEN | {TO SCREEN dynnr} }
LEAVE TO LIST-PROCESSING 是退出其他屏幕后,到List输入的屏幕,例如:WRITE 语句输入的屏幕。
LEAVE LIST-PROCESSING是在其他屏幕退出,到List输入屏幕间的动作。
实例:
IF S_MATNR[] IS INITIAL AND S_WERKS[] IS INITIAL AND
S_BDTER[] IS INITIAL AND S_USNAM[] IS INITIAL AND
S_RSNUM[] IS INITIAL AND S_KOSTL[] IS INITIAL AND
S_AUFNR[] IS INITIAL.
MESSAGE S000(ZMM) WITH ‘取数条件不能全部为空’ DISPLAY LIKE ‘E’.
LEAVE LIST-PROCESSING.
ENDIF.