‎2009 Jun 09 3:01 PM
Hi,
I was getting that error in my program when it call the FM 'ME_PO_CONFIRM':
An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither
handled locally, nor declared in a RAISING clause
In order to solve that I tried the following TRY-CATCH structure, but what's my surprise that the exception is not catched yet and I get the same error:
TRY.
CALL FUNCTION 'ME_PO_CONFIRM'
EXPORTING
document_no = l_pedido
item = lt_item
itemx = lt_itemx
IMPORTING
return = lt_return.
CATCH CX_SY_REF_IS_INITIAL INTO lo_cx_ref_is_initial.
CALL METHOD lo_cx_ref_is_initial->if_message~get_text
receiving RESULT = l_pi_fault_data-fault_text.
RAISE EXCEPTION TYPE ZPI_CX_LO_MT_CONF_ERROR
EXPORTING standard = l_pi_fault_data.
ENDTRY.
Finally I catched the CX_ROOT exception and now the it's catched, and the program doesn't produce a dump, but I need to catch CX_SY_REF_IS_INITIAL and not CX_ROOT... what can I do?
That's the code that I got now, it works butg I need to catch the real exception:
TRY.
CALL FUNCTION 'ME_PO_CONFIRM'
EXPORTING
document_no = l_pedido
item = lt_item
itemx = lt_itemx
IMPORTING
return = lt_return.
CATCH CX_ROOT INTO lo_cx_root.
CALL METHOD lo_cx_root->if_message~get_text
receiving RESULT = l_pi_fault_data-fault_text.
RAISE EXCEPTION TYPE ZPI_CX_LO_MT_CONF_ERROR
EXPORTING standard = l_pi_fault_data.
Edited by: Marshal on Jun 9, 2009 4:02 PM
‎2009 Jul 30 2:59 PM