Wednesday 28 August 2013

XML Publisher Base Tables while creating Data Definitions and Templates.

Effected Base tables for Data Definitions are
xdo_ds_definitions_b
xdo_ds_definitions_tl


Effected Base tables for Templates are
xdo_templates_b
xdo_templates_tl
xdo_lobs

How to add System administrator responsibility from backend

Syntax:
fnd_user_pkg.addresp(username => v_user_name
,resp_app => 'SYSADMIN'
,resp_key => 'SYSTEM_ADMINISTRATOR'
,security_group => 'STANDARD'
,description => 'Auto Assignment'
,start_date => SYSDATE - 10
,end_date => SYSDATE + 1000);


EXAMPLE:
BEGIN
fnd_user_pkg.addresp ('USER_NAME','SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD',
'Add Sysadmin Responsibility to OPERATIONS 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;

Difference between 'TABLE OF' and 'REF CURSOR’?

A ref cursor is a dynamic cursor in which the contents of cursor can be changed dynamically at run time depending upon our requirement.

A ref cursor is basically a data type. A variable declared based on such data type is called cursor variable. We can associate difference statement to a cursor variable dynamically.

The main advantage of ref cursor is:
We can return result set to a client which we can't do using normal cursors.
It can be passed as parameter to sub programs.

Table of is use to define a collection type.
Collections are generally used for bulk processing. In cursors the data is processed sequentially. Using collections we can process all the data in one go.

What is a difference between unique + not null and primary key?

Unique and not null is a combination of two constraints that can be present any number of times in a table and can’t be a referential key to any column of another table.
Primary key is a single constraint that can be only once for a table & can be referential key to a column of another table becoming referential integrity.

What is FORCE VIEW in PSQL?

The views are created from the base table if only the base table exists. The FORCE keyword is used to create a view if the base table doesn’t exist.

Ex: create or replace FORCE view <view name> as <query>

While using the above syntax to create a view the table used in the query statement doesn’t necessary to exist in the database.

COALESCE function in PLSQL

The COALESCE function take n arguments and produce the first argument, which has the first not null value.
i.e.
Select * from test;
A                      B                      C
-------                 -------                 -------
10                                             30
                        21                     31
12                     22                     32
                                                33
i.e.
Select c, coalesce(a,b,0) result from test;
C                      result
-------                 -------
30                     10        
31                     21
32                     12
33                     0

What is difference between UNION & UNION ALL?

UNION will return the distinctly value
UNION ALL will return the duplicate value.

Friday 16 August 2013

Query to findout Request Set name form CP?

SELECT frst.user_request_set_name request_set,frst.description description,frsst.user_stage_name stage_name,frsst.description stage_descriptionFROM apps.fnd_request_sets_tl frst,apps.fnd_request_set_stages_tl frsstWHERE frst.application_id =frsst.set_application_idAND frst.request_set_id = frsst.request_set_idAND frsst.user_stage_name like '%Program_name%'

Tuesday 13 August 2013

What r the types of windows (Window style)?

Specifies whether the window is a Document window or a Dialog window. If the forms are open in document mode, both the calling form and called form are independent.

When when-timer-expired does not fire?

 The When-Timer-Expired trigger cannot fire during trigger, navigation, or transaction processing.

What is FORMS_MDI_WINDOW?

Forms run inside the MDI application window. This property is useful for calling a form from another one.

What is mouse navigate property of button?

When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. 

When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.

What are referenced objects?

Referencing allows you to create objects that inherit their functionality and appearance from other objects.
Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.

What are object group?

An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module.

Monday 12 August 2013

How many types of canvases are there?

There are 5 types of canvases:
1.     Content: (Default Canvas) A content canvas is the required on each window you create.
2.     Stack Canvas: you can display more than one stack canvas in a window at the same time.  
3.     TAB Type: In Tab canvas that have tab pages and have one or more then tab page. 
4.     Horizontal Tool bar: Horizontal Toolbar canvases are displayed at the top of the window, Just Under the Main Menu Bar.
5.     Vertical Tool bar: While vertical Toolbar are displayed along the Left Edge of the window.

Can object group have a block?

Yes, object group can have block as well as program units.

Can you store pictures in database? How?

Yes, in long Raw datatype.

If you have property class attached to an item and you have same trigger written for the item. Which will fire first?

Item level trigger fires, If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.

What are the different layout objects?

There are 4 types of layout objects.
A.    Frames: Frames surround other layout objects, enabling control of multiple objects simultaneously, ensuring that they maintain their positions relative to each other in the report. A frame might be used to surround all objects owned by a group, to surround column labels.
B.    Repeating Frames: Repeating frames act as placeholder for groups (repeating values) and for rows of data retrieved from the database. Repeating frames repeat as often as the number of rows retrieved.
C.    Fields: Fields act as placeholder for column values. They define the formatting attributes for all columns displayed in the report. A field can be placed inside a frame.
D.   Boilerplate: Boilerplate consists of text and graphics that appear in a report each time it is run.

How To create two or more layout in report 6i?

Create 2 layouts each in a separate main frame.
Create these 2 main frames one below the other. No layout should cross x-axis and Y-axis.
After that create one user parameter and write a format trigger on all the main frames.
--In format trigger of first Main frame mention for first layout to display
if :p_parameter = 1 then
return true;
end if;  
--In format trigger of second Main frame mention for Second layout to display
if :p_parameter = 2 then
return true;
end if;
Similarly write format triggers for all the remaining main frames.
When you run the report, Based on the value you provide for p_parameter the format trigger
will display only one frame If You enter p_parameter value as 1 then first layout willbe displayed as output.
If You enter p_parameter value as 2 then second layout willbe displayed as output.
Create anchors between the frames, so that there won’t be any space left when other frames are not displayed.