Google Search - Blog...........

HR ABAP - Get Employees List Working Under An Organization Unit.

report ztests.

parameters:p_objid type orgeh .

data: pernr_table type HRPERNR occurs 0 with header line .

CALL FUNCTION 'HRCM_ORGSTRC_EMPLOYEE_LIST_GET'
EXPORTING
plvar = '01'
root_otype = 'O'
root_objid = p_objid
begda = '18000101'
endda = '99991231'
TABLES
pernr_table = pernr_table
EXCEPTIONS
NO_ORGSTRUC_FOUND = 1
NO_EMPLOYEES_FOUND = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at pernr_table.
write:/ pernr_table-PERNR.
endloop.


ALSO READ:

- Retrieve Manager For An Employee.

- Generate Compensation Statement Report.

- Fetch HR Data Or Records From HR Database Tables.

- Using Macros In HR ABAP Report Program.

- Get The List Of Employees With Experience.

.....Back To Sub-Index On HR ABAP.

.....Back To MAIN INDEX.



No comments:

Post a Comment