架搭建
1、FPM_OVP_COMPONENT
1 METHOD change_toolbar_btn . 2 * enabled "ABAP_TRUE可用 ABAP_FALSE不可用 3 * visibility "01不可见 02可见 4 DATA: ls_btn TYPE if_fpm_ovp=>ty_s_toolbar_button. 5 CHECK wd_this->mo_cnr IS BOUND. 6 7 TRY . 8 CLEAR:ls_btn. 9 wd_this->mo_cnr->get_toolbar_button( 10 EXPORTING 11 iv_toolbar_element_id = id 12 IMPORTING 13 es_toolbar_button = ls_btn 14 ). 15 CHECK ls_btn IS NOT INITIAL. 16 17 * IF text IS SUPPLIED. 18 ls_btn-text = text. 19 * ENDIF. 20 IF enabled IS SUPPLIED. 21 ls_btn-enabled = enabled. 22 ENDIF. 23 IF visibility IS SUPPLIED. 24 ls_btn-visibility = visibility. 25 ENDIF. 26 27 wd_this->mo_cnr->change_toolbar_button( 28 iv_content_area = 'PAGE_1' 29 is_toolbar_button = ls_btn ). 30 CATCH cx_root INTO DATA(lo_err). 31 DATA(lv_txt) = lo_err->get_text( ). 32 ENDTRY. 33 34 ENDMETHOD.