Difference Between CALL_FORM and OPEN_FORM in Oracle Forms

In Oracle Forms, applications often consist of multiple forms that need to interact with each other. Navigating between these forms is a common requirement, and Oracle provides several built-in procedures to achieve this. Two of the most important ones are CALL_FORM and OPEN_FORM. At first glance, they might seem similar because both are used to invoke another form. However, they differ significantly in how they manage memory, transactions, and control flow.

This tutorial explains the difference between CALL_FORM and OPEN_FORM, their key features, usage scenarios, and best practices so you can choose the right option for your Oracle Forms applications.


CALL_FORM in Oracle Forms

The CALL_FORM built-in is used to invoke another form while suspending the execution of the current form. The calling form remains in memory, and control will return to it once the called form is closed.

Key Points

  • Suspends the current form and loads the called form.
  • The calling form stays in memory until the called form is exited.
  • Control is returned to the calling form once the called form is closed.
  • Supports parameter passing between forms.

Syntax

CALL_FORM(form_name, display, switch_menu, query_mode, data_mode);

Example

BEGIN
   CALL_FORM('EMPLOYEE_FORM');
END;

This opens the EMPLOYEE_FORM and suspends the current form. When the user exits EMPLOYEE_FORM, control goes back to the original form.


OPEN_FORM in Oracle Forms

The OPEN_FORM built-in is used to open a new form while keeping the current form active. Both forms remain in memory, and the user can work with them independently.

Key Points

  • Opens a new form while the calling form remains active.
  • Both forms can run simultaneously.
  • Useful for creating multiple working sessions.
  • Does not suspend the calling form, unlike CALL_FORM.

Syntax

OPEN_FORM(form_name, activate_mode, session_mode, data_mode);

Example

BEGIN
   OPEN_FORM('DEPARTMENT_FORM');
END;

This opens the DEPARTMENT_FORM while keeping the current form active. The user can switch between forms as needed.


Comparing CALL_FORM and OPEN_FORM

To clearly understand the difference, let us compare them side by side:

FeatureCALL_FORMOPEN_FORM
BehaviorSuspends current form and loads the new oneKeeps current form active and opens a new form
Memory HandlingCurrent form remains in memory but inactiveBoth forms remain active in memory
Control ReturnReturns to the calling form after called form is closedNo return to calling form; both run independently
Use CaseSequential processing (step-by-step workflow)Parallel processing (work with multiple forms)
User NavigationOne form at a timeMultiple forms can be active
Transaction ScopeShared session and contextCan run in same or separate sessions

Practical Scenarios

Scenario 1: Sequential Workflow with CALL_FORM

When building a payroll application, you may want the user to open the Salary Form from the Employee Form. In this case, CALL_FORM ensures that the employee data form is suspended, and control returns to it only after salary details are handled.

CALL_FORM('SALARY_FORM');

Scenario 2: Working with Multiple Forms using OPEN_FORM

If you want the user to open the Department Form while still keeping the Employee Form active, you should use OPEN_FORM. The user can switch between both forms without closing one.

OPEN_FORM('DEPARTMENT_FORM');

Best Practices

  1. Use CALL_FORM for step-by-step navigation
    • When the workflow requires completing one form before returning to another.
    • Example: Login → Main Menu → Sub-form.
  2. Use OPEN_FORM for multitasking scenarios
    • When users need to open multiple forms at the same time and work independently.
    • Example: Employee Form + Department Form both active.
  3. Mind the memory usage
    • OPEN_FORM keeps multiple forms in memory, which may increase resource consumption.
  4. Transaction control
    • Understand whether you want the new form to share the session or have its own. Use session mode options carefully.

See also: Working with EXIT_FORM, CLOSE_FORM, and NEW_FORM in Oracle Forms

Conclusion

Both CALL_FORM and OPEN_FORM are powerful tools for navigation in Oracle Forms, but they serve different purposes. Use CALL_FORM when you want a controlled, step-by-step workflow where the calling form resumes after the called form is closed. On the other hand, use OPEN_FORM when you want users to work with multiple forms at the same time, giving them more flexibility. Choosing the right one ensures better performance, data integrity, and user experience.

Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 25+ years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments