Hi,
We are using BAPI - BAPI_PTMGRATTABS_MNGCREATION it is working fine but at times it is giving exception from Class - CL_HRPA_INFOTYPE_FACTORY and method - SET_CONTEXT ( cx_hrpa_violated_precondition) and giving dump.. When it raise exception variable a_context value is having value and raising exception.. Please advice what can be the issue...
METHOD set_context.
IF a_context IS INITIAL.
CASE context.
WHEN context_default OR
context_legacy.
a_context = context.
WHEN OTHERS.
RAISE EXCEPTION TYPE cx_hrpa_invalid_parameter
EXPORTING
parameter = 'CONTEXT'.
ENDCASE.
ELSE.
* context must never be set twice
RAISE EXCEPTION TYPE cx_hrpa_violated_precondition.
ENDIF.
Regards,
Rajesh