Thursday, 8 September 2016

How to delete datadefinition and Template



Script for deleting the datadefinition
————————————————>
BEGIN
XDO_DS_DEFINITIONS_PKG.DELETE_ROW(‘XX’,’XXHR_EUREH_GEOS_ERROR_REPORT’);
Commit;
END;
——————————————————–
——————————————————–
script for deleting the template
——————————————————>
BEGIN
XDO_TEMPLATES_PKG.DELETE_ROW(‘XX’,’XXHR_EUREH_GEOS_ERROR_REPORT’);
Commit;
END;

OR

declare
begin
delete   from XDO_TEMPLATES_B        where template_code    = <template_code>
delete   from XDO_TEMPLATES_TL       where template_code    = <template_code>
delete   from xdo_lobs               where lob_code         = <template_code>
delete   from XDO_DS_DEFINITIONS_TL  where data_source_code = <def_code>
delete   from XDO_DS_DEFINITIONS_b   where data_source_code = <def_code>
end;


Commit;

Wednesday, 4 May 2016

query to find users who have a responsibility

  SELECT usr.user_id,
         usr.user_name,
         res.RESPONSIBILITY_ID,
         res.RESPONSIBILITY_NAME
    FROM apps.FND_USER usr,
         apps.FND_RESPONSIBILITY_TL res,
         apps.FND_USER_RESP_GROUPS grp
   WHERE     (   UPPER (res.RESPONSIBILITY_NAME) LIKE '%SUZ%'
              OR UPPER (res.RESPONSIBILITY_NAME) LIKE '%NANJING%'
              OR UPPER (res.RESPONSIBILITY_NAME) LIKE '%SZ%')
         AND grp.responsibility_id = res.responsibility_id
         AND grp.user_id = usr.user_id
ORDER BY 2

Thursday, 18 February 2016

Batch Status in OPM

select * from fnd_lookup_values where lookup_type  like 'BATCH_STATUS' AND LANGUAGE ='US'

Monday, 15 February 2016

How to attach concurrent program to request group using pl/sql script.

DECLARE
BEGIN
FND_PROGRAM.add_to_group
    (
     PROGRAM_SHORT_NAME  =>'XXHLFUSIONPHLFIINT'
    ,PROGRAM_APPLICATION =>'XXHL'
    ,REQUEST_GROUP       => 'US SHRMS Reports & Processes'
    ,GROUP_APPLICATION   =>'PER'
    ) ;   
  commit;
exception
    when others then
           dbms_output.put_line('Object already exists');
END;

/

Monday, 18 January 2016

Converter number to words in RTF level

<?xdoxslt:toWordsAmt(sum(AMOUNT))?>

<?xdoxslt:toWordsAmt(12345.98)?>


https://blogs.oracle.com/xmlpublisher/entry/numbers_to_words_update

Wednesday, 13 January 2016

How to add system administrator resposibility from backend

BEGIN
   fnd_user_pkg.addresp ('RAJKUMARMA',
                         'SYSADMIN',
                         'SYSTEM_ADMINISTRATOR',
                         '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;

Monday, 11 January 2016

Reset an Oracle Apps User Password via script

DECLARE
      l_ret_val BOOLEAN;
      l_user_name   varchar2(50) := 'RAJKUMARMA';
      l_new_pwd     varchar2(20) := 'oracle120';
BEGIN
      l_ret_val :=
           fnd_user_pkg.changepassword(username=> l_user_name
                                      ,newpassword => l_new_pwd);
     IF l_ret_val
     THEN
           DBMS_OUTPUT.PUT_LINE('The password is successfully reset to '||  l_new_pwd);
           COMMIT;
     ELSE
           DBMS_OUTPUT.PUT_LINE('The password reset has failed');
     END IF;
END;