I wrote a program to create a PO using functional module and a RFC. In quality server everything working perfectly. PO also created. But after transporting to the production, a failure triggering. This is the error showing in java side. "(104) RFC_ERROR_SYSTEM_FAILURE: Exception condition "FAILURE" triggered".
This the error showing in SAP "Exception condition "FAILURE" triggered".
"RAISE_EXCEPTION"
"CL_PO_ITEM_HANDLE_MM==========CP" bzw. CL_PO_ITEM_HANDLE_MM==========CM00G
"GET_DATA"
or
"CL_PO_ITEM_HANDLE_MM==========CP" FAILURE
or
"SAPMSSY1" "FAILURE" If you cannot solve the problem yourself, please send the following information to SAP:
This is the error triggering code.
METHOD get_data. DATA: l_hash_entry LIKE LINE OF po_item_hash_table, l_ref TYPE REF TO data, l_header TYPE REF TO cl_po_header_handle_mm. FIELD-SYMBOLS: <data> TYPE mepoitem_prop. CLEAR ex_data. IF state EQ c_verify. READ TABLE po_item_hash_table INTO l_hash_entry WITH TABLE KEY item = me. IF sy-subrc NE 0. RAISE failure. ENDIF. ex_data = l_hash_entry-data. ELSEIF state EQ c_available. CALL FUNCTION 'MEPO_DOC_ITEM_GET' EXPORTING im_ebelp = po_item_number IMPORTING ex_item = ex_data EXCEPTIONS failure = 01. IF sy-subrc NE 0. >>>>> RAISE failure. ENDIF. ELSEIF state EQ c_new. * propose data. CALL METHOD check_proposer. IF NOT my_item_proposer IS INITIAL. CALL METHOD my_item_proposer->get_data IMPORTING ex_data = l_ref. IF NOT l_ref IS INITIAL. ASSIGN l_ref->* TO <data>. CHECK sy-subrc IS INITIAL. MOVE-CORRESPONDING <data> TO ex_data. "#EC ENHOK IF <data>-pstyp EQ '0'. ex_data-pstyp = space. ENDIF. ENDIF. ENDIF.