Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
Error rendering macro 'code': Invalid value specified for parameter 'lang'
DATA:WA_OUTPUT TYPE PSEN_DURATION_DEC.
PARAMETERS:PA_DAT TYPE SY-DATUM.
PARAMETERS:PA_DAT2 TYPE SY-DATUM.
CALL FUNCTION 'HR_SEN_CRULE_0100_DURATION'
  EXPORTING
    ID_BEGDA                 = PA_DAT
    ID_ENDDA                 = PA_DAT2
  IMPORTING
    ES_DURATION              = WA_OUTPUT
  EXCEPTIONS
    CONVERSION_NOT_SPECIFIED = 1
    CONVERSION_NOT_POSSIBLE  = 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.
ELSE.
  WRITE:/ 'Years', WA_OUTPUT-CALYY  DECIMALS 0,
        / 'Months',WA_OUTPUT-CALMM  DECIMALS 0,
        / 'Days', WA_OUTPUT-CALDD   DECIMALS 0.
ENDIF.