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: 

table with personnel and work center

Former Member
0 Kudos
572

Hi ppl,

Is there any database table which stores the personnel number (employee number) and the work centers.

Actually, I want to find the work centers to which a personnel is allocated.

Please let me know if any table stores this relation or appropriate logic to achieve my requirement.

Thanks.

4 REPLIES 4

GauthamV
Active Contributor
0 Kudos
249

Welcome to SCN.

Use HRP1001 table.

Also you can try these FM.

RHPH_PICK_UP_PERSONS.

RH_STRUC_GET_MULTIPLE_ROOTS

Former Member
0 Kudos
249

Hi,

Use this table

HRP1001

Hope this is useful for you.

Regards,

Vijay

0 Kudos
249

Hi,

Thanks for the quick reply.

But, which field in the table HRP1001 represents the work center?

Thanks.

Former Member
0 Kudos
249

Hi,

Try with the following code.

DATA:itb_hrp1001 TYPE STANDARD TABLE OF p1001.

DATA:wa_1001 TYPE p1001.

CALL FUNCTION 'RH_READ_INFTY'

EXPORTING

plvar = '01'

otype = 'P'

objid = '1024'

infty = '1001'

subty = 'B008'

begda = '19000101'

endda = '99991231'

TABLES

innnn = itb_hrp1001

EXCEPTIONS

all_infty_with_subty = 1

nothing_found = 2

no_objects = 3

wrong_condition = 4

wrong_parameters = 5

OTHERS = 6.

IF sy-subrc EQ 0.

LOOP AT itb_hrp1001 INTO wa_1001.

WRITE: / wa_1001-objid,

20 wa_1001-sobid.

ENDLOOP.

ENDIF.