SAP CRM IPM行业解决方案 - 如何创建IP Scope
发布日期:2021-06-30 14:05:59
浏览次数:3
分类:技术文章
本文共 3136 字,大约阅读时间需要 10 分钟。
REPORT zcreate_right_scope.PARAMETERS: order TYPE crmd_orderadm_h-object_id OBLIGATORY DEFAULT '5600000010'.DATA: lo_core TYPE REF TO cl_crm_bol_core, lo_collection TYPE REF TO if_bol_entity_col, lv_query_name TYPE crmt_ext_obj_name, lt_selection_parameter TYPE genilt_selection_parameter_tab, ls_selection_parameter TYPE genilt_selection_parameter, ls_query_parameters TYPE genilt_query_parameters.ls_selection_parameter-attr_name = 'OBJECTID'.ls_selection_parameter-option = 'EQ'.ls_selection_parameter-sign = 'I'.ls_selection_parameter-low = order.APPEND ls_selection_parameter TO lt_selection_parameter.ls_query_parameters-max_hits = 1.lv_query_name = 'BTAdvQueryAUI'.lo_core = cl_crm_bol_core=>get_instance( ).lo_core->load_component_set( 'BT' ).lo_core->load_component_set( 'IPMRM' ).lo_collection = lo_core->dquery( iv_query_name = lv_query_name it_selection_parameters = lt_selection_parameter is_query_parameters = ls_query_parameters ).DATA(lo_contract) = lo_collection->get_current( ).CHECK lo_contract IS NOT INITIAL.DATA: lr_item_handler TYPE REF TO cl_crm_ipm_item_handler.CREATE OBJECT lr_item_handler EXPORTING iv_header_bol_entity = lo_contract.DATA(ips) = lr_item_handler->get_all_ips( ).DATA(ip_instance) = ips->get_first( ).WHILE ip_instance IS NOT INITIAL. DATA(item_handler) = cl_crm_ipm_item_handler_provid=>get_instance( ip_instance ). DATA(wrapped_ip) = cl_crm_ipm_order_item_entity=>get_instance( io_original = ip_instance iv_ipm_admini_type = 'IP' ). DATA(new_scope) = item_handler->create_rights_scope( io_admini_entity = wrapped_ip iv_item_group = cl_crm_ipm_contr_scenario_cb=>gc_item_group_rights ). CHECK new_scope IS NOT INITIAL. lo_core->modify( ). DATA(char_scope) = cl_crm_ipm_rights_ui_tools=>create_rights_scope( ir_entity = new_scope iv_relation = 'BTItemIPMRcharSet' ). CHECK char_scope IS NOT INITIAL. char_scope->switch_to_change_mode( ). char_scope->set_property( iv_attr_name = 'SCOPE_DSC' iv_value = 'fill by code' ). DATA(scope_detail) = char_scope->get_related_entity( 'BTIPMRightGroupAll' ). CHECK scope_detail IS NOT INITIAL. scope_detail->switch_to_change_mode( ). scope_detail->set_property( iv_attr_name = 'RGHTDIM01' iv_value = 'BOOKS' ). scope_detail->set_property( iv_attr_name = 'RGHTDIM01_DSC' iv_value = 'BOOKs' ). scope_detail->set_property( iv_attr_name = 'RGHTDIM02' iv_value = 'NAM' ). scope_detail->set_property( iv_attr_name = 'RGHTDIM02_DSC' iv_value = 'North America' ). scope_detail->set_property( iv_attr_name = 'RGHTDIM03' iv_value = 'DE' ). scope_detail->set_property( iv_attr_name = 'RGHTDIM03_DSC' iv_value = 'German' ). ip_instance = ips->get_next( ).ENDWHILE. lo_core->modify( ). DATA(lo_transaction) = lo_core->get_transaction( ). CHECK lo_transaction->check_save_possible( ) = abap_true. CHECK lo_transaction->save( ) = abap_true. lo_transaction->commit( ). WRITE: / 'IP Scope generated successfully!'.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
转载地址:https://jerry.blog.csdn.net/article/details/103967366 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月16日 12时02分43秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
攻防世界web进阶区web2详解
2019-04-30
xss-labs详解(上)1-10
2019-04-30
xss-labs详解(下)11-20
2019-04-30
攻防世界web进阶区ics-04详解
2019-04-30
sql注入总结学习
2019-04-30
Python 之 histogram直方图
2019-04-30
Python实现决策树 Desision Tree & 可视化
2019-04-30
决策树 Decision tree
2019-04-30
nominal和ordinal & 数据处理中四种基本数据类型
2019-04-30
Trie树(字典树)
2019-04-30
MATLAB与CUDA
2019-04-30
Linux png转jpg (convert命令)
2019-04-30
Ubuntu更新后终端中字体的颜色全是白色
2019-04-30
vscode git
2019-04-30
基于MATLAB的二进制数字调制与解调信号的仿真——2PSK
2019-04-30
基于MATLAB的模拟调制信号与解调的仿真——DSB
2019-04-30
HDU - 1166 敌兵布阵 (树状数组模板题/线段树模板题)
2019-04-30
CodeForces - 456C Boredom (dp)
2019-04-30
CodeForces - 675A Infinite Sequence(简单数论 细节)
2019-04-30