Hi,
I had similar issue while integrating IFSAPPS with our scanning application. We just want to show the IFS error message (in case of any error/exception) while performing IFS transaction (like move part, PO Receive ) using handheld device(e.g. CK device ). To overcome this I created a function(as below) which returns the IFS error message when we pass the Oracle trace message.
FUNCTION Get_Error_Message(error_msg_ IN VARCHAR2) RETURN VARCHAR2
IS
error_ VARCHAR2(32767) := '';
BEGIN
error_ := substr(error_msg_, instr(error_msg_,':') +1, length(error_msg_));
WHILE instr(error_, ':') > 0 loop
error_ := substr(error_, instr(error_,':') +1, length(error_));
end loop;
return error_;
END Get_Error_Message;
Used the function as below:
PROCEDURE PO_RECEIVE( order_no_ IN VARCHAR2,
-----
X_RETURN_STATUS OUT VARCHAR2,
X_MSG_DATA OUT VARCHAR2) IS
BEGIN
--Perform IFS transaction (Call IFS API)
EXCEPTION WHEN OTHERS THEN
ROLLBACK;
X_RETURN_STATUS := 'E';
X_MSG_DATA := SUBSTR(SQLERRM,1,230);
X_MSG_DATA := Get_Error_Message(X_MSG_DATA);
END PO_RECEIVE;
Hope this helps.
Hi,
I had similar issue while integrating IFSAPPS with our scanning application. We just want to show the IFS error message (in case of any error/exception) while performing IFS transaction (like move part, PO Receive ) using handheld device(e.g. CK device ). To overcome this I created a function(as below) which returns the IFS error message when we pass the Oracle trace message.
FUNCTION Get_Error_Message(error_msg_ IN VARCHAR2) RETURN VARCHAR2
IS
error_ VARCHAR2(32767) := '';
BEGIN
error_ := substr(error_msg_, instr(error_msg_,':') +1, length(error_msg_));
WHILE instr(error_, ':') > 0 loop
error_ := substr(error_, instr(error_,':') +1, length(error_));
end loop;
return error_;
END Get_Error_Message;
Used the function as below:
PROCEDURE PO_RECEIVE( order_no_ IN VARCHAR2,
-----
X_RETURN_STATUS OUT VARCHAR2,
X_MSG_DATA OUT VARCHAR2) IS
BEGIN
--Perform IFS transaction (Call IFS API)
EXCEPTION WHEN OTHERS THEN
ROLLBACK;
X_RETURN_STATUS := 'E';
X_MSG_DATA := SUBSTR(SQLERRM,1,230);
X_MSG_DATA := Get_Error_Message(X_MSG_DATA);
END PO_RECEIVE;
Hope this helps.
Hi @EnsPrabhP ,
Thanks a lot.
In your example, you seems to out X_RETURN_STATUS and X_MSG_DATA.
Do you have an example where it’s used afterwards to pack in the return message?
Cheers!