cancel
Showing results for 
Search instead for 
Did you mean: 

STS user assignment via BADI not working

Former Member
0 Kudos

Hi everyone,

I'm using an implementation of the BADI UPS_NAME_RESOLVE to have SAP usernames mapped to cost centers in a hierarchy so they become their responsibility, and debugging shows that the usernames do get recognized by STS.

Unfortunately, the assignment doesn't seem to work. The only point where the BADI gets called is when assigning it to the hierarchy in STS, but if I leave the responsible person fields in the STS customizing blank, the STS welcome page for the planning users will not contain any planning tasks.

Am I missing something? Thanks for any help.

Regards,

Tilman

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

did you get it working?

I am intending to use UPS_NAME_RESOLVE as well, but dont know how yet. You got any infos you could share.

Thanks in advance.

Greetings,

Martin

Former Member
0 Kudos

Hi Martin,

I got it to work. What you need is to create a BADI via SE19 based on UPS_NAME_RESOLVE, then add a line to the table UPS_NAME_RESOLVE and use this as a filter value when creating the Badi. Once you have completed programming, you select your filter value when assigning a hierarchy in STS.

Regards,

Tilman

former_member187400
Active Contributor
0 Kudos

Hi Tillman,

If you don't mind ..

I've tried like you mention ..

1. Create the implementation based on UPS_NAME_RESOLVED.

2. Setup the filter

But i'm distracted when go to the method, what code should i make there ?

I mean the objective from the corresponding code ?

Do you have the sample code ? / any article/tutorial regarding this case please ??

I really blank regarding setup the status and tracking..

Best regards,

Niel.

Former Member
0 Kudos

Hi,

what the BADI basically does is fetching all the entries of the BW hierarchy and providing a return list where to map SAP users to, so you'd probably be looping over the hierarchy list and adding entries to the return list when appropriate:

DATA: wa_hier TYPE UPC_YS_HIE_STR,

wa_map TYPE UPS_YS_RESOLVE.

  • Loop over the BW hierarchy

LOOP AT IT_HIERARCHY INTO wa_hier.

  • Put your code here which compares wa_hier-CHANM, wa_hier-NODENAME and table wa_hier-TO_CHADEP (compound chars) to something and then relates to is via wa_hier-NODEID

  • If matching found

wa_map-nodeid = wa_hier-NODEID.

wa_map-name = someusername.

APPEND wa_map TO ET_RESOLVE.

ENDLOOP.

Hope this is helping. To find out your setup, I'd just create a blank Badi and then set a breakpoint a start debugging just to see what's being passed over.

Regards

Tilman

former_member187400
Active Contributor
0 Kudos

Thanks a lot Tilman ..

It's very helpfull.

One more question, can status & tracking system give the information regarding the history of plan data ??

e.g. like the information for created by whom, when was it created ?? Or STS only the system like workflow ..

Thanks a lot Tilman.

Regards,

Niel.

Former Member
0 Kudos

Hi Niel,

STS will track the history of status changes (when and by whom was planning opened, closed, reviewed...), but to track who made actual changes to plan data you need to rely on BPS/IP. Some threads in this forum cover this topic, the general idea appears to be adding some unique ID and the username to the plan data.

Regards,

Tilman