cancel
Showing results for 
Search instead for 
Did you mean: 

combinig user roles and order type to filter orders

Former Member
0 Kudos

Hi masters, I have a doubt and need your help to drive me to the correct solution.


I have an application in SAP MII 12.2.2 where the users should process their production orders. The problem is that everybody can open and execute every process order without any filter.


Now we have to implement a filter by order type (AUART), what kind of solution do you recomend for me ?


To simplify the user administration I thought in use UME roles but I don´t know where I can persist the order types (AUART) of each role.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just an idea,

You can define AUART as custom attribute and map it with UME roles.

based on login role you can restrict the view or restrict the processing of other type orders.

Regards

Anshul

Former Member
0 Kudos

Hi Anshul, thank you for your answer.

This should be the more easly solution, but have 2 limitations if I use custom attributes:

* if the users have more than one UME roles, the custom attribute will be replaced and I need all the AUARTs of every roles, my users can have several roles.

* each role should have several AUARTs and the custom attribute can define just 1 single value (so I still could use this single value to define an array of strings as a work around like "AUART1;AUART2;AUART3")

former_member185280
Active Contributor
0 Kudos

If I were going to use the UME for this I would probably just create roles for each order type using a consistent naming convention like 'ZMII_AUART_PMO1' and parse out the order types from the users role list at runtime. If you have consistent groupings of types for your users you can create some groups in the UME to simplify Role assignment. 

Former Member
0 Kudos

Hi christian libich, I have started implementing your idea, and now I have planned all the roles and groups, so it comes the first doubt... how to get the user roles dinamically within the BLS MII Transaction ? Should I create a java custom action or is there a better way ?

former_member185280
Active Contributor
0 Kudos
  • Get the values by creating a Transaction input parameter {IllumLoginRoles}
  • Use an xmlQuery to get the roles from the property access servlet with a url like 'server://XMII/PropertyAccessServlet?Mode=List&Content-Type=text/xml'
  • Establish a Datasource connection to the Netweaver database and query the UME tables directly
  • If your list isn't to big, you might be able to create wrapper objects with roles assigned.
  • Custom action hitting the Netweaver security API.
  • Use SSO and let the SAP Admin deal with it somehow.
Former Member
0 Kudos

Hi Christian, Austin and everybody, thank you for your answers.

I think this is the more performatic solution:
•Establish a Datasource connection to the Netweaver database and query the UME tables directly

So I am trying to establish the datasource connection, to achieve this do I have to configure a SAP MII data server of type IDBC ?

taking into account that my database is a db2 database, the JDBC driver com.inet.tds.TdsDriver should work ?

If somebody has a server url sample, I will apreciate if you could share it.

Former Member
0 Kudos

please forget my last questions, I have just established the DB2 database connection.

now the difficult is to understand the UME tables

Former Member
0 Kudos

with this query I can get the ID of some user

SELECT PID FROM sapmiddb.UME_STRINGS where ATTR = 'j_user' and val = 'michel'


with this query I can get the id of some role:

SELECT * FROM sapmiddb. UME_STRINGS where attr = 'uniquename' and val ='F_DRJ_PPA_OPERADOR_PESAGEM'


which is the table to get the roles of a specific user ?

Former Member
0 Kudos

so I found the solution using your ideas

Answers (3)

Answers (3)

austin_jacob
Explorer
0 Kudos

Hi Michel,

Why not have a Master table where you maintain mapping of Roles against AUARTs somewhere and use it to Filter Production Orders by AUARTS, indirectly by Roles

Regards,

Austin

Former Member
0 Kudos

Hi Austin, thank you.

What do you mean with "Master table" ? Is it a simple database table or is other kind of table that I still don´t know ?

austin_jacob
Explorer
0 Kudos

Michel,

It is a simple Database table only

Regards

Austin

agentry_src
Active Contributor
0 Kudos

Hi Michel,

I suspect most of us have no idea how this would work.  Can you restrict changes for each specific Production Order on the ERP side?

Regards, Mike

Former Member
0 Kudos

Hi Michael,

I can not do that on the ERP side because the users management are on MII side using the User Management Engine (UME).

Former Member
0 Kudos

any idea ?