ผลลัพธ์ Click ที่ ZLOGON2 ก็จะไปปรากฎ ไดอะล๊อกขึ้น
วิธีสร้าง เข้า SE91
Subroutines
FORM refresh_display USING p_grid TYPE REF TO cl_gui_alv_grid.
data is_stable LIKE lvc_s_stbl.
PERFORM get_grid USING p_grid.
is_stable-row = 'X'.
is_stable-col = 'X'.
CALL METHOD p_grid->refresh_table_display
EXPORTING
is_stable = is_stable.
ENDFORM. " REFRESH_DISPLAY
FORM get_grid USING p_grid TYPE REF TO cl_gui_alv_grid.
IF p_grid IS NOT INITIAL.
FREE p_grid.
ENDIF.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_grid.
ENDFORM. " GET_GRID
FORM check_change USING p_grid TYPE REF TO cl_gui_alv_grid.
DATA: g_valid TYPE c.
PERFORM get_grid USING p_grid.
CALL METHOD p_grid->check_changed_data
IMPORTING
e_valid = g_valid.
ENDFORM. " CHECK_CHANGE
Call Function
data : d_dtb1 type ref to cl_gui_alv_grid.
PERFORM refresh_display USING d_dtb1.
PERFORM check_change USING d_dtb1.
Ref Report
YPP_PRODORD_OPR_CHANGE
1. SE91
Using code SE80
CALL FUNCTION 'DOCU_CALL'
EXPORTING
* CMOD_ENTRANCE = ' '
DISPL = 'X'
DISPL_MODE = '2'
* DYNPRO_FOR_THLPF = ' '
* FDNAME_FOR_THLPF = ' '
id = 'NA'
langu = 'E'
object = 'ZDEV022'
* PROGRAM_FOR_THLPF = ' '
* SHORTTEXT = ' '
TYP = 'E'
* SUPPRESS_EDIT = ' '
USE_SEC_LANGU = 'X'
* FORCE_EDITOR = ' '
* EXTENSION_MODE = ' '
* TEMPLATE_ID = ' '
* TEMPLATE_OBJECT = ' '
* TEMPLATE_TYP = ' '
* USE_NOTE_TEMPLATE = ' '
* DISPLAY_SHORTTEXT = ' '
* IMPORTING
* SAVETEXT =
* EXIT_CODE =
* EXCEPTIONS
* WRONG_NAME = 1
* OTHERS = 2
วิธีเรียกใช้งานแบบ Message ก็ตามนี้
MESSAGE s022(zdev) DISPLAY LIKE 'S'.
Ref No.ZSDPKL ,ZPC02
เรียกผ่าน Funcation Module
1. 'VIEW_MAINTENANCE_SINGLE_ENTRY'
เป็นการเรียกทีละ 1 รายการ สามารถ/แสดง/แก้ไข/ชม/เพิ่ม หรือ อะไรก็ตามๆ
CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
EXPORTING
action = 'UPD'
* CORR_NUMBER = ' '
view_name = 'ZVDD04L'
* NO_WARNING_FOR_CLIENTINDEP = ' '
* RFC_DESTINATION_FOR_UPGRADE = ' '
* CLIENT_FOR_UPGRADE = ' '
* VARIANT_FOR_SELECTION = ' '
* NO_TRANSPORT = ' '
* SUPPRESSDIALOG = ' '
* INSERT_KEY_NOT_FIXED = ' '
* COMPLEX_SELCONDS_USED = ' '
* IMPORTING
* CORR_NUMBER =
* TABLES
* DBA_SELLIST =
* EXCL_CUA_FUNCT =
CHANGING
entry = key.
2. VIEW_MAINTENANCE_CALL
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'S'
show_selection_popup = '' "range_limits_input
view_name = 'ZSDPCKLST_CUSFMT' "ZPP21CONSTs
variant_for_selection = '' "variant
check_ddic_mainflag = 'X' "MF 081100
* TABLES
* dba_sellist = rangetab
* excl_cua_funct = fu_to_excl
EXCEPTIONS
foreign_lock = 2
no_tvdir_entry = 8.