zl程序教程

您现在的位置是:首页 >  其他

当前栏目

IPM: Technical model of IP right scope on Contract Item level

OnIP of model level item Scope right
2023-09-14 09:03:03 时间

Created by Jerry Wang, last modified on Mar 25, 2014

Acquisition contract上维护了一系列作为其行项目的IP信息。

 

clipboard1

 

 

以第三个行项目(line item id = 30 ) 为例,其right scope detail 信息如下:

 

clipboard2

 

 

1. open GENIL_BOL_BROWSER:

 

clipboard3

 

 

以contract ID作为查询条件:

 

clipboard4

 

 

会得到唯一的搜索结果,然后执行BTOrderHeader relation:

 

clipboard5

 

 

2. 得到唯一的navigation结果BTAdminH,再执行relation BTHeaderItemsExt:

 

clipboard6

 

 

得到一个result collection BTItems:

 

clipboard7

 

 

执行relation BTItemsFirstLevel:

 

clipboard8

 

 

这样就得到了第三个行项目:

 

clipboard9

 

 

BTAdminI->BTItemIPMRcharSet:

 

clipboard10

 

 

 

clipboard11

 

 

 

clipboard12

 

 

 

如果想通过代码获得合同里第三个IP对应的right scope,可以参考下面的report:

 

 

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_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(third) = ips->find( iv_index = 3 ).
DATA(scopes) = lr_item_handler->get_all_level_rights_scopes( third ).