Friday, 20 February 2015

Forms R12

Cursor with Insert Statement

/*
REM +======================================================================+
REM |                                 |
REM |                                                   |
REM |                All rights reserved.                                  |
REM +======================================================================+ */
/*================================================================================================================*/
/*
             DESCRIPTION:
        Deliverable Name:       Data_Fix_219386_1.sql
             Description:       This ticket has been created for WR#219386 Fix
              Created By:      
        
  USAGE:        
        Run this script from the APPS schema.

  CHANGE HISTORY:
 
             Date                  Name                                           Description
         ----------         --------------------------------------       ---------------------------------
        20/Feb/2015             Siddarth                                    Created
*/
SET SERVEROUTPUT ON

DECLARE
CURSOR c1_itm IS SELECT * FROM apps.mtl_system_items where organization_id = 5204
and inventory_item_id = 93805;

CURSOR c2_org IS SELECT * FROM apps.org_organization_definitions WHERE operating_unit IN (5758, 6359, 5203);

l_count NUMBER := 0;
l_ignore VARCHAR2(10) := 'N';
l_segment1 VARCHAR2(240);

BEGIN
dbms_output.enable(20000);
FOR r1_itm IN c1_itm LOOP
    FOR r2_org IN c2_org LOOP
    l_ignore := 'N';
    BEGIN
        SELECT segment1
        INTO l_segment1
        FROM mtl_system_items
        WHERE segment1 = r1_itm.segment1
        AND organization_id = r2_org.organization_id;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            l_ignore := 'Y';
        WHEN OTHERS THEN
            l_ignore := 'N';
    END;
DBMS_OUTPUT.PUT_LINE('Item Name - Org: ' || r1_itm.segment1 || ' - '|| r2_org.organization_code);
IF l_ignore = 'N' THEN
INSERT INTO mtl_system_items_interface
   (PROCESS_FLAG
   ,SEGMENT1
   ,DESCRIPTION
   ,SET_PROCESS_ID
   ,ORGANIZATION_ID
   ,TRANSACTION_TYPE)
   VALUES
   (1
   ,r1_itm.segment1
   ,'Configured Assy, PCIe Quad Port - 2x4GbFC/2x1GbE Combo HBA, QEM3472, SUN'
   ,11143000
   ,r2_org.organization_id
   ,'UPDATE');
l_count := l_count + SQL%ROWCOUNT;
END IF;
    END LOOP;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Total Records inserted : ' || l_count);

COMMIT;

EXCEPTION
WHEN OTHERS THEN
  ROLLBACK;
  DBMS_OUTPUT.PUT_LINE('Error when inserting into MSII ' || SQLERRM);
END;
/




Wednesday, 4 February 2015

To view the disabled or hidden options in oaf page oracle apps

To view the disabled or hidden options in oaf page oracle apps:



the profile option ‘Disable Self Service Personalization’ is enabled so that  can view some of the hidden fields.

go to order management setup->customers->standard->
Query the customer 157661

Click on the Details and click on Account Profile these account profiles are all hidded inside.
Only it will enable if profile option is set.


Friday, 23 January 2015

Use of system administrator request Groups and responsibility in Oracle Apps R12

System Administrator -> Request Groups and Responsibility:

When a concurrent program is created it should register in request groups. so that one can submit the report in the assigned responsibility.

For example:

One should register a report that should run in order management setup means.

First go to system administrator-> security->user->define->query->Order Management Setup

Then in the screen shot the Request Group name OM Concurrent Programs is there. Copy that Request group name and go to security->responsibility->request

Query the copied request group and add the concurrent program by choosing type as program and name as concurrent program name and the application whether that is standard or custom defined while creating a ccp.





Wednesday, 21 January 2015

Code with substr and instr in oracle apps r12

Code with substr and instr in oracle apps r12

select SUBSTR('XLOGIC HIBM-CHI',9,INSTR('XLOGIC HIBM-CHI','-',1)-9) from dual;

Value returns as IBM

Monday, 19 January 2015

To find the table name by using the column name

To find the table name by using the column name:

select * from all_tab_columns where Upper(column_name) like Upper('Payment%Method%');

Payment%Method% is the column name

Monday, 12 January 2015

for my use - unix send mail program with output attachment has uploaded in google drive

unix send mail program with output attachment has uploaded in google drive in rma transactions report folder. In qlogic_Send_mail.prog file contains the unix commands in which mail will take the body message from a file in one directory.