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

Employee Existence Check Report - HR ABAP

REPORT zhr_emp_check.

DATA : l_pernr TYPE pa0000-pernr.
DATA : l_return TYPE bapireturn.
DATA : l_count TYPE char04.
DATA : w_pa0000 TYPE pa0000.
SELECT-OPTIONS : s_pernr FOR l_pernr.

START-OF-SELECTION.
break abaper.
IF s_pernr-option EQ 'EQ'.
LOOP AT s_pernr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_pernr-low
IMPORTING
output = s_pernr-low.

*break abaper.

CALL FUNCTION 'BAPI_EMPLOYEE_CHECKEXISTENCE'
EXPORTING
number = s_pernr-low
IMPORTING
return = l_return.

IF l_return IS NOT INITIAL.
WRITE : /5 s_pernr-low, 20 'Person Do not Exist'.
ENDIF.
CLEAR l_return.

ENDLOOP.
ELSEIF s_pernr-option EQ 'BT'.
l_count = s_pernr-high - s_pernr-low.

WRITE:/1(45) sy-uline.

WRITE: /1 sy-vline,
4 'Employee No',
15 sy-vline,
20 'Status' ,
45 sy-vline.

WRITE:/1(45) sy-uline.

DO l_count TIMES.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_pernr-low
IMPORTING
output = s_pernr-low.

*break abaper.

CALL FUNCTION 'BAPI_EMPLOYEE_CHECKEXISTENCE'
EXPORTING
number = s_pernr-low
IMPORTING
return = l_return.

IF l_return IS NOT INITIAL.

WRITE: /1 sy-vline,
4 s_pernr-low,
15 sy-vline,
20 'Person Do not Exist' ,
45 sy-vline.
ELSEIF l_return IS INITIAL.
WRITE: /1 sy-vline,
4 s_pernr-low,
15 sy-vline,
20 'Person Exists' ,
45 sy-vline.
ENDIF.
s_pernr-low = s_pernr-low + 1.
CLEAR l_return.


ENDDO.

WRITE:/1(45) sy-uline.

ENDIF.


ALSO READ:

- Send Employee Payslip As An E-Mail Attachment.

- Time Quota For An Employee In HR ABAP.

- Employee Deduction Report In HR ABAP.

- Comparison Report For The Employee Salaries In HR ABAP.

- Cash Payment Report In HR ABAP.

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

.....Back To MAIN INDEX.


No comments:

Post a Comment