cancel
Showing results for 
Search instead for 
Did you mean: 

BaDI WF_SUBSTITUTE seems no have no effect on the UI of the UWL

Lukas_Weigelt
Active Contributor
0 Kudos

Hello folks,

I'm not entirely sure whether the Workflow Subforums wouldn't be a better place to post this, but I'll give it a shot here first.

System Information:

NW AS 7.03 ABAP Stack 731 Level 11, ECC 606 (EHP 6) with SAP_HR 604 Level 73 and EA_HR 607 (HR-Renewal 1) Level 24

NW AS 7.02 JAVA Stack 702 Level 13

Background:

We are using the Universal Worklist for our Workflow based Business Scenarios of the Leave Request and Travel Request (both WDA), up until now without the Substitution function. However, we now want to implement and use the Subsitution function according to our business needs. At the moment I'm using this awesome wiki FAQs on Substitution functionality in UWL - Netweaver Technology - SCN Wiki by (I hope I tagged the correct Person..) --> Many Kudos to you, Sir - and am now in the process of implementing the BADI WF_SUBSTITUTE.

Problem:

The Method IF_EX_WF_SUBSTITUTE~RESTRICT_PROFILES can supposedly be used to restrict the Substitution Profiles which can be selected from the Drop-Down Box in the Subsitution Manager. I've played around with the BADI testing its functionality before actually coding what we need, i.e. at the moment I just statically delete two entries from the internal table PROFILES:


DELETE profiles WHERE profile EQ 'ZLEAREQ'.

DELETE profiles WHERE profile EQ 'ZTRVREQ'.

While Debugging, I can see that the BADI is called, my coding has effect and the business logic adapts it until the RFC-Control is handed back to the WDJ, i.e. I can see throughout all Levels of the callstack, that my coding has had the wanted/expected effect on the internal table. However, the UI, i.e. the DropdownBox in the WDJ apparently doesn't care much about that, because all entries as per configured in the customizing are shown, including those I have (theoretically) suppressed/deleted in the BADI.

What I tried so far / Analysis:

Manual SAP Note search, ANST, SAPxSearch (found some Threads similar to my problem that were however locked with no solution provided).

EDIT: I've also cleared my local Browser Cache, My local JAVA Cache and the UWL Cache in the Portal System Administration to rule out a cache problem.

Has anybody ever had a similar problem?

Cheers, Lukas

Message was edited by: Lukas Weigelt

Message was edited by: Lukas Weigelt

Accepted Solutions (1)

Accepted Solutions (1)

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

so BADI is not controlling the search help? http://scn.sap.com/thread/1890679 http://scn.sap.com/thread/3441686  UWL does not store the substitution rules, but it rather calls all of the configured UWL connectors to create/modify/delete/retrieve, i.e. to maintain the substitution rules. Having this in mind, it is recommended to maintain the substitution rules only from UWL in order to avoid inconsistencies. If a user needs to remove a substitution rule, s/he should remove it from UWL and not from each backend system. If the deletion of the substitution rule from portal fails for some reason, we should further investigate why it failed and search for a solution. The DB table  KMC_WF_SUBSTITUTE is the table, where the UWL AdHocConnector stores its substitution rules.

As we could not eliminate the 'ALL' profile from Manage Substitutions on the UWL, we ensured that the 'ALL' profile populates field REPPR in table: HRUS_D2 rather than leaving it blank. We implemented it in BADI WF_SUBSTITUTE & method: Maintain_substitute with a :

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

UWL supports a filtering of the users, which are shown in UWL's people pickers by using the company concept. This is functionality is described in the UWL documentation: http://help.sap.com/saphelp_nw73/helpdata/en/69/308ce1972f4741bbe00c71d8 e5908f/content.htm In order to make use of the filtering mechanism, you would need to apply SAP Note 1722031 and follow the instructions in the UWL documentation.

Lukas_Weigelt
Active Contributor
0 Kudos
so BADI is not controlling the search help?


So it seems, although the BADI's Method IF_EX_WF_SUBSTITUTE~RESTRICT_PROFILES is there to exactly do that. The IMG documentation states that the Method is there to restrict the list of substitution profiles. So, either I'm missing something else or this is a problem in standard.


UWL does not store the substitution rules, but it rather calls all of the configured UWL connectors to create/modify/delete/retrieve, i.e. to maintain the substitution rules. Having this in mind, it is recommended to maintain the substitution rules only from UWL in order to avoid inconsistencies.


Yepp, don't worry, I know it's a bad idea to update HRUS_D2 directly . However we have a misunderstanding, I'm not talking about Substitution Rules, I'm talking about the Substitution Profiles (T77RQ) only.


We implemented it in BADI WF_SUBSTITUTE & method: Maintain_substitute with a :


What were you about to say here, this is where it got interesting ? The sentence seems to be cut off in the middle


UWL supports a filtering of the users, which are shown in UWL's people pickers by using the company concept. This is functionality is described in the UWL documentation:http://help.sap.com/saphelp_nw73/helpdata/en/69/308ce1972f4741bbe00c71d8 e5908f/content.htm In order to make use of the filtering mechanism, you would need to apply SAP Note 1722031 and follow the instructions in the UWL documentation.


We don't want to use the people picker because it gives too much power to the enduser. We want to centrally restrict profiles that can be selected for the creation of substitution rules and we want to centrally restrict the creation/deletion of the rules as well, so we really depend on that BADI 😕


Cheers, Lukas

Lukas_Weigelt
Active Contributor
0 Kudos

OK, this is getting interesting. Now it works the way I want it and the way it is documented. However, once I change the BADIs Sourcecode again, the changes are not adapted in the UI as if there was some kind of "delay" until the UI adapts it. What makes this particulary problematic is, that I intend to restrict the profiles dynamically in runtime according to the R/3-Roles of sy-uname.

EDIT: It seems to be impossible to hide the entry 'ALL', as you stated in your first reply:

As we could not eliminate the 'ALL' profile from Manage Substitutions on the UWL, we ensured that the 'ALL' profile populates field REPPR in table: HRUS_D2 rather than leaving it blank

But I don't understand what you mean with the second portion.

My problem with this, would be the following:

I have mapped the ALL-Profile with every possible dedicated process that can be used for Substitution, in our case these are only Leave Requests, Travel Requests and no-class-tasks. Let's assume a manager has the authority to create a substitution rule for Leave Requests but not for Travel Requests. What he sees in the Drop-Down Liste for the Profiles is the Profile for Leave Requests and "ALL". Process-wise nothing bad can happen because the manager will never receive travel requests, since he doesn't have the respective R3-Role, hence no such Tasks will be delegated either, but technically the "ALL" entry is mapped to classes/profiles he doesn't have authority for. Nevermind, I just found out it can be controlled with the iView-Attribute "Add ALL Substitution Profile as default" via this thread here --> http://scn.sap.com/thread/1549474

Do you happen to know technically in-depth why this might happen? It probably won't help but I'd like to understand why this happens 😕 Nevermind

Cheers, Lukas

Message was edited by: Lukas Weigelt

Message was edited by: Lukas Weigelt

Lukas_Weigelt
Active Contributor
0 Kudos

'Aight, bottom Line:

- the adaption by the UI of the BADI logic is a little slow sometimes

- the 'ALL' profile entry is completely ignored from the Customizing, it's instead statically controlled by the iView Attribute "Add ALL Substitution Profile as default" which also means, though it can't be controlled dynamically in the BADI

- if you have a lot of different processes, the profile list and the combinations required in customizing grow innumerably and become "bloated" because only one substitution profile can be used for a role at a time (this one will meet resistance on enduserside 😕 )

I'll mark the thread "assumed" answered, because my initial problem is, well, "solved", kind of. In case there are additional problems, I'll open new dedicated threads.

thanks a lot for your replies, they pointed me in the right direction, i.e. made me research the right terms

Cheers, Lukas

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks for updating that you were able to resolve the issue. If you think its not working correctly, let us know we ll check further 🙂

Answers (0)