cancel
Showing results for 
Search instead for 
Did you mean: 

filtering user id based on condition

Param_Dayal1
Explorer
0 Kudos
I have one requirement in NWBC Tcode at the time of creating request we have to filtering user id (SAPTECH ID) based on some filtering condition. And those id which will fulfill the filtering criteria will be shown in the below screen shot .After debugging I have found class CL_GRAC_USER_REP  and method SEARCH_USER where I can do the enhancement .But at the time doing implicit enhancement when we put break-point inside ENHANCEMENT and END ENHANCEMENT the control is not going to that position. So my question is that is there any other way to do it.Any expert suggestion.

Regads,

Abhishek Bhowmik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Abhishek,

You can achieve this requirement by using the BADI BADI_GRAC_REP_OBJECT to filter the users synced to the GRC repository, see SAP note 1960807 for further information. When searching users in the access request, they will be searched in the GRC repository tables in case your user search data source is a SAP system. In case of LDAP it is depending on SPRO parameter 2050. If you want to enable real-time LDAP search, you can use custom objectclass attributes to filter the search results, see example in

Best Regards,

Zoltan

Param_Dayal1
Explorer
0 Kudos

Hi Zoltan,

I have checked tcode se18 and se19 for BADI implementation but in our GRC system BADI_GRAC_REP_OBJECT is not available .And another thing to let you know as I have tried on to enhance method SEARCH_USER of class CL_GRAC_USER_REP to implement the filtering condition on 'SAPTECH ID' but I have failed to do. For alternative I have checked the method "SEARCH" of component "GRFN_UI_BROWSE_COLLECT"  is it possible to do enhancemnt here??To write down the filtering condition ?on Iternal table LT_QUERY_DATA as it is populating all SAPTECH* related id's?? because SEARCH_USER method returnig all SAPTECH id using RT_USER internal table to component

"GRFN_UI_BROWSE_COLLECT".Please suggest.

Regards,

Abhishek Bhowmik

Former Member
0 Kudos

Hi Abhishek,

Depending on your GRC SP level you might need to implement SAP note 1960807 to get the BADI to filter users during the repository sync.

Regards,

Zoltan

Param_Dayal1
Explorer
0 Kudos

Hi Zoltan,

We are not doing filter users during the repository sync.We have below filtering condition  for  user id 'SAPTECH ID' to show in the attached screen shot :



1.requested with valid to date expired ( in past)

and requested with valid to date active but request cancelled -- should show

2.pending for approval with already past date

should show

these filtering condition we want to write for display on above screen shot list.Only those 'SAPTECH ID' which are maintain that filtering condition will be shown.These 'SAPTECH ID 'could fetch from GRC repository or LDAP .is BADI_GRAC_REP_OBJECT is ok for writing the logic?

Param_Dayal1
Explorer
0 Kudos

Hi Zoltan,


BADI BADI_GRAC_REP_OBJECT is not working because here ET_USER of interface IF_GRAC_REP_OBJECT_FILTER~EXCLUDE_USER not populating any data.Please suggest.

Regards,

Abhishek

sharad_parasher
Advisor
Advisor
0 Kudos

Hi Abhishek,

The data that you are trying to modify is accessible in search method of component , GRFN_UI_BROWSE_COLLECT and hence modification of this method would serve the purpose . However you need to ensure that the enhancement is valid only when its being called from the access request component , ( you can do a where used check to see that , GRFN_UI_BROWSE_COLLECT is called from various components of access control.)

Regards, Sharad

Param_Dayal1
Explorer
0 Kudos

Hi sharad,

1.Thanx for your reply.I thought of doing enhance over there in GRFN_UI_BROWSE_COLLECT there one internal table

LT_QUERY_DATA which is populating data.But if is there any badi thn the task will be easy.do you have any information is there any BADI available??

2.could you please explain wht did you mean by this line "However you need to ensure that the enhancement is valid only when its being called from the access request component"???

Regards,

Abhishek Bhowmik

sharad_parasher
Advisor
Advisor
0 Kudos

Hi Abhishek,

I am not aware of a BADI that fits this requirement.

Regarding , the comment on which youre seeking the clarification --- Please make sure that the enhancement that you perform is applicable only when the calling method is the from access request webdynpro component and not other components. This would ensure that the changes don't effect the behavior of other parts of the application. Browse and collect is called from various other components as well , which you can check by doing a where used check.

Regards, Sharad

Param_Dayal1
Explorer
0 Kudos

Thanx Sharad...thanx for the info..One more question Inside the component GRFN_UI_BROWSE_COLLECT there is one method name SEARCH inside component controller.How to enhance this method can you please suggest.

Regards,

Abhishek Bhowmik

sharad_parasher
Advisor
Advisor
0 Kudos

Hi Abhishek , please see this link , Enhancing the WebDynpro Component and Methods - Web Dynpro ABAP - SCN Wiki

Regards , sharad

Param_Dayal1
Explorer
0 Kudos

Thanx sharad thank you very much..I got that