24 June 2008

FND_MSG_PUB api in Oracle Applications

FND_MSG_PUB for error logging in Oracle Applications.

Use the following snipped of code while calling any seeded API in Oracle Applications, like CRM, or Financials.

Put this block exactly under the section where you invoke the private or public API. The errors raised in the API are logged in the following API. Use this code while error logging or while debugging. Comment out the code before moving into production.

IF ( FND_MSG_PUB.Count_Msg > 0) THEN
FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
FND_MSG_PUB.Get(p_msg_index => i,
p_encoded => 'F',
p_data => out_message,
p_msg_index_OUT => l_msg_index_OUT );
dbms_output.put_line('l_msg_data :' ||out_message);
END LOOP;
END IF;

Adding message to message stack is
FND_MSG_PUB.add

No comments: