Wednesday, November 28, 2007

Program for Formatting options for fnd_file.put_line.out and Log

create or replace procedure XXBOB_FND_MULTILINE_PRINT_PROC(P_TEXT varchar2,P_FRAME_SIZE NUMBER )as
v_text varchar2(1000) ;
v_cut number;
v_print_text varchar2(1000);
v_next_start number;
v_tot_length number;
v_cut_length number;
v_fram_size number :=4;
x number;
begin
v_text:=P_TEXT;
If p_frame_size is null then
V_fram_size:=60;
end if;
v_fram_size:=p_frame_size;
v_cut:=instr(v_text,' ',v_fram_size);
v_tot_length:=length(v_text);
v_print_text:=substr( v_text,1,v_cut);
v_next_start:=v_cut+1;
dbms_output.put_line('Total Length:'v_tot_length);
x:=length(v_print_Text);
dbms_output.put_line('X:'X);
if length(v_text)>v_fram_size then
loop
--dbms_output.put_line(v_print_Text);
fnd_file.put_line(fnd_file.output,v_print_Text);
--dbms_output.put_line(v_print_Text);
v_cut:=instr(v_text,' ',v_next_start+v_fram_size);
if v_cut=0 then
v_cut:=v_tot_length+1;
end if;
v_cut_length:=v_cut-v_next_start;
--dbms_output.put_line('v_next_start:'v_next_start);
--dbms_output.put_line('v_cut:'v_cut);
--dbms_output.put_line('v_lenghtcut:'v_cut_length);
v_print_text:=substr( v_text,v_next_start,v_cut_length);
x:=nvl(length(v_print_Text),0);
--dbms_output.put_line('X:'X);
if xv_next_start and v_cut!=v_tot_length then
v_next_start:=v_cut+1;
end if;
exit when x
end loop;
else
fnd_file.put_line(fnd_file.output,v_Text);
--dbms_output.put_line(v_Text);
end if;
end;

Sunday, November 11, 2007

FND LOAD Examples

Hi All,
Plz find the different ways of using fnd load.
Most of time we required for the movement of different objects majorly likelookups,Menus,Concurrent ProgramsAlerts,valueset...
Using FND Load we can load many of the different FND objects from one server to other server.
But Unfortunate i never find all the FND load Examples at one place.
So i thought i put diffrent examples at one point so that in future a single point of reference can be there.
One Important thing is FNDLOAD updates the object if the object alreadys exists...
Check once it is moved as in case of some objects i creates a new one also with a different version
Concurrent Programs:
Use the Below Script to download concurrent programs.The best part of it is it downloads all the valuesets attached to the concurrent program.
Download:$FND_TOP/bin/FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXBOB_EXT_TRNFB_DTL_REP.ldt PROGRAM APPLICATION_SHORT_NAME="XXBOB" CONCURRENT_PROGRAM_NAME="XXBOB_EXT_TRNFB_DTL_REP"
UPLOAD:

$FND_TOP/bin/FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXBOB_EXT_TRNFB_SUM_REP.ldt


Lookups:
Download:$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct BOB_OTA_SESSION_FEEDBACK_RESP.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME ='OTA' LOOKUP_TYPE="BOB_OTA_SESSION_FEEDBACK_RESP"
UPLOAD:$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct BOB_OTA_SESSION_FEEDBACK_RESP.ldt



Menu:

This will download all the menu definitions and the definitions of the functions associtated with it.But it will not download the submenus.
Download:$FND_TOP/bin/FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct BOB_ILEARNING_ADMIN_TOP_MENU.ldt MENU MENU_NAME="BOB_ILEARNING_ADMIN_TOP_MENU"


Upload:$FND_TOP/bin/FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct BOB_ILEARNING_ADMIN_TOP_MENU.ldt


Forms Personalization:

This is one of the important things if the number of personalizations are moreBut for caution check whether the personlaization works properly are not...i experienced some problems with that..
DOWNLOAD:FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XX_PERWSHRG.ldt FND_FORM_CUSTOM_RULES function_name="PERWSHRG-404"

Upload:FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct


Responsibility:
Check this once if..i need to try if we download responsibility whether it will download and other all depending objects also..Some one can try this...let me know the answer also...

Download:FNDLOAD apps/$CLIENT_APPS_PWD O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XX_PERSON_RESPY.ldt FND_RESPONSIBILITY RESP_KEY="XX_PERSON_RESPY"

UPLOAD:
FNDLOAD apps/$CLIENT_APPS_PWD O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct XX_PERSON_RESPY.ldt


Messages:
Use to dowload the messages..in case if you want to download all the messages in a application(work when doing big bang implementation) just provide application short name onlyit will donwload all the messages
Download:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXBOB_OLM_EXTTRG_FB_CONF.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME='XXBOB' MESSAGE_NAME="XXBOB_OLM_EXTTRG_FB_CONF"
Upload:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXBOB_OLM_EXTTRG_FB_CONF.ldt

Valuesets:
Try this and let me know if it doesn't work..i have not yet tried this...
Download:$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XXVALUESETNAME.ldt FLEX_VALUE_SET_NAME='XXVALUESETNAME'
Upload:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct XXVALUESETNAME.ldt


Alerts:
Most people are not aware that there is a FNDLOAD script for alerts..even me..but i searhced some how find this one..it worked..i tried this by downloading all alertsunsing only application short name..But the other parameter will work..try this out...
Download:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct OTA.ldt ALR_ALERTS APPLICATION_SHORT_NAME='OTA' ALERT_NAME= 'URALERT'

UPLOAD:$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct OTA.ldt


Descriptive FLEX FIELDS:
Download:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct ADD_EXT_ORG_TRG_DTLS.ldt DESC_FLEX APPLICATION_SHORT_NAME='XXBOB' DESCRIPTIVE_FLEXFIELD_NAME='ADD_EXT_ORG_TRG_DTLS'

UPLOAD:
$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afffload.lct ADD_EXT_ORG_TRG_DTLS.ldt

Sunday, November 4, 2007

To create users in Bulk in oracle applications

Hi all,
We can fnd_user_pkg api to create users and attach responsibilities all at one shot..
Here i am providing the code which will update or create new users and their repsonsibilities
This script need to be improved a bit more to meet your changes
/******************************************************************************/

create or replace package body XX_FND_USER_PKG as
procedure create_user(p_user_name in varchar2,
p_emp_num in varchar2,
p_resp_id in number) as
v_user_present varchar2(1):='N';
v_err varchar2(1):='N';
v_user_id number;
v_resp_present varchar2(1):='N';
v_empnum_err varchar2(1):='N';
v_resp_key varchar2(50);
v_application_name varchar2(50);
v_person_id number;
v_erromsg varchar2(1000);
begin
begin
select user_id
into v_user_id
from fnd_user
where user_name=p_user_name and sysdate>nvl(end_Date,trunc(sysdate));
exception
when no_data_found then
v_user_present:='N';
end;
if v_user_id is null then
begin
select person_id
into v_person_id
from per_all_people_f papf
where employee_number=p_emp_num
and sysdate between effective_start_Date and effective_End_Date
and rownum=1;
exception
when others then
v_empnum_err :='Y';
end;
if v_empnum_err='N' then
fnd_user_pkg.createuser(x_user_name => p_user_name
,x_owner => ''
,x_unencrypted_password => 'ganjam123'
,x_employee_id=>v_person_id);
end if;
end if;
if v_user_id is not null then
begin
select 'Y'
into v_resp_present
from fnd_user_resp_groups_direct
where user_id=v_user_id
and responsibility_id=p_resp_id;
exception
when no_data_found then
v_resp_present:='N';
end;
end if;
if v_resp_present ='N' then
begin
select responsibility_key,fa.application_short_name
into v_resp_key,v_application_name
from FND_RESPONSIBILITY FR,
fnd_application FA
where FR.application_id=fa.application_id
and responsibility_id=p_resp_id
and rownum=1;
exception
when others then
v_err:='Y';
end;
if v_err ='N' then
fnd_user_pkg.addresp(username => p_user_name
,resp_app => v_application_name
,resp_key => v_resp_key
,security_group => 'STANDARD'
,description => 'Auto Assignment'
,start_date => SYSDATE
,end_date => null);
end if;
end if;

end;
end XX_FND_USER_PKG;/