Friday, January 12, 2018

API Error Handling in Oracle Apps

API Error Handling:
  •   Every API has 3 out parameters as x_return_status, x_msg_count and x_msg_data.
  • Using these 3 parameters, one can use the below code to log or debug errors in APIs.

dbms_output.put_line (SubStr('x_return_status = '||x_return_status, 1, 255));
dbms_output.put_line ('x_msg_count = '||TO_CHAR(x_msg_count));
dbms_output.put_line (SubStr('x_msg_data = '||x_msg_data, 1, 255));
IF x_msg_count >1 THEN
FOR I IN 1..x_msg_count
LOOP
dbms_output.put_line(I ||'.'|| SubStr(FND_MSG_PUB.Get(p_encoded =>FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

No comments:

Post a Comment