Application Development 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: 

Structural authorization - creation of employee number in webdynpro or abap

Former Member
0 Kudos

Hello Experts,

We are facing some problems with the combination of structural authorizations and the creation of a new employee.

When we use PA40 to create a new employee this does not give any problem.

In the webdynpro we first execute a call transaction PA40 to apply infotype 0000 and 0001. This works well.

Except that the call transaction does not set the connection between PA and OM. (so we did program this ourselves)

In PO13 and the table HRP1001 the same relations are made as when we use PA40 in the sap gui.

After this we do call transactions PA30 for the next infotypes.

When we check the SU53 it gives a message: problems with structural authorizations object P (with the employeenumber) starting at 01.01.1800, enddate is empty.

The employee is manager and connected with his userid in infotype 0105.

We use in the structural profile the function module RH_GET_MANAGER_ASSIGNMENT

We checked with transaction HRHAUTH.

User has been adjusted to the tables T77UA etc.

We do not use workflow in this webdynpro

We used the trace function when this was executed, but it did not give more information about missing structural authorizations.

This issue was before on SDN () but unfortunally there was no solution there for the issue!

Hope one of you can help me to find the solution!

With kind regards,

Rita Mensink

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rita,

Please try following:

Use transaction RE_RHAUTH00 (report RHAUTH00) and give the user id of the manager. Leave profile empty (will pick all profiles assigned to the manager) and as a date put the date what would be the start date of hiring of the new employee. Both the employee object and position object should be listed in the results with "X" on column M (Maintenance) and in the validity period.

If that is not the case you need to adjust the structural profile or the manager might be in the buffering table (T77UU) which means that structural authorisation results are buffered to index table. In this case you need to run RHBAUS00 for the manager user id to update the indexed structural authorisations and then try to run RHAUTH00 again to check if anything changed.

Regards,

Saku

5 REPLIES 5

Former Member
0 Kudos

Hi Rita,

Please try following:

Use transaction RE_RHAUTH00 (report RHAUTH00) and give the user id of the manager. Leave profile empty (will pick all profiles assigned to the manager) and as a date put the date what would be the start date of hiring of the new employee. Both the employee object and position object should be listed in the results with "X" on column M (Maintenance) and in the validity period.

If that is not the case you need to adjust the structural profile or the manager might be in the buffering table (T77UU) which means that structural authorisation results are buffered to index table. In this case you need to run RHBAUS00 for the manager user id to update the indexed structural authorisations and then try to run RHAUTH00 again to check if anything changed.

Regards,

Saku

0 Kudos

Hi Saku,

Thanks for your answer. I did try it, but it did not give another reaction.

With kind regards,

Rita

0 Kudos

Hi Rita,

Were the new employee number (object type P) and position number (object type S) the employee was supposed to be assigned listed in RHAUTH00?

Regards,

Saku

PS. I am not sure if OM/PA integration is not happening because of CALL TRANSACTION in ABAP or is it just not setup in HR. Check table T77S0 and PLOGI / ORGA if there is value X. There is also stardard ABAP programs which SAP has created to keep OM and PA in sync. Those start with RHINTE* and RHINTE00 looks like it is fixing PA/OM issues. Maybe that can't be used as it is but might give tips if there is some good function modules etc to use in your custom program.

Edited by: SaQ on Nov 4, 2010 10:38 AM

0 Kudos

Hi Saku,

The integration between PA and OM was allready set (T77S0)

It is certain there is a difference between SAP gui PA 40 adn call transaction PA40.

Therefore we did allready program ourself that the correct entrys are made in tabel HRP1000 and HRP1001.

AFter your suggestion I did anothe PA40 in the sapgui (hiringdate 10.11.2010). Afterwards I see the entry for this this personel number directly back in table T77UA.

When I doe this with aour program, the integration between PA and OM is set, but for this personnelnumber I do no see directly the number back in T77UA.

I'll try to see where that setting is made.

Thanks!

Rita

Former Member
0 Kudos

Hi.

After 2½ days of frustration I finally nailed this.

Function group RHAC, that handles the authority checks, initially buffers a table called VIEW containing all objects available for the user. As stated earlier in this conversation, SAP handles creation of relations in HRP1001 (links PA and OM). At this point the new employee number is appended to buffered table VIEW in function group RHAC.

When execution the PA40 activity through CALL TRANSACTION, the creation of the relations are not handled - and the same goes for updating the buffered table VIEW. The table can be updated using the function module RH_VIEW_ENTRY_INSERT from the same fundtion group:

This example might be useful


  data: ls_view_entry type hrview,
        ls_related_object type hrobject.

  ls_view_entry-plvar = '01'.
  ls_view_entry-otype = 'P'.
  ls_view_entry-objid = lv_pernr.
  ls_view_entry-begda = '18000101'.
  ls_view_entry-endda = '99991231'.
  ls_view_entry-maint = 'X'.

  ls_related_object-plvar = '01'.
  ls_related_object-otype = 'S'.
  ls_related_object-objid = lv_ny_objid.

  call function 'RH_VIEW_ENTRY_INSERT'
    exporting
      view_entry     = ls_view_entry
      related_object = ls_related_object.

Best regards

Poul Steen Hansen

Senior Technical Consultant

EDB Consulting Group A/S, Denmark