Show TOC

  Reading Features

Use

Standard business logic, when required, uses class CL_HRPA_FEATURE to read features; the method that calls this class, shown in the example below, is much shorter than the corresponding function modules.

Example Example

CALL METHOD cl_hrpa_feature=>get_valueEXPORTING feature = 'IVWID' struc_content = pme04IMPORTING return_value= viekn.

End of the example.

Class CL_HRPA_FEATURE conforms with the exception handling principles described previously. However, under certain circumstances, exception handling may not be appropriate – for example, if you wish to explicitly ignore cases in which the feature cannot be read. In such cases, we recommend that you instead employ the business logic shown in the following example, which does not conform with the exception handling principles cited here, but which does conform with standard processing.

Example Example

CALL METHOD cl_hrpa_feature=>get_value EXPORTING feature = feature_name struc_content = pme01 IMPORTING return_value= varky.CATCH cx_hrpa_invalid_feature.CLEAR varky.

End of the example.