Huawei, a leading global ICT solutions provider, received two prestigious awards, “Delivering Excellence in Customer Experience” and “Best Innovation in Broadcast – Broadband Convergence” at the just wrapped up AfricaCom 2017 in Cape Town, South Africa. http://bit.ly/2iegNzw #Huawei #BigData #AI
Health Tip in a Minute: Sleep Well
Did you know that chronic sleep deprivation can kill you and your career?
Stay healthy, happy, and productive with good quality sleep. Find out about some simple sleep tips. http://bit.ly/2zA5fQL #SAP #SAPCloud #AI
SAP BusinessObjects Best Practices: Effective Delegation of CMC Access
As part of the SAP BusinessObjects landscape management, administrative delegation becomes a necessity with growth in the landscape and adoption. From a single admin managing the entire role to multiple people managing the single system, setting up the delegation effectively is vital for the proper functioning of the SAP BusinessObjects system.
Common delegation tasks include providing access to parts of CMC like User management or Promotion management. In this blog, we will see the best practices in effective delegation of SAP BusinessObjects landscape management.
Role Matrix
The first step in the process is to identify the role matrix, which highlights the types of roles & access needed to perform different activities. The following is an example of a role matrix.
Role
CMC Tabs
User Management
Users and Groups, User attribute management
Content Management
Access levels, Folders, Categories, Universes, Connections, OLAP Connections
Promotion Management
Promotion Management
Auditors
Auditing, Query results, Cryptographic Keys
Server Administrator
Servers, Instance Manager, Events
This role matrix helps in dividing the responsibilities and assigning them to one or more users/groups.
Delegated Group
The delegated group is used to implement the roles in the SAP BusinessObjects systems. These groups are assigned for each role and the relevant CMC tabs access are provided for the groups. The groups can be prefixed / suffixed (e.g.: DG) to identify that it is for delegated access according to the naming policy followed. The following are the group mappings for the above roles.
Groups
Role
User Management – DG
User Management
Content Management –DG
Content Management
Promotion Management –DG
Promotion Management
Auditors –DG
Auditors
Server Admin –DG
Server Administrator
Restricting CMC Tab Access
The next step would be to restrict the CMC access by default. Navigate to applications tab and open the context menu of Central Management Console and select CMC Tab access Configuration.
Select CMC Tab access to Restricted. Save to apply the setting. By default the CMC access will be restricted which can be overridden explicitly for each of the groups.
Creating Groups
The next step would be to create the groups. The groups can be created from the User and Groups section in the CMC. Navigate to this section and click on ‘Create a group’.
Provide the group name of the mapping created and create the group for all the mapping
Providing CMC Tab Access to the Groups
The next step is to provide necessary CMC Tab access to the groups. On the context menu of the group select CMC Tab configuration.
Select the necessary tabs and grant explicit access to them. The selected ones will be have permission with green icon.
Adding Users to the Group
Finally, add the users to their respective groups using the Users and Groups tabs. When the users login to the CMC, they will be able to access the CMC with only the set of Tabs that are designated to them.
Key Practices for Delegation
These are some of the key practices that should be followed in order to setup a delegated system:
* Provide restricted access to only those resources needed
* Have a flat role structure and do not overlap different roles into one
* Have a direct group to role mapping. Avoid having single group for multiple roles
* Audit the users in the Group and revoke access as needed http://bit.ly/2ic6mMC #SAP #SAPCloud #AI
ABAP FM Create Material Price Condition With Reference to Another Material (RV_CONDITION_COPY)
Sometimes you may need to copy (create) price conditions from one material to another. Below you can find the Function Module doing this. The FM takes the reference material price condition and create a new condition for the new material.
Import Parameters:
P_MATCFG
TYPE
MARA-MATNR
Reference Material
F_MATNR
TYPE
MARA-MATNR
The Material to Create Condition
P_WERKS
TYPE
WERKS-WERKS
Plant
P_KSCHL
TYPE
T685-KSCHL
Condition Type
P_PLTYP
TYPE
T189-PLTYP
Price List
We will be using
* PR00 and PR01 as KSCHL (Condition Type)
* A699 (Condition Table for Pricing A699) table
* A650 (Condition Table for Pricing A650) table
I create other FM’s to get the reference material price and dates. I also included this FM’s below.
Here is the source code:
ZMA_F_CREATE_PRICE_COND_WR function ZMA_F_CREATE_PRICE_COND_WR. *“———————————————————————- *”*“Local Interface: *” IMPORTING *“ REFERENCE(P_MATCFG) TYPE MARA-MATNR *” REFERENCE(F_MATNR) TYPE MARA-MATNR *“ REFERENCE(P_WERKS) TYPE WERKS-WERKS *” REFERENCE(P_KSCHL) TYPE T685-KSCHL *“ REFERENCE(P_PLTYP) TYPE T189-PLTYP *”———————————————————————- data: cr like table of komv with header line, “ copy_records nr, key_fields like table of komg with header line, wa_komk like komk, komk like table of komk, wa_komp like komp, komp like table of komp, lv_datab like sy-datum, lv_datbi like sy-datum. cr-mandt = sy-mandt. cr-kappl = ‘V’. cr-kschl = p_kschl. data: lv_price type konp-kbetr. if p_kschl = ‘PR00’. clear: lv_price. call function ‘ZMA_F_GET_PRICE_BYMATNR’ exporting i_kappl = ‘V’ i_kschl = p_kschl i_pltyp = p_pltyp i_matnr = p_matcfg i_date = sy-datum importing e_kbetr = lv_price. elseif p_kschl = ‘PR01’. clear: lv_price. ” Is PR01 condition exist for this material? if p_pltyp = ’01’. “ Does not exist call function ‘ZMA_F_GET_PRICE_BYMATNR_PR01’ exporting i_kappl = ‘V’ i_kschl = p_kschl i_matnr = p_matcfg i_date = sy-datum importing e_kbetr = lv_price. else. exit. endif. endif. check lv_price > 0. if p_kschl = ‘PR00’. call function ‘ZMA_F_GET_PRICE_BYMATNR_DATES’ exporting i_kappl = cr-kappl i_kschl = cr-kschl i_pltyp = p_pltyp i_matnr = p_matcfg i_date = sy-datum importing e_kbetr = cr-kbetr e_konwa = cr-waers e_datab = lv_datab e_datbi = lv_datbi. elseif p_kschl = ‘PR01’. call function ‘ZMA_F_GET_PRICE_BYMATNR_DATES2’ exporting i_kappl = cr-kappl i_kschl = cr-kschl i_pltyp = p_pltyp i_matnr = p_matcfg i_date = sy-datum importing e_kbetr = cr-kbetr e_konwa = cr-waers e_datab = lv_datab e_datbi = lv_datbi. endif. cr-kpein = ‘1’. cr-kmein = ‘ST’. key_fields-mandt = sy-mandt. key_fields-werks = p_werks. key_fields-matnr = f_matnr. key_fields-pltyp = p_pltyp. key_fields-pltyp_d = p_pltyp. append cr. data wa_pispr like table of pispr with header line. wa_pispr-matnr = p_matcfg. wa_pispr-werks = p_werks. wa_pispr-waerk = cr-waers. append wa_pispr. call function ‘SPR_KOMK_KOMP_FILL’ exporting pi_i_spr = wa_pispr importing pe_i_komk = wa_komk pe_i_komp = wa_komp. wa_komk-mandt = sy-mandt. wa_komk-pltyp = p_pltyp. wa_komp-matnr = f_matnr. wa_komp-pmatn = f_matnr. wa_komp-pltyp_p = p_pltyp. select single mtart from mara into wa_komp-mtart where matnr = f_matnr. data: condition_table like t681-kotabnr. if p_kschl = ‘PR00’. condition_table = ‘699’. elseif p_kschl = ‘PR01’. condition_table = ‘650’. endif. call function ‘RV_CONDITION_COPY’ exporting application = ‘V’ condition_table = condition_table condition_type = p_kschl date_from = lv_datab date_to = lv_datbi * enqueue = ‘X’ i_komk = wa_komk i_komp = wa_komp key_fields = key_fields maintain_mode = ‘A’ no_authority_check = ‘X’ keep_old_records = ‘X’ overlap_confirmed = ‘X’ importing e_komk = wa_komk e_komp = wa_komp new_record = nr tables copy_records = cr exceptions enqueue_on_record = 01 invalid_application = 02 invalid_condition_number = 03 invalid_condition_type = 04 no_authority_ekorg = 05 no_authority_kschl = 06 no_authority_vkorg = 07 no_selection = 08 table_not_valid = 09. call function ‘RV_CONDITION_SAVE’. commit work. call function ‘RV_CONDITION_RESET’. endfunction.
ZMA_F_GET_PRICE_BYMATNR
Import Parameters:
I_KAPPL
TYPE
KONH-KAPPL
Application
I_KSCHL
TYPE
KONH-KSCHL
Condition type
I_PLTYP
TYPE
A699-PLTYP
Price list type
I_MATNR
TYPE
MARA-MATNR
Material Number
I_DATE
TYPE
KONH-DATAB
Valid-From Date
Export Parameters:
E_KBETR
TYPE
KONP-KBETR
Rate (condition amount or percentage) where no scale exists
E_KONWA
TYPE
KONP-KONWA
Rate unit (currency or percentage)
Source Code: FUNCTION ZMA_F_GET_PRICE_BYMATNR. *”———————————————————————- *“*"Local Interface: *” IMPORTING *“ REFERENCE(I_KAPPL) TYPE KONH-KAPPL *” REFERENCE(I_KSCHL) TYPE KONH-KSCHL *“ REFERENCE(I_PLTYP) TYPE A699-PLTYP *” REFERENCE(I_MATNR) TYPE MARA-MATNR *“ REFERENCE(I_DATE) TYPE KONH-DATAB *” EXPORTING *“ REFERENCE(E_KBETR) TYPE KONP-KBETR *” REFERENCE(E_KONWA) TYPE KONP-KONWA *“———————————————————————- TYPES: BEGIN OF ty_itab, knumh LIKE konp-knumh, kappl LIKE konp-kappl, END OF ty_itab. DATA: st_itab TYPE ty_itab. TYPES: BEGIN OF ty_itab_konp, kbetr LIKE konp-kbetr, konwa LIKE konp-konwa, END OF ty_itab_konp. DATA: st_itab_konp TYPE ty_itab_konp. TYPES: tt_itab TYPE STANDARD TABLE OF ty_itab. DATA: itab TYPE tt_itab. SELECT SINGLE a~knumh a~kappl FROM A699 AS a INTO st_itab WHERE a~kappl = I_KAPPL AND a~kschl = I_KSCHL AND a~pltyp = I_PLTYP AND a~matnr = I_MATNR AND a~datab = I_DATE. SELECT SINGLE p~kbetr p~konwa FROM konp AS p INTO st_itab_konp WHERE p~knumh = st_itab-knumh AND p~kappl = st_itab-kappl. IF sy-subrc = 0. e_kbetr = st_itab_konp-kbetr. e_konwa = st_itab_konp-konwa. ENDIF. ENDFUNCTION.
ZMA_F_GET_PRICE_BYMATNR_PR01
Import Parameters:
I_KAPPL
TYPE
KONH-KAPPL
Application
I_KSCHL
TYPE
KONH-KSCHL
Condition type
I_MATNR
TYPE
MARA-MATNR
Material Number
I_DATE
TYPE
KONH-DATAB
Valid-From Date
Export Parameters:
E_KBETR
TYPE
KONP-KBETR
Rate (condition amount or percentage) where no scale exists
E_KONWA
TYPE
KONP-KONWA
Rate unit (currency or percentage)
FUNCTION ZMA_F_GET_PRICE_BYMATNR_PR01. *”———————————————————————- *“*"Local Interface: *” IMPORTING *“ REFERENCE(I_KAPPL) TYPE KONH-KAPPL *” REFERENCE(I_KSCHL) TYPE KONH-KSCHL *“ REFERENCE(I_MATNR) TYPE MARA-MATNR *” REFERENCE(I_DATE) TYPE KONH-DATAB *“ EXPORTING *” REFERENCE(E_KBETR) TYPE KONP-KBETR *“ REFERENCE(E_KONWA) TYPE KONP-KONWA *”———————————————————————- TYPES: BEGIN OF ty_itab, knumh LIKE konp-knumh, kappl LIKE konp-kappl, END OF ty_itab. DATA: st_itab TYPE ty_itab. TYPES: BEGIN OF ty_itab_konp, kbetr LIKE konp-kbetr, konwa LIKE konp-konwa, END OF ty_itab_konp. DATA: st_itab_konp TYPE ty_itab_konp. TYPES: tt_itab TYPE STANDARD TABLE OF ty_itab. DATA: itab TYPE tt_itab. SELECT SINGLE a~knumh a~kappl FROM A650 AS a INTO st_itab WHERE a~kappl = I_KAPPL AND a~kschl = I_KSCHL AND a~matnr = I_MATNR AND a~datab = I_DATE. SELECT SINGLE p~kbetr p~konwa FROM konp AS p INTO st_itab_konp WHERE p~knumh = st_itab-knumh AND p~kappl = st_itab-kappl. IF sy-subrc = 0. e_kbetr = st_itab_konp-kbetr. e_konwa = st_itab_konp-konwa. ENDIF. ENDFUNCTION.
ZMA_F_GET_PRICE_BYMATNR_DATES
Import Parameters:
I_KAPPL
TYPE
KONH-KAPPL
Application
I_KSCHL
TYPE
KONH-KSCHL
Condition type
I_PLTYP
TYPE
A699-PLTYP
Price list type
I_MATNR
TYPE
MARA-MATNR
Material Number
I_DATE
TYPE
KONH-DATAB
Valid-From Date
Export Parameters:
E_KBETR
TYPE
KONP-KBETR
Rate (condition amount or percentage) where no scale exists
E_KONWA
TYPE
KONP-KONWA
Rate unit (currency or percentage)
E_DATAB
TYPE
SY-DATUM
Valid-From Date
E_DATBI
TYPE
SY-DATUM
Valid-To Date
FUNCTION zma_f_get_price_bymatnr_dates. *“———————————————————————- *”*“Local Interface: *” IMPORTING *“ REFERENCE(I_KAPPL) TYPE KONH-KAPPL *” REFERENCE(I_KSCHL) TYPE KONH-KSCHL *“ REFERENCE(I_PLTYP) TYPE A699-PLTYP *” REFERENCE(I_MATNR) TYPE MARA-MATNR *“ REFERENCE(I_DATE) TYPE KONH-DATAB *” EXPORTING *“ REFERENCE(E_KBETR) TYPE KONP-KBETR *” REFERENCE(E_KONWA) TYPE KONP-KONWA *“ REFERENCE(E_DATAB) TYPE SY-DATUM *” REFERENCE(E_DATBI) TYPE SY-DATUM *“———————————————————————- TYPES: BEGIN OF ty_itab, knumh LIKE konp-knumh, kappl LIKE konp-kappl, datab LIKE sy-datum, datbi LIKE sy-datum, END OF ty_itab. DATA: st_itab TYPE ty_itab. TYPES: BEGIN OF ty_itab_konp, kbetr LIKE konp-kbetr, konwa LIKE konp-konwa, END OF ty_itab_konp. DATA: st_itab_konp TYPE ty_itab_konp. TYPES: tt_itab TYPE STANDARD TABLE OF ty_itab. DATA: itab TYPE tt_itab. SELECT SINGLE a~knumh a~kappl a~datab a~datbi FROM a699 AS a INTO st_itab WHERE a~kappl = i_kappl AND a~kschl = i_kschl AND a~pltyp = i_pltyp AND a~matnr = i_matnr AND a~datab = i_date. SELECT SINGLE p~kbetr p~konwa FROM konp AS p INTO st_itab_konp WHERE p~knumh = st_itab-knumh AND p~kappl = st_itab-kappl. IF sy-subrc = 0. e_kbetr = st_itab_konp-kbetr. e_konwa = st_itab_konp-konwa. e_datab = st_itab-datab. e_datbi = st_itab-datbi. ENDIF. ENDFUNCTION.
ZMA_F_GET_PRICE_BYMATNR_DATES2
Import Parameters:
I_KAPPL
TYPE
KONH-KAPPL
Application
I_KSCHL
TYPE
KONH-KSCHL
Condition type
I_PLTYP
TYPE
A699-PLTYP
Price list type
I_MATNR
TYPE
MARA-MATNR
Material Number
I_DATE
TYPE
KONH-DATAB
Valid-From Date
Export Parameters:
E_KBETR
TYPE
KONP-KBETR
Rate (condition amount or percentage) where no scale exists
E_KONWA
TYPE
KONP-KONWA
Rate unit (currency or percentage)
E_DATAB
TYPE
SY-DATUM
Valid-From Date
E_DATBI
TYPE
SY-DATUM
Valid-To Date
FUNCTION ZMA_F_GET_PRICE_BYMATNR_DATES2. *”———————————————————————- *“*"Local Interface: *” IMPORTING *“ REFERENCE(I_KAPPL) TYPE KONH-KAPPL *” REFERENCE(I_KSCHL) TYPE KONH-KSCHL *“ REFERENCE(I_PLTYP) TYPE A699-PLTYP *” REFERENCE(I_MATNR) TYPE MARA-MATNR *“ REFERENCE(I_DATE) TYPE KONH-DATAB *” EXPORTING *“ REFERENCE(E_KBETR) TYPE KONP-KBETR *” REFERENCE(E_KONWA) TYPE KONP-KONWA *“ REFERENCE(E_DATAB) TYPE SY-DATUM *” REFERENCE(E_DATBI) TYPE SY-DATUM *“———————————————————————- TYPES: BEGIN OF ty_itab, knumh LIKE konp-knumh, kappl LIKE konp-kappl, datab LIKE sy-datum, datbi LIKE sy-datum, END OF ty_itab. DATA: st_itab TYPE ty_itab. TYPES: BEGIN OF ty_itab_konp, kbetr LIKE konp-kbetr, konwa LIKE konp-konwa, END OF ty_itab_konp. DATA: st_itab_konp TYPE ty_itab_konp. TYPES: tt_itab TYPE STANDARD TABLE OF ty_itab. DATA: itab TYPE tt_itab. SELECT SINGLE a~knumh a~kappl a~datab a~datbi FROM a650 AS a INTO st_itab WHERE a~kappl = i_kappl AND a~kschl = i_kschl "AND a~pltyp = i_pltyp AND a~matnr = i_matnr AND a~datab = i_date. SELECT SINGLE p~kbetr p~konwa FROM konp AS p INTO st_itab_konp WHERE p~knumh = st_itab-knumh AND p~kappl = st_itab-kappl. IF sy-subrc = 0. e_kbetr = st_itab_konp-kbetr. e_konwa = st_itab_konp-konwa. e_datab = st_itab-datab. e_datbi = st_itab-datbi. ENDIF. ENDFUNCTION.
I hope it can help you in your projects. If you have any questions or comments, please do not hesitate to write http://bit.ly/2idBdZb #SAP #SAPCloud #AI