In general, the public APIs have one or more output parameters to which error messages are written. The most typical parameters for this purpose are p_msg_data or x_msg_data. Some APIs have other error output parameters, some write messages to error tables, others just put error messages in the FND message buffer.
Example of getting API messages using fnd_msg_pub with output parameters p_msg_count and p_msg_data:
Example of getting API messages using fnd_msg_pub with output parameters p_msg_count and p_msg_data:
IF nvl(p_msg_count,1) = 1
THEN
dbms_output.put_line(p_msg_data);
ELSE
FOR i in 1 .. p_msg_count
LOOP
dbms_output.put_line
(fnd_msg_pub.get
(fnd_msg_pub.g_next, fnd_api.g_false) || i);
END LOOP;
END IF;
END;
No comments:
Post a Comment