最新SAP动态配置程序-Dialog-ALV-报表(下).docx
《最新SAP动态配置程序-Dialog-ALV-报表(下).docx》由会员分享,可在线阅读,更多相关《最新SAP动态配置程序-Dialog-ALV-报表(下).docx(79页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-dateSAP动态配置程序-Dialog-ALV-报表(下)SAP动态配置程序-Dialog-ALV-报表(下)SAP动态配置程序 Dialog ALV 报表(下)-Author:SUNZK QQ:1131341075 WEIXIN:DreamSunlight88REPORTYMPSR9010MESSAGE-IDYMCANOSTANDARDPAGEHEADING.INCLUD
2、EYMPSR9010_TOP.INCLUDEYMPSR9010_CLS.INCLUDEYMPSR9010_O01.INCLUDEYMPSR9010_I01.INCLUDEYMPSR9010_F01.START-OF-SELECTION.CALLSCREEN100.*DATA:ok_codeTYPEsy-ucomm,save_okTYPEsy-ucomm,g_errorTYPEc,l_answerTYPEc,弹框返回值g_actionTYPEcVALUE3.1创建、2、修改3、显示DATA:gt_cs009TYPETABLEOFympstcs009,gs_cs009TYPEympstcs009,
3、gt_cs010TYPETABLEOFympstcs010,gs_cs010TYPEympstcs010.DATA:gc_alv100TYPEREFTOcl_gui_alv_grid,用户角色ALVgc_container100TYPEREFTOcl_gui_custom_container,边ALV容器gs_layout100TYPElvc_s_layo,ALV布局结构gt_fieldcat100TYPElvc_t_fcat.标题头DATA:gc_alv200TYPEREFTOcl_gui_alv_grid,用户角色ALVgc_container200TYPEREFTOcl_gui_cust
4、om_container,边ALV容器gs_layout200TYPElvc_s_layo,ALV布局结构gt_fieldcat200TYPElvc_t_fcat,标题头gs_lvc_s_stblTYPElvc_s_stblVALUEXX.CLASSlcl_event_handlerDEFINITION.PUBLICSECTION.METHODS:handle_double_clickFOREVENTdouble_clickOFcl_gui_alv_gridIMPORTINGe_rowe_columnes_row_nosender.ENDCLASS.CLASSlcl_event_handler
5、IMPLEMENTATION.METHODhandle_double_click.*-双击事件PERFORMhandle_double_click100CHANGINGe_columnes_row_no.ENDMETHOD.ENDCLASS.MODULEstatus_0100OUTPUT.SETPF-STATUS100.SETTITLEBAR100.PERFORMfrm_disp_alv100.ENDMODULE.STATUS_0100OUTPUT*&-*&ModuleSTATUS_0200OUTPUT*&-*text*-*MODULEstatus_0200OUTPUT.SETPF-STATU
6、S200.SETTITLEBAR200.PERFORMfrm_disp_alv200.ENDMODULE.STATUS_0200OUTPUTMODULEuser_command_0100INPUT.CALLMETHODgc_alv100-check_changed_data.save_ok=ok_code.CLEARok_code.CASEsave_ok.WHENDISP.g_action=3.WHENMODIFY.g_action=2.WHENBACK.LEAVETOSCREEN0.WHENCREAT.g_action=1.PERFORMfrm_create_date100.WHENDELE
7、.PERFORMfrm_delete_date100.WHENSAVE.PERFORMfrm_save_date100.WHENOTHERS.ENDCASE.CALLMETHODgc_alv100-check_changed_data.CALLMETHODgc_alv100-refresh_table_displayEXPORTINGis_stable=gs_lvc_s_stbl.ENDMODULE.USER_COMMAND_0100INPUT*&-*&ModuleUSER_COMMAND_0200INPUT*&-*text*-*MODULEuser_command_0200INPUT.CAL
8、LMETHODgc_alv200-check_changed_data.save_ok=ok_code.CLEARok_code.CASEsave_ok.WHENDISP.g_action=3.WHENMODIFY.g_action=2.WHENBACK.g_action=3.LEAVETOSCREEN0.WHENCREAT.g_action=1.PERFORMfrm_create_date200.WHENDELE.PERFORMfrm_delete_date200.WHENSAVE.PERFORMfrm_save_date200.WHENOTHERS.ENDCASE.CALLMETHODgc
9、_alv200-check_changed_data.CALLMETHODgc_alv200-refresh_table_displayEXPORTINGis_stable=gs_lvc_s_stbl.ENDMODULE.USER_COMMAND_0200INPUT*&-*&包含YMPSR9010_F01*&-*&-*&FormFRM_DISP_ALV100*&-*text*-*-p1text*-p2text*-*FORMfrm_disp_alv100.DATA:l_event_receiverTYPEREFTOlcl_event_handler.gs_layout100-sel_mode=A
10、.*gs_layout100-zebra=abap_true.gs_layout100-no_toolbar=X.gs_layout100-cwidth_opt=X.IFgt_cs009ISINITIAL.PERFORMfrm_getdata100.ENDIF.IFgc_container100ISINITIAL.*createacontainerforthesplittercontrolCREATEOBJECTgc_container100EXPORTINGcontainer_name=ALV100EXCEPTIONScntl_error=1cntl_system_error=2create
11、_error=3lifetime_error=4lifetime_dynpro_dynpro_link=5OTHERS=6.IFsy-subrc0.*-ExceptionhandlingMESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.*createaninstanceofalvcontrolCREATEOBJECTgc_alv100EXPORTINGi_parent=gc_container100gc_container100EXCEPTIONSerror_cntl_cr
12、eate=1error_cntl_init=2error_cntl_link=3error_dp_create=4OTHERS=5.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.CLEARgt_fieldcat100.PERFORMfm_add_fieldcat_alv100USINGSXFL项目属性分类编号15.PERFORMfm_add_fieldcat_alv100USINGSXFLT项目属性分类描述20.PERFORMfm_add_fie
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 最新 SAP 动态 配置 程序 Dialog ALV 报表
限制150内