html 页面 字段,html页面修改 页面字段属性

DATA:lv_xml    type string,

lv_xml_inp type string,

lv_index type i,

lv_config_type type BSP_DLC_CONFIG_TYPE,

lv_view_desc type ref to IF_BSP_DLC_VIEW_DESCRIPTOR,

it_adv_conf type BSP_DLCT_ADV_CONF_ITM,

is_adv_conf like line of  it_adv_conf.

* ************Read the original configuration data and property descriptors of the view as an xml file

lv_xml_inp    = controller->CONFIGURATION_DESCR ->GET_CONFIG_DATA( ).

lv_view_desc = controller-> CONFIGURATION_DESCR->GET_PROPERTY_DESCRIPTOR ( ).

*********************** Use the utility class to convert xml to ABAP format

CL_BSP_DLC_CONFIG_UTIL=> ADV_CONF_META_TO_TABLE( exporting IR_VIEW_DESCR = lv_view_desc

IV_ADV_CONF_META_XML = lv_xml_inp

importing ET_ADV_CONF = it_adv_conf ).

LOOP AT it_adv_conf INTO is_adv_conf WHERE field_name = '//BTADMINH/EXT.ZZF_ACTIVE_NOTE' .

lv_index = sy- tabix.

if controller-> if_active = 'X' .

is_adv_conf-MANDATORY = 'X'.

is_adv_conf-DISPLAY_ONLY = ' ' .

else.

is_adv_conf-MANDATORY = ' '.

is_adv_conf-DISPLAY_ONLY = 'X' ."不可编辑

endif.

MODIFY it_adv_conf FROM is_adv_conf INDEX lv_index .

ENDLOOP.

CL_BSP_DLC_CONFIG_UTIL=> ADV_CONF_TABLE_TO_META( exporting IT_ADV_CONF = it_adv_conf

IR_VIEW_DESCR = lv_view_desc

importing EV_ADV_CONF_META_XML = lv_xml ).

****  ****Here the modified XML is retrieved , but it is not ready as it has been encoded. We have to remove encoding and put it in standard format for rendering.

DATA: lv_defidx    TYPE sy- fdpos,

lv_clstagidx TYPE sy-fdpos .

lv_defidx = -1 .

lv_clstagidx = 10000.

IF lv_xml CS '' lv_xml INTO lv_xml."#EC NOTEXT

%>

DATA:lv_view_desc      TYPE REF TO if_bsp_dlc_view_descriptor,

lt_adv_conf       TYPE bsp_dlct_adv_conf_itm,

ls_adv_conf       LIKE LINE OF  lt_adv_conf,

ls_current_status TYPE crmst_status_btil,

lv_estat          TYPE j_estat,

lv_txt04          TYPE j_txt04.

FIELD-SYMBOLS:LIKE LINE OF  lt_adv_conf.

IF gw_btadminh-process_type = 'ZSGN'.

*   获取单据状态

zcl_crm_common_service=>get_user_status_current(

EXPORTING

ir_btadminh       = lr_btadminh

IMPORTING

es_current_status = ls_current_status

ev_estat          = lv_estat

ev_txt04          = lv_txt04

)..

CALL METHOD me->configuration_descr->get_config_data

RECEIVING

rv_result        = DATA(lv_xml)

EXCEPTIONS

config_not_found = 1.

IF sy-subrc = 0.

lv_view_desc = me->configuration_descr->get_property_descriptor( ).

*********************** Use the utility class to convert xml to ABAP format

cl_bsp_dlc_config_util=>adv_conf_meta_to_table( EXPORTING ir_view_descr = lv_view_desc

iv_adv_conf_meta_xml = lv_xml

IMPORTING et_adv_conf = lt_adv_conf ).

IF lv_txt04 = 'OPEN'.

READ TABLE lt_adv_conf ASSIGNING WITH KEY field_name = '//BTADMINH/EXT.ZZF_LCHLVEL'..

IF sy-subrc = 0.

-display_only = abap_true.

ENDIF.

ELSE.

READ TABLE lt_adv_conf ASSIGNING WITH KEY field_name = '//BTADMINH/EXT.ZZF_LCHLVEL'..

IF sy-subrc = 0.

-display_only = abap_false.

ENDIF.

ENDIF.

cl_bsp_dlc_config_util=>adv_conf_table_to_meta( EXPORTING it_adv_conf = lt_adv_conf

ir_view_descr = lv_view_desc

IMPORTING ev_adv_conf_meta_xml = lv_xml ).

DATA(lr_configuration2) = CAST if_bsp_dlc_config_table_layout( me->configuration_descr ).

lr_configuration2->set_active_table_layout( iv_config_data = lv_xml ).

ENDIF.

ENDIF.

*    end add

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值