Register Login

CX_HRPA_VIOLATED_PRECONDITION error in SET_FRAMEWORK method

Updated May 19, 2018

CL_HRPA_MASTERDATA_FACTORY

Hello SAP Experts,

In the class CL_HRPA_MASTERDATA_FACTORY, the SET_FRAMEWORK method gives an exception error of type CX_HRPA_VIOLATED_PRECONDITION.

Please tell me how can I avoid this error.


Comments

  • 13 Feb 2017 1:40 pm Chandan Singh Parihar Helpful Answer

    The class CL_HRPA_MASTERDATA_FACTORY responsibility is to initialize the accesses to the infotype framework. This class at present recognize two different framework

    1.  The first one is the old framework which is based on the 'PS buffer' of SAPFP50P.
    2.  The second is the new framework which is based on the buffer IF_HRPA_MASTERDATA_BUFFER (typically using the implementation CL_HRPA_MASTERDATA_BUFFER).

    If the class CL_HRPA_MASTERDATA_FACTORY repeatedly gets initialized then a termination occur since there can be only one buffer.

    The above-mentioned error occurs frequently if the class before the first call is not explicitly initialized. Then the class by default select IF_HRPA_MASTERDATA_BUFFER.

  • 13 Feb 2017 1:41 pm Sugandh Helpful Answer

    The above error can also occur if some programs do not correctly evaluate the CE main switch and attempt to initialize both frameworks.

    Therefore in order to determine how the class is initialized please set a breakpoint in the methods CLASS-CONSTRUCTOR and SET_FRAMEWORK of the class CL_HRPA_MASTERDATA_FACTORY and also view the call hierarchy (call stack) in the debugger. An empty class constructor can also be designed specifically in order to enable the breakpoint to be set.

    And to see how the CE main switches are set it is recommended and most convenient to check the class CL_HRCE_MASTERSWITCHES using transaction SE24. The attributes are the main switches. This method is most preferred for searching through the table T77S0 because the class PER DEFINITION always returns the correct switch values.

  • 13 Feb 2017 1:42 pm Sushma Helpful Answer

    This error can be solved by ensuring the CE main switches are set or evaluated correctly. And if the main switches are not a problem then the programs involved must be corrected. This can be done by adding a 'PERFORM do_nothing(sapfp50p)' instruction for the event LOAD-OF-PROGRAM.


×