Home » Developer & Programmer » Forms » HRMS API not allowed in Forms 6i?
HRMS API not allowed in Forms 6i? [message #171400] Tue, 09 May 2006 13:29 Go to next message
annagel
Messages: 220
Registered: April 2006
Senior Member
I have been building a form that is supposed to utilize the HRMS API's to insert and sometimes update information in the HRMS system. I have been having problems which I thought had to do with the way in which I was using the API calls. For complete details of my problems check out my post here:

http://www.orafaq.com/forum/t/63019/84926/

I have decided to post in the forms forum because after a lot more debugging I have convinced myself...even though this can't possibly be right...that the problem is using HRMS API's in forms and not the code itself. The meat of my problem if this:

I have tried compiling the following procedure as a procedure in forms 6i:

procedure update_person is
  start_date date;
  end_date date;
  full_name varchar2(300);
  comment_id number;
  comb_warning boolean;
  ass_warning boolean;
  pay_warning boolean;
  emp_number varchar2(200);
  object_version number;
begin
  object_version := 10;
  emp_number := 1210;
  hr_person_api.update_us_person(
  p_effective_date => to_date('02-apr-2006', 'dd-mon-yyy'),
  	p_datetrack_update_mode => 'UPDATE',
  	p_person_id => 2852,
  	p_object_version_number => object_version,
  	p_employee_number => emp_number,
  	p_effective_start_date => start_date,
	p_effective_end_date => end_date,
	p_full_name => full_name,
	p_comment_id => comment_id,
	p_name_combination_warning => comb_warning,
	p_assign_payroll_warning => ass_warning,
	p_orig_hire_warning => pay_warning
  );
end;


This fails with the following error message:

Implementation Restriction: 'HR_API.G_NUMBER': 
Cannot directly access remote package variable or cursor


using identical code with the exception of create or replace using TOAD:

CREATE OR REPLACE procedure update_person is
  start_date date;
  end_date date;
  full_name varchar2(300);
  comment_id number;
  comb_warning boolean;
  ass_warning boolean;
  pay_warning boolean;
  emp_number varchar2(200);
  object_version number;
begin
  object_version := 10;
  emp_number := 1210;
  hr_person_api.update_us_person(
        p_effective_date => to_date('02-apr-2006', 'dd-mon-yyy'),
  	p_datetrack_update_mode => 'UPDATE',
  	p_person_id => 2852,
  	p_object_version_number => object_version,
  	p_employee_number => emp_number,
  	p_effective_start_date => start_date,
	p_effective_end_date => end_date,
	p_full_name => full_name,
	p_comment_id => comment_id,
	p_name_combination_warning => comb_warning,
	p_assign_payroll_warning => ass_warning,
	p_orig_hire_warning => pay_warning
  );
end;


The procedure compiles cleanly and is added to the database. Is it simply not possible to utilize the API's as part of a form built using Form Builder? I was under the impression this was one of the points of creating the APIs in the first place but I am starting to doubt it.

Some extra info if it is useful:

Forms [32 Bit] Version 6.0.8.27.0
RDBMS : 9.2.0.6.0
Oracle Applications : 11.5.8
----------------------------------------
Forms Server
----------------------------------------
Oracle Forms Version : 6.0.8.25.2
Application Object Library : 11.5.0

thanks
Andrew

and I am sorry if anyone considers this a cross-post. I felt that the fact that my theory of the crime completely changed, I would want my question presented to a whole different set of people as I am thinking this is a Forms and not a HRMS issue.
Re: HRMS API not allowed in Forms 6i? [message #171423 is a reply to message #171400] Tue, 09 May 2006 21:07 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The problem is that the PL/SQL used by Forms 6i is not the same PL/SQL used by Oracle 9i DB. If you had an 8i database your would probably find that you received the same error message (or was that 8?).

Create your own package with the same functions and procedures, get this new package to call hr_person_api using EXACTLY the same parameters, and get your form to use YOUR package's procedures and functions. Start with just the one procedure in which you are currently interested. You can add others later if necessary.

David
Re: HRMS API not allowed in Forms 6i? [message #171426 is a reply to message #171423] Tue, 09 May 2006 22:04 Go to previous messageGo to next message
annagel
Messages: 220
Registered: April 2006
Senior Member
The packages actually doing the calls to the HR APIs that I was making was simply a collection of wrappers that would take my two data-types pull the correct data out of them and submit it to the db through the APIs so moving this to the db is not really the worst thing in the world.

If I were working with a newer version of Forms would I be able to get this to work? We have been trying to convince my boss to upgrade our licence, more because the current version does not seem to be all that stable on our PCs, but every extra bit of information helps.

Andrew
Re: HRMS API not allowed in Forms 6i? [message #171454 is a reply to message #171426] Wed, 10 May 2006 01:52 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Para 1 - good.

Para 2 - Forms 9i uses the same PL/SQL as DB 9i, but then it is neither a trivial nor immensely painful conversion, depending from where you start. Smile

If you are using Forms 6 C/S then you may have quite a bit of work to do. However, if you are using 6i 3-tier, and you have a new box for developing the 9i Application Server then converting to 9i is a reasonable option.

@Maarten, Forms 6.0.8.27.0 - do you remember which patch set this represents? Okay, forget that. I did my own google search and found http://forums.oracle.com/forums/message.jspa?messageID=1269941 so this represents patch 18, but is still C/S.

@Andrew, I don't think that it is a good idea to even TRY to upgrade your Forms except as part of a total Oracle Applications upgrade. So stick with the indirect API calls and see if that works for you. Better a 2 hour solution than a 6 month rebuild.

David
Re: HRMS API not allowed in Forms 6i? [message #171591 is a reply to message #171454] Wed, 10 May 2006 08:37 Go to previous message
annagel
Messages: 220
Registered: April 2006
Senior Member
I have started down the database package path this morning and all seems to be working well at the moment...though I think I may have found a bug in our version of the APIs (param listed in the doc as not required that has no default value in the actual procedure definition).

Thanks for you help again David,
Andrew
Previous Topic: ORA-01733 :virtual column not allowed here
Next Topic: Data Block items- duplicates for one column?
Goto Forum:
  


Current Time: Fri Sep 20 06:54:46 CDT 2024