You can use the Built-in function GET_APPLICATION_PROPERTY to get information about the call form stack in a multiple-form application, including the following:
/* Determine which form called the current form
** (with CALL_FORM)
*/
DECLARE
parent_form CHAR(20);
BEGIN
parent_form := GET_APPLICATION_PROPERTY(calling_form);
IF parent_form = 'form_A' THEN
POST;
EXIT_FORM(no_commit, no_rollback);
ELSE
COMMIT_FORM;
EXIT_FORM;
END IF;
END;