Skip to Content
0
Former Member
Jun 18, 2007 at 01:18 PM

Transformations conversion to ABAP OO

65 Views

Hi Gurus,

I am trying to convert one of the HR Personnel Administration (PA) update rule to Transformation. How to convert the below code to ABAP OO.

I know perform and form sub routines doesn't work in ABAP OO.

DATA: ULTIMO LIKE SY-DATUM.

IF G_RECORD_NO <> RECORD_NO.

G_RECORD_NO = RECORD_NO.

CLEAR: EMPLOYEE_MD, PERSON_MD.

CLEAR: EMPLOYEE_WA, PERSON_WA.

ENDIF.

PERFORM CALCULATE_ULTIMO

using COMM_STRUCTURE-calmonth

RECORD_NO

RECORD_ALL

SOURCE_SYSTEM

CHANGING ULTIMO

RETURNCODE.

PERFORM READ_MD_PERSON

using COMM_STRUCTURE-employee

COMM_STRUCTURE-calmonth

RECORD_NO

RECORD_ALL

SOURCE_SYSTEM

CHANGING EMPLOYEE_WA

PERSON_WA

RETURNCODE.

EMPLOYEE_MD = EMPLOYEE_WA.

PERSON_MD = PERSON_WA.

IF NOT PERSON_MD-DATEBIRTH IS INITIAL.

RESULT = ULTIMO0(4) - PERSON_MD-DATEBIRTH0(4).

IF ULTIMO4(4) LT PERSON_MD-DATEBIRTH4(4).

RESULT = RESULT - 1.

ENDIF.

ENDIF.

RETURNCODE = 0.

Best Regards,

Reddy.