Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with Fn module..

Former Member
0 Likes
668

When i debug the function module <b> HRHAP_DOC_ROLE_GET </b> from my PHAP_CHANGE trnx i'm getting some values in Static_t_role.

The code in the fn module....

STATICS: static_t_role TYPE TABLE OF s_role.

READ TABLE static_t_role INTO lw_role

WITH KEY template_id = template_id

s_object_base = s_object_base

s_object_target = s_object_target

BINARY SEARCH.

IF sy-subrc = 0.

role_id = lw_role-role_id.

It's returing previous role_id not the current one.

Cud anyone tell me ..where i hav to find the data / how to fetch the prv record ?

Rgds,

SAPUSER100.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
636

Hi,

This logic is to check if we have the target roles already available.

If we don't have the roles already there in the statics table, then we hit the databse to fetch the same.

Here is the flow logic:

<b>*----


  • Flow Logic

*----


  • SPECIAL LOGIC for DUMMY ROLES

  • e.g. all objects of a special object type get the same role

*----


  • 10 check whether we have read the TARGET object roles already

  • -> YES -> give role back

  • -> NO -> read roles from DB

  • 20 read all allowed roles on VA

  • 30 LOOP at roles and get corresponding objects

  • 40 read the current role

*----


</b>

Regards,

ravi

5 REPLIES 5
Read only

Former Member
0 Likes
637

Hi,

This logic is to check if we have the target roles already available.

If we don't have the roles already there in the statics table, then we hit the databse to fetch the same.

Here is the flow logic:

<b>*----


  • Flow Logic

*----


  • SPECIAL LOGIC for DUMMY ROLES

  • e.g. all objects of a special object type get the same role

*----


  • 10 check whether we have read the TARGET object roles already

  • -> YES -> give role back

  • -> NO -> read roles from DB

  • 20 read all allowed roles on VA

  • 30 LOOP at roles and get corresponding objects

  • 40 read the current role

*----


</b>

Regards,

ravi

Read only

0 Likes
636

Hi ravi,

I don't know where to change,I will expalin my senario..

I have two roles say 'Z1'(delg) and 'Z2' and(coacr).

In my Part appraiser Pop up window if i enter delg name i am getting 'Z1' as expected . But if enter coacr name, instead of getting 'Z2' , i'm getting 'Z1'.

The problem is both 'Z1' and 'Z2' follow the same org structure..'COLLEGUE' filter.

If i want to implnt any BADI, how ?

Pts Assured.

Rgds,

SAPUSER100

Read only

0 Likes
636

Hi,

Are you passing the parameter READ_NEW = 'X' in the function call?

Regards,

Suresh Datti

Read only

0 Likes
636

Hi Suresh,

Yes i'm passing. My both Roles are refering to the same filter 'COLLEGUE' . it returns always the first role.Is this a problem ?

Rgds,

SAPUSER100

Read only

0 Likes
636

Hi ravi,

How to find my object is of special object type ?

Pls help.

SAPUSER100