cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hide or Show Process template based on roles for Consolidation & Manage Mass Process

Rishav2727
Explorer
0 Kudos
819

how to Hide or Show Process template based on roles in MDCIMG Process template for Consolidation & Manage Mass?

Process step has functionality to provide authorization group for each step but I need to restrict process template based on role.

Accepted Solutions (0)

Answers (2)

Answers (2)

jaiedixit
Newcomer
0 Kudos

Introduction: 

When we are trying to create/change BP or material from consolidation and mass processing from MDG using 'Import data for consolidation' and 'manage mass processes', we get a drop down with process templates listed. This list contains all the standard and custom process templates in the system particular to a data model. We will try to restrict the unwanted process templates from showing in the drop down using roles.

Solution:

Step 1: Create roles for supplier, customer and material.

Go to t-code 'pfcg' and create roles.

image.png

Assign user ids to the role and save.

image.pngStep 2: Create a BRF decision table which will hold the roles and the process templates that to be accessed by those roles. 

image.png

 Step 3: Write code for restriction of templates.

Class name: CL_MDC_PROCESS_DPC_EXT

Method name: DATAPROCESSTEMPL_GET_ENTITYSET

Create an enhancement or a post exit and write code using following logic.

***Fetch role for user id using table agr_users and sy-uname.

***Fetch data from BRF decision table.

***In et_entityset you will find all the process templates related to the data model and process. Use role and decision table to restrict other process templates.

Note: The same class and method will be triggered for both the data models(BP and MM) for mass create and mass change scenarios.

I hope you find this helpful! 🙂

mines
Participant
0 Kudos

Hi ,

Could you please help.

How did you achieved this particular requirement?