Skip to Content
0
Former Member
Sep 08, 2007 at 12:55 AM

UNCAUGHT_EXCEPTION : CX_HRPA_VIOLATED_PRECONDITION

153 Views

Hi,

We have written a custom function module to read/create records in Custom Infotype. We are able to execute the FM using SE37 and able to read/create records in custom INFOTYPE. We get runtime errors when we try to execute the same FM using Webdynpro for JAva application. We are able to read data but not able to create records using WDJ

Error in ECC : ST22

*******************************

UNCAUGHT_EXCEPTION : CX_HRPA_VIOLATED_PRECONDITION

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.

ENDMETHOD.

***********************************

Any ideas/hints are highly appreciated

Thanks,

Kathy