Thursday, 8 March 2012

How attach concurrent program to request group


BEGIN
FND_PROGRAM.add_to_group('XYZ_ABC_EMPLOYEE' -- program_short_name
, 'XYZ' -- application
, 'XYZ Group' -- Report Group Name
, 'XYZ'); -- Report Group Application

END;

example...
begin
FND_PROGRAM.add_to_group('XXPONEEDBY',
                         'Purchasing',
                         'Application Developer Reports',---request group name  FND_REQUEST_GROUPS
                         'Purchasing');
                         commit;
                         end;

OAF (Importing page and Application module in 11i)

1)Import Page from the bin  of jdev of jdeveloper9i
steps to remember --write the below code in single line only
import D:\JDEVELOPER9i\jdevbin\jdev\myprojects\xxtest\oracle\apps\per\selfservice\an_expense\webui\APPROVEREJECTPAGE.xml -username xxapps -password xxapps -rootdir D:\JDEVELOPER9i\jdevbin\jdev\myprojects\ -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.129.231.234)(PORT=1520))(CONNECT_DATA=(SID=XXDEV)))"

2)Importing Am from bin of jdev of jdeveloper9i
steps to remember --write the below code in single line only
import D:\JDEVELOPER9i\jdevbin\jdev\myprojects\xx1\oracle\apps\pos\suppreg\webui\xxeextendedRG.xml -username xxapps -password xxapps -rootdir D:\JDEVELOPER9i\jdevbin\jdev\myprojects\ -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xxx.xxx.xxx)(PORT=1520))(CONNECT_DATA=(SID=xxxx)))"

OAF jpx remove Code for 11i

begin
jdr_utils.deleteDocument('/oracle/apps/pos/suppreg/server/customizations/site/0/SupplierRegAM');
end;

execute the above script by replacing  path of document and  finally commit 
commit;

OAF(How To Bounce 11i)

/u03/DEV/devcomn/admin/scripts/DEV_msftora2
no need to bounce OACORE server only need to bounce HTTP server...
adapcctl.sh stop
adapcctl.sh start

OAF(How To Bounce R12)

Environment File.......
cd $ADMIN_SCRIPTS_HOME
. APPSCLONE_trainingsrv.env
adapcctl.sh      -- for HTTP server .
adoacorectl.sh -- for OACORE server.

/u02/CLONE/inst/apps/CLONE_trainingsrv/admin/scripts

adapcctl.sh stop
adoacorectl.sh stop
adoacorectl.sh start
adapcctl.sh start

ADDING RESPONSIBILITY TO USER FROM BACKEND

begin
fnd_user_pkg.addresp(
        ‘&User_Name’, /*Application User Name */
        ‘&Responsablity_Application_Short_Name’, /*get from Query Below */
        ‘&Responsibility_Key’,/*get from Query Below */
        ‘&Security_Group’, /* Most of cases it is ‘STANDARD’ so you can hard code it */
        ‘&Description’, /* Any comments you want */
        ‘&Start_Date’, /* Sysdate From Today */
        ‘&End_Date’ ); /* Sysdate + 365 Rights for Next One Year*/
commit;
dbms_output.put_line(‘Responsibility Added Successfully’);
exception
        when others then
                dbms_output.put_line(‘ Responsibility is not added due to ‘ SQLCODE substr(SQLERRM, 1, 100));
                Rollback;
end;
 EXAMPLEEEE..................................


BEGIN
        fnd_user_pkg.addresp ('SYSADMIN','FND','FND_FUNC_ADMIN','STANDARD','Add Responsibility to USER using pl/sql',SYSDATE,SYSDATE + 100);
         COMMIT;
        DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
        WHEN OTHERS
        THEN
        DBMS_OUTPUT.put_line (   ' Responsibility is not added due to '|| SQLCODE|| SUBSTR (SQLERRM, 1, 100));
        ROLLBACK;
END;

OAF Things to Remeber in Mind....

1)The Path to take DBC File from middle tier..
the DBC file is present at the application folder in the fnd TOP
/u03/FAUAT/fauatappl/fnd/11.5.0/secure/FAUAT_msftora2

2)query to find the responsibility key for creating OAF application

SELECT FAV.APPLICATION_SHORT_NAME, FAV.APPLICATION_NAME,FRV.RESPONSIBILITY_KEY, FRV.RESPONSIBILITY_NAME
FROM FND_APPLICATION_VL FAV, FND_RESPONSIBILITY_VL FRV
WHERE FRV.APPLICATION_ID=FAV.APPLICATION_ID and responsibility_name like '%Functional Administrator%'
ORDER BY FRV.RESPONSIBILITY_NAME ;

3)give the proper username and password  and give the responsibility short name and the responsibility key

4)give  proper database connection details
as
   1)  hostname
   2)  port
   3) SID or SERVICE NAME