Tuesday, 29 December 2015

SQL Script to know the form name (.fmb) and funtion name in oracle apps 11i

--SQL Script to know the form name (.fmb) and funtion name in oracle apps 11i

SELECT fff.function_name,
           ff.form_name,
           ffft.user_function_name,
           fff.function_id,
           ff.form_id,
           fff.application_id
FROM   fnd_form ff,
       fnd_form_functions fff,
       fnd_form_functions_tl ffft
WHERE  ff.form_id = fff.form_id
AND    fff.function_id = ffft.function_id
AND    ffft.language = 'US'
--AND fff.application_id = 20003   --Inventory Module
and ff.form_name like 'XXTABLE_NAME%'  -- Form Name .fmb
ORDER BY ffft.user_function_name;

Monday, 30 November 2015

To find out locks on TABLE in Oracle and Kill Sesson on Table

SELECT l.session_id||','||v.serial# sid_serial,
       l.ORACLE_USERNAME ora_user,
       o.object_name,
       o.object_type,
       DECODE(l.locked_mode,
          0, 'None',
          1, 'Null',
         2, 'Row-S (SS)',
          3, 'Row-X (SX)',
          4, 'Share',
          5, 'S/Row-X (SSX)',
          6, 'Exclusive',
          TO_CHAR(l.locked_mode)
       ) lock_mode,
       o.status,
       to_char(o.last_ddl_time,'dd.mm.yy') last_ddl
FROM dba_objects o, gv$locked_object l, v$session v
WHERE o.object_id = l.object_id
      and l.SESSION_ID=v.sid
      AND OBJECT_NAME = 'ENTER YOUR TABLE NAME'
order by 2,3;

ALTER SYSTEM KILL SESSION '585,18037';

Friday, 2 October 2015

Oracle Forms Book Reference


go through this link..


https://books.google.co.in/books?id=j8OnBQAAQBAJ&pg=PA7&lpg=PA7&dq=post+query+code+in+oracle+forms&source=bl&ots=dBONFmoka2&sig=FgDc0KdhTSF07rvj6444QuuIHD0&hl=en&sa=X&ved=0CD4Q6AEwBWoVChMI3NrqvbijyAIVxJGOCh1KSwNg#v=onepage&q=WHEN-NEW-FORM-INSTANCE&f=false



to move loop:


WHEN-NEW-FORM-INSTANCE trigger in oracle forms


WHEN-NEW-FORM-INSTANCE trigger will work when you are opening form this will fetch all records available in your table and fetch into your block.

go_block('XXCAD_SR_REFUND_NOTIFICATIONS');
 if :XXCAD_SR_REFUND_NOTIFICATIONS.task_status = 'Open'
  then
  do_key('execute_query');
   else
  fnd_message.set_string ('There is no Open SRs in your Bin');
  fnd_message.show;
 end if;

Tuesday, 22 September 2015

sql query to know the Environment path in Linux in oracle Apps Technical


select variable_name, value
from fnd_env_context
where variable_name like '%\_TOP' escape '\'
and concurrent_process_id = (select max(concurrent_process_id) from fnd_env_context)
order by 1;

Monday, 14 September 2015

through sql Mask a Account Number(XXX5503) in bank account number in oracle apps 11i

select concat (substr(account_number,0,0),lpad(substr(account_number,-4), Length(account_number)-0,'X')) acc_num FROM hz_cust_accounts
                  WHERE cust_account_id = 3078 -- (cust_id)

Saturday, 12 September 2015

sql query Reset password for Oracle Apps User in oracle apps 11i

DECLARE
   v_user_name      VARCHAR2 (30) := UPPER ('A1199024');
   v_new_password   VARCHAR2 (30) := 'welcome2airtel';
   v_status         BOOLEAN;
BEGIN
   v_status :=
      fnd_user_pkg.changepassword (username         => v_user_name,
                                   newpassword      => v_new_password
                                  );

   IF v_status = TRUE
   THEN
      DBMS_OUTPUT.put_line
                          (   'The password reset successfully for the User:'
                           || v_user_name
                          );
      COMMIT;
   ELSE
      DBMS_OUTPUT.put_line (   'Unable to reset password due to'
                            || SQLCODE
                            || ' '
                            || SUBSTR (SQLERRM, 1, 100)
                           );
      ROLLBACK;
   END IF;
END;

Script to update salespersons customer site wise in oracle apps R12

SELECT * FROM HZ_PARTIES WHERE PARTY_NAME LIKE 'DEENA VISION%'; SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID =94043 ; SE...