FNDLOAD in PL/SQL [message #223847] |
Mon, 12 March 2007 01:32 |
bhanubalaji
Messages: 8 Registered: March 2007 Location: Chennai
|
Junior Member |
|
|
hi,
may anyone of u will help, how to run the FNDLOAD script in PL/SQL.
regards,
bhanu
|
|
|
|
Re: FNDLOAD in PL/SQL [message #224076 is a reply to message #223867] |
Mon, 12 March 2007 22:15 |
bhanubalaji
Messages: 8 Registered: March 2007 Location: Chennai
|
Junior Member |
|
|
hi,
actually i need to move the records from one instance to another instance in the same server.
i started with 1st step as, downloading the records from instance to local folder.
For acheiving this,i used FNDLOAD Scipts.
FNDLOAD Script is working fine while we run it in Linux or Unix prompt.
now my question is, i should run the FNDLOAD Script in PL/SQL.
so that only i can able to call it from form builder.
is it possible?
i think now u got some idea.
thanks in advance,
regards,
bhanu.
|
|
|
|
Re: FNDLOAD in PL/SQL [message #224221 is a reply to message #224204] |
Tue, 13 March 2007 07:42 |
bhanubalaji
Messages: 8 Registered: March 2007 Location: Chennai
|
Junior Member |
|
|
Yes, I am on a process of trying to create a sort of object migration of registering a report from one instance of apps to another as a generic process.
For that, I need to execute a PL/SQL procedure which will inturn call the FNDLOAD script to download the ldt file. I could then utilise this same pl/sql procedure in another instance to upload the ldt file.
Below is my script which I tried to execute this functionality.
______________________________________________
CREATE OR REPLACE package body AOL_TEST AS
PROCEDURE AT_TEST(
errbuf out nocopy varchar2, --needed by concurrent manager.
retcode out nocopy number
) IS
req_id number;
begin
REQ_ID := FND_REQUEST.SUBMIT_REQUEST (
application => ‘FND’,
program => ‘FNDLOAD’,
description => NULL,
start_time => NULL,
sub_request => FALSE,
argument1 => ‘DOWNLOAD’,
argument2 => ‘/ng1/oracle/visappl/fnd/11.5.0/patch/115/import/emp.lct’,
argument3 => ‘/usr/tmp/emp.ldt’,
argument4 => ‘EMP’,
argument5 => ‘TEST’
);
end AT_TEST;
end AOL_TEST;
/
______________________________________________
In the above code, I am trying to execute the FNDLOAD concurrent program from FND_REQUEST.SUBMIT_REQUEST. Kindly let me know if my coding is right or not. The output of the file is just the structure without any data of the ldt as below:
______________________________________________
# $Header$
# dbdrv: exec fnd bin FNDLOAD bin &phase=daa+64 checkfile:~PROD:~PATH:~FILE &ui_apps 0 Y DOWNLOAD @FND:patch/115/import/emp.lct @~PROD:~PATH/~FILE
LANGUAGE = "US"
LDRCONFIG = "emp.lct"
#Source Database VIS
# -- Begin Entity Definitions --
DEFINE EMP
KEY ENAME VARCHAR2(50)
BASE EMPNO VARCHAR2(50)
BASE JOB VARCHAR2(50)
BASE MGR VARCHAR2(50)
BASE HIREDATE VARCHAR2(80)
BASE SAL VARCHAR2(50)
BASE COMM VARCHAR2(50)
BASE DEPTNO VARCHAR2(50)
END EMP
# -- End Entity Definitions --
______________________________________________
I would really appreciate any kind of help.
Thanks
Bhanu
|
|
|
Re: FNDLOAD in PL/SQL [message #224233 is a reply to message #224221] |
Tue, 13 March 2007 08:08 |
prashant_pathak
Messages: 263 Registered: February 2006 Location: California,US
|
Senior Member |
|
|
Hi,
this is just a suggestion.
Write your own programs.
1)Download - Host Executable - i.e. Shell Script
2)Upload - Host Executable
call it from your form of course you have to give all 100 arguments give values where you have parameter and others with NULL. Check AOL guide for calling concurrent program from Form.
regards
Prashant Pathak
|
|
|
|
Re: FNDLOAD in PL/SQL [message #224646 is a reply to message #224470] |
Wed, 14 March 2007 22:09 |
bhanubalaji
Messages: 8 Registered: March 2007 Location: Chennai
|
Junior Member |
|
|
thanks for ur response.
Vamsi,
intially,i tried for sample table[EMP Table]
emp.lct
----------------------------------------------------------------
# $Header$
COMMENT = "dbdrv: exec fnd bin FNDLOAD bin &phase=daa+64 checkfile:~PROD:~PATH:~FILE &ui_apps 0 Y DOWNLOAD @FND:patch/115/import/emp.lct @~PROD:~PATH/~FILE"
#Source Database VIS
# -- Begin Entity Definitions --
DEFINE EMP
KEY ENAME VARCHAR2(10)
BASE EMPNO VARCHAR2(50)
BASE JOB VARCHAR2(9)
BASE MGR VARCHAR2(50)
BASE HIREDATE VARCHAR2(11)
BASE SAL VARCHAR2(50)
BASE COMM VARCHAR2(50)
BASE DEPTNO VARCHAR2(50)
END EMP
DOWNLOAD EMP
"SELECT EMPNO,JOB,MGR,HIREDATE,SAL,COMM,
DEPTNO FROM EMP
WHERE ENAME = :ENAME"
----------------------------------------------------------------
script runned in Linux prompt
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/emp.lct emp.ldt EMP ENAME='TEST'
EMP - Entity Name (Defined in LCT file)
TEST - Emp Name (TEST employee records to download)
after execution, i got LDT File in the Specified Path(Mentioned in LCT file)
thanks,
bhanu
|
|
|
|
|
|