Professional Documents
Culture Documents
Goodyear Pte Ltd IC Business Transaction Access Control Engine Functional Document
Confidential
Page 1
0.1
05/04/2010
Huai Ying
First Draft
Document References
No. Document
1 2 Business Blueprint - IC
Location
\\163.243.220.175\share\CRM_Project_Docs\Blueprint\SAP-CRM-IC-BusinessBlueprintSignoff.doc ACE For IC Business Partner \\\163.243.220.175\share\CRM_Project_Docs\Functional Spec\ACE\Phase 1B - IC\ACE For IC Business Partner.pdf
Confidential
Page 2
Contents
1. Access Control Engine ............................................................................................................. 4 1.1 Purpose ........................................................................................................................... 4 1.2 Functional Requirements (Business Scenario & Requirements) .................................... 4 2. Solution Design ....................................................................................................................... 5 2.1 Business Process Model .................................................................................................. 5 3. ACE Customizing ..................................................................................................................... 7 3.1. General Parameter Settings ............................................................................................ 7 3.2. Rules Customizing ........................................................................................................... 7 3.2.1. Actor Type Customizing .............................................................................................. 7 3.2.2. Actor From Object Customizing .................................................................................. 8 3.2.3. Object By Filter Customizing ....................................................................................... 8 3.2.4. Actor For User Customizing ........................................................................................ 9 3.2.5. Rule Customizing......................................................................................................... 9 3.3. Rights Customizing .......................................................................................................... 9 3.3.1. Create Work Package ................................................................................................ 10 3.3.2. Create User Group .................................................................................................... 10 3.3.3. Create Rights ............................................................................................................. 10 3.4. ACE Event Background Job ........................................................................................... 11 4. ACE Maintenance .................................................................................................................. 12 4.1. Activate/Deactivate ACE ............................................................................................... 12 4.2. Analyze Design Data...................................................................................................... 13 4.3. Simulating Runtime Result ............................................................................................ 14 4.4. Update User or Object .................................................................................................. 16 4.4.1. Update User Context ................................................................................................ 16 4.4.2. Update Object Context ............................................................................................. 17 5. ACE Enhancement ................................................................................................................. 17 5.1. DDIC Objects ................................................................................................................. 17 5.1.1. Data Elements ........................................................................................................... 18 5.1.2. Database Tables ........................................................................................................ 18 5.2. Class ZCL_CRM_ACERULE_EMP_NAME ........................................................................ 19 5.2.1. Method IF_CRM_ACE_ACTORS_FROM_USER ~ GET_ACTORS_FROM_USER .......... 19 5.3. Class ZCL_CRM_ACERULE_1O_NON_OE_SR ................................................................ 19 5.3.1. Method IF_CRM_ACE_OBJECTS_BY_FILTER ~ CHECK_OBJECTS_BY_FILTER ............ 19 5.3.2. Method IF_CRM_ACE_OBJECTS_BY_FILTER ~ GET_OBJECTS_BY_FILTER ................ 20 5.3.3. Method IF_CRM_ACE_ACTORS_FROM_USER ~ GET_ACTORS_FROM_OBJECTS ..... 24 6. Appendix ............................................................................................................................... 29
Confidential
Page 3
The document defines the Goodyear Interaction Center (IC) Agent or Service Professional searching for Business Transaction (Appointment, Task, Sales Visit and Email) by employee responsible. This document collates both functional requirements and technical requirements. No separate document will be created.
1.2
A Customer Transactional Table at Section Error! Reference source not found. will be created to store user name of IC Agent and higher level users such as IC Manager who are allowed to view all transaction data responsible by the agent. Thus, users at high level in the table could see all transactional data created by lower level users.
Confidential
Page 4
2. Solution Design
2.1 Business Process Model
Access Control Engine (ACE) Concept involves an Actor which represents the relationship between User and Object. Business Transaction can only be accessed by the employee responsible or higher level user in the table. Therefore, IC Agent / Service Professional are the Actor, Business Transaction is the Object and Goodyear Employee is the user. ACE filtering process requires three technical enhancements as below: Actor for User filters Goodyear employee and Business Partners he responsible for. Actor from Object filters Business Transaction based on partner functions. Object by Filter filters Goodyear Business Transaction (Appointment/Task/Sales Visit/Email).
Employee Responsible
(Actor)
Employee
User
Business Transaction
(Object)
Object By Filter
Confidential
Page 5
During creation for Business Transaction, IC Agent / Service Professional can be partner functions as Owner or Employee Responsible depending on the Transaction Type. Table below shows the partner functions of each transaction type. Business Partner of the partner function acts as
Table 1: Table of ACE filtering criteria
Example Distributor / Retailer / Consumer IC Agent / Service Professional who create the Appointment Distributor / Retailer / Consumer IC Agent / Service Professional who responsible for the Task Distributor / Retailer / Consumer IC Agent / Service Professional who create the Sales Visit Distributor / Retailer / Consumer IC Agent / Service Professional who create the Email
ZGTA Task
ZGEI/ZGEO Email
00000009 00000022
Confidential
Page 6
3. ACE Customizing
3.1. General Parameter Settings
Path: SPRO CRM Basic Functions Access Control Engine Maintain General Parameters
Table 2: Table of ACE Parameter Settings
Parameter Value
Description Mark X to deactivate ACE Leave blank to activate ACE New Objects Cache are deleted at 0 second
Confidential
Page 7
Confidential
Page 8
S
Figure 6: Screenshot of ACE Rule
Confidential
Page 9
User Group consists of user assignment either as single users, or as members of a role, or as members of another user group.
Both assists ACE to identify which user is ACE active and rules selected. Path: SPRO CRM Basic Functions Access Control Engine Create Right
Confidential
Page 10
JOB Name Transaction Code Job Name ABAP Program Event ID Parameter Periodic Jobs
Confidential
Page 11
4. ACE Maintenance
4.1. Activate/Deactivate ACE
ACE can only be active if user group in a work package and the right are activated. If ACE were to be permanently stopped, Right must be deactivated before Work Package is deactivated. Changes on existing ACE Rule or ACE User Groups require reactivation on Work Package in order to take effect. Path: SPRO CRM Basic Functions Access Control Engine Activate/Deactivate Work Packages and Rights
Confidential
Page 12
Activating an ACE User Group and Right will trigger ACE rule to calculate the accessible object. It is required to be manually triggered if: new ACE rule is added; existing ACE rule is amended; user table in section 5.1 is updated.
Confidential
Page 13
Confidential
Page 14
Confidential
Page 15
Confidential
Page 16
5. ACE Enhancement
During Rule creation, each rule requires an ACE class in order to perform the search filtering criteria and mapping of User and Object via Actor from a customer table.
In this section, all the necessary information to create a Transactional Database is shown in table format.
Confidential
Page 17
5.1.1.
Data Elements
Data Element is declared for user name which will be used in Database table.
Table 5: Data Elements
No. Characters 12 12 12 12
5.1.2.
Database Tables
Table below shows the Database Maintenance and the Field Name.
Table 6: Database Table Maintenance
Table Maintenance Delivery Class Data Class Size Category Function Group Maintenance Screen type
Table 7: Database Fields
ZGY_ACE_IC_ORG Key Initial Data Element X X X X X X X X X X MANDT ZUNAME3 ZUNAME2 ZUNAME1 ZUNAME0
Confidential
Page 18
Confidential
Page 19
5.3.2.
Function Module: ZCRM_ACE_GET_ORDER_OBJECTS_CHM This function module filters for Goodyear Activities, Task and Opportunity.
FUNCTION zcrm_ace_get_order_objects_chm . *"---------------------------------------------------------------------*"*"Local Interface: *" IMPORTING *" REFERENCE(IV_LEAD_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_ACTIVITY_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_ORDERS_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_TASKS_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_OPP_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_BUDGETRES_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_BPO_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_BPO_FOR_CHANGE_WITH_STAT) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_FUND_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_CLAIM_REQUEST) TYPE BOOLEAN OPTIONAL *" REFERENCE(IV_BPO_FOR_CHANGE_WITHOUT_STAT) TYPE BOOLEAN OPTIONAL *" EXPORTING *" REFERENCE(EX_OBJECT_GUID_TABLE) TYPE CRMT_ACE_OBJECT_GUID *"---------------------------------------------------------------------DATA: lt_object_guid TYPE crmt_ace_object_guid. DATA: lt_object_guid_filter TYPE crmt_ace_object_guid. DATA: BEGIN OF wa_proc_type, process_type TYPE crmt_process_type, END OF wa_proc_type, lt_proc_type LIKE STANDARD TABLE OF wa_proc_type. * create a range to select Custom Process Type RANGES: s_proctype FOR crmd_orderadm_h-process_type. s_proctype-sign = 'I'. s_proctype-option = 'GE'.
Confidential
Page 20
s_proctype-low = 'Z'. APPEND s_proctype. * select all lead object BUS2000108 IF iv_lead_request NE space. SELECT guid FROM crmd_lead_h INTO TABLE lt_object_guid. "#EC CI_NOWHERE ex_object_guid_table = lt_object_guid. ENDIF. * select all Activities BUS2000126 IF iv_activity_request NE space. SELECT guid FROM crmd_activity_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE task NE 'X'. * filter the results SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid_filter FOR ALL ENTRIES IN lt_object_guid WHERE guid = lt_object_guid-object_guid AND process_type IN s_proctype. * merge the results APPEND LINES OF lt_object_guid_filter TO ex_object_guid_table. ENDIF. * select all Tasks BUS2000125 IF iv_tasks_request NE space. SELECT guid FROM crmd_activity_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE task = 'X'. * filter the results SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid_filter FOR ALL ENTRIES IN lt_object_guid WHERE guid = lt_object_guid-object_guid AND process_type IN s_proctype. * merge the results APPEND LINES OF lt_object_guid_filter TO ex_object_guid_table. ENDIF. * select all Orders IF iv_orders_request NE space. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE object_type = 'BUS2000115' AND process_type IN s_proctype. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Opportunities
Confidential
Page 21
IF iv_opp_request NE space. SELECT guid FROM crmd_opport_h INTO TABLE lt_object_guid. "#EC CI_NOWHER E SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid_filter FOR ALL ENTRIES IN lt_object_guid WHERE guid = lt_object_guid-object_guid AND process_type IN s_proctype. * merge the results APPEND LINES OF lt_object_guid_filter TO ex_object_guid_table. ENDIF. * select all Reservation Objects BUS2000313 IF iv_budgetres_request NE space. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE object_type = 'BUS2000313'. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Budget Posting Objects BUS2000402 IF iv_bpo_request NE space. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE object_type = 'BUS2000402'. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Budget Posting Objects BUS2000402 of type Transfer. IF iv_bpo_for_change_without_stat NE space. CLEAR lt_proc_type. SELECT process_type FROM crmc_bpo_prctype INTO TABLE lt_proc_type WHERE budget_tran_type IN ('TRANSFER', 'ABTRANS'). IF NOT lt_proc_type IS INITIAL. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOW HERE FOR ALL ENTRIES IN lt_proc_type WHERE object_type = 'BUS200 0402' AND process_type = lt_proc_type-process_type. ENDIF. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Budget Posting Objects BUS2000402 of type Extension and Renewal .
Confidential
Page 22
IF iv_bpo_for_change_with_stat NE space. CLEAR lt_proc_type. SELECT process_type FROM crmc_bpo_prctype INTO TABLE lt_proc_type WHERE budget_tran_type IN ('EXTEND', 'RENEW'). IF NOT lt_proc_type IS INITIAL. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOW HERE FOR ALL ENTRIES IN lt_proc_type WHERE object_type = 'BUS200 0402' AND process_type = lt_proc_type-process_type. ENDIF. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Fund Objects BUS2000401 IF iv_fund_request NE space. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE object_type = 'BUS2000401'. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. * select all Claims objects BUS2000311 IF iv_claim_request NE space. SELECT guid FROM crmd_orderadm_h INTO TABLE lt_object_guid "#EC CI_NOFIE LD WHERE object_type = 'BUS2000311'. * merge the results APPEND LINES OF lt_object_guid TO ex_object_guid_table. ENDIF. ENDFUNCTION.
Confidential
Page 23
5.3.3.
This method prepares the related partner functions which are needed to map Actors to Objects.
METHOD if_crm_ace_actors_from_object~get_actors_from_objects. CONSTANTS: lc_actity_fct lc_owner_fct lc_prospect_fct lc_emp_resp_fct TYPE TYPE TYPE TYPE crmt_partner_fct crmt_partner_fct crmt_partner_fct crmt_partner_fct VALUE VALUE VALUE VALUE '00000009', '00000022', '00000021', '00000014'.
DATA: lt_partner_pft TYPE crmt_partner_fct_tab, ls_partner_pft TYPE crmt_partner_fct. * assign partner function ls_partner_pft = lc_actity_fct. INSERT ls_partner_pft INTO TABLE lt_partner_pft. ls_partner_pft = lc_owner_fct. INSERT ls_partner_pft INTO TABLE lt_partner_pft. ls_partner_pft = lc_prospect_fct. INSERT ls_partner_pft INTO TABLE lt_partner_pft. ls_partner_pft = lc_emp_resp_fct. INSERT ls_partner_pft INTO TABLE lt_partner_pft. CALL FUNCTION 'ZCRM_ACE_GET_10_OWNER' EXPORTING OBJECTS = it_object_guids partner_pft_tab = lt_partner_pft IMPORTING actor_ids = et_actor_ids failed_objects = et_failed_objects. ENDMETHOD.
Function Module: ZCRM_ACE_GET_1O_OWNER This function module looks up the partner functions of each transaction data and maps to Actor.
FUNCTION zcrm_ace_get_10_owner. *"---------------------------------------------------------------------*"*"Local Interface: *" IMPORTING *" REFERENCE(OBJECTS) TYPE CRMT_ACE_OBJECT_GUID *" REFERENCE(PARTNER_PFT_TAB) TYPE CRMT_PARTNER_FCT_TAB *" EXPORTING
Confidential
Page 24
*" REFERENCE(ACTOR_IDS) TYPE CRMT_ACE_OBJECT_ACTORS *" REFERENCE(FAILED_OBJECTS) TYPE CRMT_ACE_OBJECT_GUID *"---------------------------------------------------------------------DATA: lt_objects lt_partners ls_object_actor ls_actor lt_actor lt_uname ls_failed_object lv_user TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE crmt_inherit_guid_struc_tab, crmt_partner_external_wrkt, crms_ace_object_actors, crms_ace_actor_id, crmt_ace_actor_id, crmt_ace_actor_id, crms_ace_object_guid, sy-uname.
FIELD-SYMBOLS: <fs_partner> TYPE crmt_partner_external_wrk, <fs_partner_pft> TYPE crmt_partner_fct, <fs_object> TYPE crmt_inherit_guid_struc. RANGES: rt_partner_pft FOR <fs_partner>-ref_partner_fct. IF partner_pft_tab[] IS INITIAL. EXIT. ELSE. rt_partner_pft-sign = 'I'. rt_partner_pft-option = 'EQ'. LOOP AT partner_pft_tab ASSIGNING <fs_partner_pft>. rt_partner_pft-low = <fs_partner_pft>. APPEND rt_partner_pft. ENDLOOP. ENDIF. lt_objects[] = objects[]. CALL FUNCTION 'CRM_PARTNER_READ_MULTI_OB' EXPORTING it_ref_objects = lt_objects IMPORTING et_external_wrk = lt_partners. LOOP AT lt_objects ASSIGNING <fs_object>. CLEAR lt_actor[]. READ TABLE lt_partners WITH KEY ref_guid = <fs_object>-guid BINARY SEARCH TRANSPORTING NO FIELDS. IF sy-subrc EQ 0. LOOP AT lt_partners FROM sy-tabix
Confidential
Page 25
ASSIGNING <fs_partner> WHERE ref_guid = <fs_object>-guid AND ref_handle = space AND ref_kind = 'A' AND ref_partner_fct IN rt_partner_pft. . IF <fs_partner>-ref_guid NE <fs_object>-guid. EXIT. ENDIF. * read user name CALL FUNCTION 'BP_CENTRALPERSON_GET' EXPORTING iv_bu_partner_guid = <fs_partner>-bp_partner_guid IMPORTING ev_username = lv_user EXCEPTIONS no_central_person = 1 no_business_partner = 2 no_id = 3 OTHERS = 4. APPEND lv_user TO lt_actor. ENDLOOP. IF sy-subrc EQ 0. IF NOT lt_actor IS INITIAL. DELETE ADJACENT DUPLICATES FROM lt_actor COMPARING actor_id. CALL FUNCTION 'ZGY_ACE_READ_ORG_USER' CHANGING ct_actor_id = lt_actor. IF NOT lt_actor IS INITIAL. CLEAR ls_object_actor. ls_object_actor-object_guid = <fs_object>-guid. ls_object_actor-actors = lt_actor. APPEND ls_object_actor TO actor_ids. ELSE. CLEAR ls_failed_object. ls_failed_object-object_guid = <fs_object>-guid. APPEND ls_failed_object TO failed_objects. ENDIF. ENDIF. ELSE. CLEAR ls_failed_object. ls_failed_object-object_guid = <fs_object>-guid. APPEND ls_failed_object TO failed_objects. ENDIF. ENDIF. ENDLOOP. ENDFUNCTION.
Confidential
Page 26
Function Module: ZGY_ACE_READ_ORG_USER This function module reads users in Section Error! Reference source not found. who is allowed to view and process the Transactional Data.
FUNCTION zgy_ace_read_org_user. *"---------------------------------------------------------------------*"*"Local Interface: *" CHANGING *" REFERENCE(CT_ACTOR_ID) TYPE CRMT_ACE_ACTOR_ID OPTIONAL *"---------------------------------------------------------------------DATA: ls_itab lt_itab TYPE zgy_ace_ic_org, TYPE TABLE OF zgy_ace_ic_org.
DATA: ls_actor_id TYPE crms_ace_actor_id, lt_actor_id TYPE crmt_ace_actor_id. CHECK ct_actor_id IS NOT INITIAL. lt_actor_id = ct_actor_id. REFRESH: lt_itab, ct_actor_id. LOOP AT lt_actor_id INTO ls_actor_id. CLEAR ls_itab. REFRESH lt_itab. SELECT * FROM zgy_ace_ic_org INTO TABLE lt_itab WHERE level3 = ls_actor_idactor_id. IF sy-subrc = 0. * convert 3rd level user name to BP guid * read level 2 that related to level 3 users CLEAR ls_itab. LOOP AT lt_itab INTO ls_itab. APPEND ls_itab-level2 TO ct_actor_id. APPEND ls_itab-level1 TO ct_actor_id. APPEND ls_itab-level0 TO ct_actor_id. ENDLOOP. APPEND ls_itab-level3 TO ct_actor_id. ELSE. * 3rd level user not found * look up user name in 2nd level CLEAR ls_itab. REFRESH lt_itab. SELECT * FROM zgy_ace_ic_org INTO TABLE lt_itab WHERE level2 = ls_actor_id-actor_id. IF sy-subrc = 0. " append level 3 user names to itab LOOP AT lt_itab INTO ls_itab. APPEND ls_itab-level1 TO ct_actor_id. APPEND ls_itab-level0 TO ct_actor_id. ENDLOOP.
Confidential
Page 27
APPEND ls_itab-level2 TO ct_actor_id. ELSE. * 2nd level user not found * look up user name in 1st level SELECT * FROM zgy_ace_ic_org INTO TABLE lt_itab WHERE level1 = ls_actor_id-actor_id. IF sy-subrc = 0. APPEND ls_itab-level1 TO ct_actor_id. LOOP AT lt_itab INTO ls_itab. APPEND ls_itab-level0 TO ct_actor_id. ENDLOOP. ELSE. * 1st level user not found * look up user name in level 0 SELECT SINGLE * FROM zgy_ace_ic_org INTO ls_itab WHERE level0 = ls_actor_idactor_id. IF sy-subrc = 0. APPEND ls_itab-level0 TO ct_actor_id. ENDIF. ENDIF. ENDIF. ENDIF. ENDLOOP. SORT ct_actor_id BY actor_id ASCENDING. DELETE ADJACENT DUPLICATES FROM ct_actor_id. DELETE ct_actor_id WHERE actor_id = ''. ENDFUNCTION.
Confidential
Page 28
6. Appendix
Confidential
Page 29