Class CL_HRPA_MOLGA: This class provides methods to retrieve employee MOLGA through personnel area or employee number. e.g. method READ_MOLGA_BY_PERSA retrieves employee molga through personnel area.
Category: Useful Class/Function Module
ABAP: ALV using class CL_SALV_TABLE
Here is a sample code to create a simple ALV report.
Continue reading ABAP: ALV using class CL_SALV_TABLEABAP: List of useful HCM functions
Here is a list of SAP standard useful HCM functions.
Continue reading ABAP: List of useful HCM functions
ABAP HCM Function: Employee hiring/leaving date
HR_HIRING_DATE: Employee hiring date;
HR_LEAVING_DATE: Employee leaving date.
ABAP function to read OM object text
Functions below can be used to read text of OM object, from table HRP1000.
RH_READ_HRP_OBJECT_TEXT
HR_READ_FOREIGN_OBJECT_TEXT
Class to declare container
Classes to declare containers: cl_gui_splitter_container and cl_gui_custom_container.
Class/Function for date computation
Class CL_HRPAD_DATE_COMPUTATIONS.
Use FM DATE_CHECK_PLAUSIBILITY: Check if date is valid.
Convert internal date to output format according user’s config
Use FM CONVERT_DATE_TO_EXTERNAL to convert data from internal format, to user format.
FORM convert_date_format
USING
value(p_internal_format) TYPE datum
CHANGING
p_external_format TYPE char10.
CLEAR p_external_format.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = p_internal_format
IMPORTING
date_external = p_external_format
EXCEPTIONS
date_internal_is_invalid = 1
others = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
How to check if date is valid
Have you ever had problems when working with a date value? Use FM DATE_CHECK_PLAUSIBILITY to validate if value you have is a valid date.