【】SUPPRESS DIALOG
若在PBO里面出现,则当前dynpro被执行,但不显示SCREEN。
【】TABLE CONTROL (自动)
PBO:
LOOP AT SP1 WITH CONTROL TBL2 CURSOR TBL2-CURRENT_LINE. "TBL2是TC,SP1是显示内表
ENDLOOP.
PAI:
LOOP AT SP1. "当有数据改变时,更新内表
CHAIN.
FIELD SP1-CARRID.
... ...
MODULE TBL2_MODIFY ON CHAIN-REQUEST.
ENDCHAIN.
MODULE TBL2_MODIFY INPUT.
MODIFY SP1 INDEX TBL2_CURRENT_LINE.
ENDMODULE.
【】TABLE CONTROL (手动)
PBO:
LOOP WITH CONTROL TBL.
MODULE FILLTBL. (READ TABLE SP2 INTO SP1 INDEX TBL-CURRENT_LINE)
ENDLOOP.
PAI:
LOOP WITH CONTROL TBL.
MODULE READTBL. (MODIFY SP2 FROM SP1 INDEX TBL-CURRENT_LINE)
ENDLOOP.
【】生成维护程序 T-CODE: SE55
【】从程序调用生成的维护窗口
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
ACTION = 'U'
VIEW_NAME = '表名'
EXCEPTIONS
POREIGN_LOCK = 2
NO_TVDIR_ENTRY = 8.
【】TC取得行号
GET CURSOR LINE LINEA.
CHECK SY-SUBRC = 0.
LINEA = TBL-TOP_LINE + LINEA - 1.
READ TABLE WA_SPFLI INDEX LINEA.
【】更改TC表格的读写属性
WHEN ''.
LOOP AT TBL-COLS INTO ACOL WHERE INDEX GT 0.
IF SY-TABIX = 1.
ACOL-SCREEN-INPUT = 0.
ELSE.
IF ACOL-SCREEN-INPUT = 0.
ACOL-SCREEN-INPUT = 1.
ELSEIF ACOL-SCREEN-INPUT = 1.
ACOL-SCREEN-INPUT = 0.
ENDIF.
MODIFY TBL-COLS FROM ACOL INDEX SY-TABIX.
ENDLOOP.
【】ALV
DATA: WA_CONTAINER TYPE SCRFNAME VALUE 'ALVDATA',
ALV_GRID TYPE REF TO CL_GUI_ALV_GRID.
WA_CUSTOM_CONTAINIER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
PBO:
IF WA_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT WA_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = WA_CONTAINER.
CREATE OBJECT ALV_GRID
EXPORTING I_PARENT = WA_CUSTOM_CONTAINER.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING I_STRUCTURE_NAME = 'SPFLI'
CHANGING IT_OUTTAB = WA_SPFLI.
ENDIF.
"定义事件
CLASS LCV_EVENT_RECEIVER DEFINITION DEFERRED.
DATA: EVENT_RECEIVER TYPE REF TO LCL_EVENT_RECEIVER.
【】ALV TREE
【】SMARTFORM
DATA FM_NAMR TYPE RS381_FNAME.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = 'ZSMARTFORM'
IMPORTING FM_NAME = FM_NAME
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION FM_NAME
EXCEPTIONS FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5 .
【】图片上传T-CODE: SE78
"STORE ON DOCUMENT SERVER " -> "GRAPHICS GENERAL GRAPHICS" -> "BMAP GRID SCREENS"