Tuesday, August 20, 2013
Function module HRCM_ORGUNIT_EMPLOYEE_LIST_GET is used to get the list employees under one org.Unit.
Function module HRCM_ORGUNIT_EMPLOYEE_LIST_GET is used to get the list employees under one org.Unit.
REPORT ZTEST_PRG1. DATA PLVAR TYPE PLOG-PLVAR. DATA OTYPE TYPE PLOG-OTYPE. DATA OBJID TYPE PLOG-OBJID. DATA BEGDA TYPE SY-DATUM. DATA ENDDA TYPE SY-DATUM. DATA PATH_ID TYPE T778A-WEGID. DATA PERNR_TABLE TYPE STANDARD TABLE OF HRPERNR. DATA LS_PERNR_TABLE TYPE HRPERNR. PLVAR = '01'. OTYPE = 'O'. OBJID = '10501076'. "Org Unit BEGDA = SY-DATUM. ENDDA = SY-DATUM. PATH_ID = 'O-S-P'. CALL FUNCTION 'HRCM_ORGUNIT_EMPLOYEE_LIST_GET' EXPORTING PLVAR = PLVAR OTYPE = OTYPE OBJID = OBJID BEGDA = BEGDA ENDDA = ENDDA PATH_ID = PATH_ID TABLES PERNR_TABLE = PERNR_TABLE EXCEPTIONS PATH_ERROR = 1 ROOT_ERROR = 2 NO_EMPLOYEES_FOUND = 3. LOOP AT PERNR_TABLE INTO LS_PERNR_TABLE. WRITE:/ LS_PERNR_TABLE-PERNR. ENDLOOP.
Function module RH_DIR_ORG_STRUC_GET
REPORT ZTEST_PRG2. DATA ACT_ORGUNIT TYPE OBJEC-OBJID. DATA ACT_PLVAR TYPE OBJEC-PLVAR. DATA ACT_DATE TYPE SY-DATUM. DATA PERSON_TAB TYPE STANDARD TABLE OF RHLDAPP. DATA LS_PERSON_TAB TYPE RHLDAPP. ACT_ORGUNIT = '10501076'. "Org Unit ACT_PLVAR = '01'. ACT_DATE = SY-DATUM. CALL FUNCTION 'RH_DIR_ORG_STRUC_GET' EXPORTING ACT_ORGUNIT = ACT_ORGUNIT ACT_PLVAR = ACT_PLVAR ACT_DATE = SY-DATUM TABLES PERSON_TAB = PERSON_TAB EXCEPTIONS NO_ACTIVE_PLVAR = 1.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.