Top Banner
SQL Interview Questions 1. The most important DDL statements in SQL are: CREATE TABLE - creates a new database table ALTER TABLE - alters (changes) a database table DROP TABLE - deletes a database table TRUNCATE - cleans all data RENAME- renames a table name 2. Operators used in SELECT statements. = Equal <> or != Not equal > Greater than <>= Greater than or equal <= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern 3. SELECT statements: SELECT column_name(s) FROM table_name SELECT DISTINCT column_name(s) FROM table_name SELECT column FROM table WHERE column operator value SELECT column FROM table WHERE column LIKE pattern SELECT column,SUM(column) FROM table GROUP BY column SELECT column,SUM(column) FROM table GROUP BY column HAVING SUM(column) condition value Note that single quotes around text values and numeric values should not be enclosed in quotes. Double quotes may be acceptable in some databases. 4. The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records. SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name operator value 5. The INSERT INTO Statements: INSERT INTO table_name VALUES (value1, value2,....) INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....) 6. The Update Statement: UPDATE table_name SET column_name = new_value WHERE column_name = some_value
59
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: quesns

SQL Interview Questions

1. The most important DDL statements in SQL are:CREATE TABLE - creates a new database tableALTER TABLE - alters (changes) a database tableDROP TABLE - deletes a database tableTRUNCATE - cleans all dataRENAME- renames a table name

2. Operators used in SELECT statements.= Equal<> or != Not equal> Greater than<>= Greater than or equal<= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern

3. SELECT statements:SELECT column_name(s) FROM table_nameSELECT DISTINCT column_name(s) FROM table_nameSELECT column FROM table WHERE column operator valueSELECT column FROM table WHERE column LIKE patternSELECT column,SUM(column) FROM table GROUP BY columnSELECT column,SUM(column) FROM table GROUP BY column HAVING SUM(column) condition valueNote that single quotes around text values and numeric values should not be enclosed in quotes. Double quotes may be acceptable in some databases.

4. The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records.SELECT column_name(s) INTO newtable [IN externaldatabase] FROM sourceSELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name operator value

5. The INSERT INTO Statements:INSERT INTO table_name VALUES (value1, value2,....)INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)

6. The Update Statement:UPDATE table_name SET column_name = new_value WHERE column_name = some_value

7. The Delete Statements:DELETE FROM table_name WHERE column_name = some_valueDelete All Rows:DELETE FROM table_name or DELETE * FROM table_name

8. Sort the Rows:SELECT column1, column2, ... FROM table_name ORDER BY columnX, columnY, ..SELECT column1, column2, ... FROM table_name ORDER BY columnX DESCSELECT column1, column2, ... FROM table_name ORDER BY columnX DESC, columnY ASC

9. The IN operator may be used if you know the exact value you want to return for at least one of the columns.

Page 2: quesns

SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)

10. BETWEEN ... ANDSELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2 The values can be numbers, text, or dates.

11. What is the use of CASCADE CONSTRAINTS?When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.

12. Why does the following command give a compilation error?DROP TABLE &TABLE NAME; Variable names should start with an alphabet. Here the table name starts with an '&' symbol.

13. Which system tables contain information on privileges granted and privileges obtained? USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD

14. Which system table contains information on constraints on all the tables created?obtained? USER_CONSTRAINTS.

15. State true or false. !=, <>, ^= all denote the same operation?True.

16. State true or false. EXISTS, SOME, ANY are operators in SQL?True.

17. What will be the output of the following query?SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '**'),'*','TROUBLE') FROM DUAL;?

18. What does the following query do?SELECT SAL + NVL(COMM,0) FROM EMP;?This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary.

19. What is the advantage of specifying WITH GRANT OPTION in the GRANT command?The privilege receiver can further grant the privileges he/she has obtained from the owner to any other user.

20. Which command executes the contents of a specified file?START or @.

21. What is the value of comm and sal after executing the following query if the initial value of ‘sal’ is 10000UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1;?sal = 11000, comm = 1000.

22. Which command displays the SQL command in the SQL buffer, and then executes it?RUN.

23. What command is used to get back the privileges offered by the GRANT command?REVOKE.

Page 3: quesns

24. What will be the output of the following query? SELECT DECODE(TRANSLATE('A','1234567890','1111111111'), '1','YES', 'NO' );? NO.Explanation : The query checks whether a given string is a numerical digit.

26. Which date function is used to find the difference between two dates?MONTHS_BETWEEN.

27. What operator performs pattern matching?LIKE operator.

28. What is the use of the DROP option in the ALTER TABLE command?It is used to drop constraints specified on the table.

29. What operator tests column for the absence of data?IS NULL operator.

30. What are the privileges that can be granted on a table by a user to others?Insert, update, delete, select, references, index, execute, alter, all.

31. Which function is used to find the largest integer less than or equal to a specific value?FLOOR.

32. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?Data Definition Language (DDL).

33. What is the use of DESC in SQL?DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order.Explanation :The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.

34. What command is used to create a table by copying the structure of another table?CREATE TABLE .. AS SELECT commandExplanation:To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following.CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table.

35. TRUNCATE TABLE EMP;DELETE FROM EMP;Will the outputs of the above two commands differ?Both will result in deleting all the rows in the table EMP..

36. What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL;?1200.

37. What are the wildcards used for pattern matching.?_ for single character substitution and % for multi-character substitution.

Page 4: quesns

38. What is the parameter substitution symbol used with INSERT INTO command?&

39. What's an SQL injection?SQL Injection is when form data contains an SQL escape sequence and injects a new SQL query to be run.

40. What is difference between TRUNCATE & DELETETRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATEDELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire on DELETE.

41. What is a join? Explain the different types of joins?Join is a query, which retrieves related columns or rows from multiple tables.Self Join - Joining the table with itself.Equi Join - Joining two tables by equating two common columns.Non-Equi Join - Joining two tables by equating two common columns.Outer Join - Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.

42. What is the sub-query?Sub-query is a query whose return values are used in filtering conditions of the main query.

43. What is correlated sub-query?Correlated sub-query is a sub-query, which has reference to the main query.

44. Explain CONNECT BY PRIOR?Retrieves rows in hierarchical order eg.select empno, ename from emp where.

45. Difference between SUBSTR and INSTR?INSTR (String1, String2 (n, (m)),INSTR returns the position of the m-th occurrence of the string 2 in string1. The search begins from nth position of string1.SUBSTR (String1 n, m)SUBSTR returns a character string of size m in string1, starting from n-th position of string1.

46. Explain UNION, MINUS, UNION ALL and INTERSECT?INTERSECT - returns all distinct rows selected by both queries.MINUS - returns all distinct rows selected by the first query but not by the second.UNION - returns all distinct rows selected by either queryUNION ALL - returns all rows selected by either query, including all duplicates.

47. What is ROWID?ROWID is a pseudo column attached to each row of a table. It is 18 characters long, blockno, rownumber are the components of ROWID.

48. What is the fastest way of accessing a row in a table?Using ROWID.CONSTRAINTS

Page 5: quesns

49. What is an integrity constraint?Integrity constraint is a rule that restricts values to a column in a table.

50. What is referential integrity constraint?Maintaining data integrity through a set of rules that restrict the values of one or more columns of the tables based on the values of primary key or unique key of the referenced table.

51. What is the usage of SAVEPOINTS?SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.

52. What is ON DELETE CASCADE?When ON DELETE CASCADE is specified Oracle maintains referential integrity by automatically removing dependent foreign key values if a referenced primary or unique key value is removed.

53. What are the data types allowed in a table?CHAR, VARCHAR2, NUMBER, DATE, RAW, LONG and LONG RAW.

54. What is difference between CHAR and VARCHAR2? What is the maximum SIZE allowed for each type?CHAR pads blank spaces to the maximum length.VARCHAR2 does not pad blank spaces.For CHAR the maximum length is 255 and 2000 for VARCHAR2.

55. How many LONG columns are allowed in a table? Is it possible to use LONG columns in WHERE clause or ORDER BY?Only one LONG column is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.

56. What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constraint?- To modify the datatype of a column the column must be empty.- To add a column with NOT NULL constrain, the table must be empty.

57. Where the integrity constraints are stored in data dictionary?The integrity constraints are stored in USER_CONSTRAINTS.

58. How will you activate/deactivate integrity constraints?The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE CONSTRAINT / DISABLE CONSTRAINT.

59. If unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE?It won't, Because SYSDATE format contains time attached with it.

60. What is a database link?Database link is a named path through which a remote database can be accessed.

61. How to access the current value and next value from a sequence? Is it possible to access the current value in a session before accessing next value?Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next

Page 6: quesns

value in the session, current value can be accessed.

62.What is CYCLE/NO CYCLE in a Sequence?CYCLE specifies that the sequence continue to generate values after reaching either maximum or minimum value. After pan-ascending sequence reaches its maximum value, it generates its minimum value. After a descending sequence reaches its minimum, it generates its maximum.NO CYCLE specifies that the sequence cannot generate more values after reaching its maximum or minimum value.

63. What are the advantages of VIEW?- To protect some of the columns of a table from other users.- To hide complexity of a query.- To hide complexity of calculations.

64. Can a view be updated/inserted/deleted? If Yes - under what conditions?A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.

65. If a view on a single base table is manipulated will the changes be reflected on the base table?If changes are made to the tables and these tables are the base tables of a view, then the changes will be reference on the view.

66. Which of the following statements is true about implicit cursors?1. Implicit cursors are used for SQL statements that are not named.2. Developers should use implicit cursors with great care.3. Implicit cursors are used in cursor for loops to handle data processing.4. Implicit cursors are no longer a feature in Oracle.

67. Which of the following is not a feature of a cursor FOR loop?1. Record type declaration.2. Opening and parsing of SQL statements.3. Fetches records from cursor.4. Requires exit condition to be defined.

66. A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?1. Use employee.lname%type.2. Use employee.lname%rowtype.3. Look up datatype for EMPLOYEE column on LASTNAME table and use that.4. Declare it to be type LONG.

67. Which three of the following are implicit cursor attributes?1. %found2. %too_many_rows3. %notfound4. %rowcount5. %rowtype

68. If left out, which of the following would cause an infinite loop to occur in a simple loop?1. LOOP2. END LOOP

Page 7: quesns

3. IF-THEN4. EXIT

69. Which line in the following statement will produce an error?1. cursor action_cursor is2. select name, rate, action3. into action_record4. from action_table;5. There are no errors in this statement.

70. The command used to open a CURSOR FOR loop is1. open2. fetch3. parse4. None, cursor for loops handle cursor opening implicitly.

71. What happens when rows are found using a FETCH statement1. It causes the cursor to close2. It causes the cursor to open3. It loads the current row values into variables4. It creates the variables to hold the current row values

72. Read the following code:10. CREATE OR REPLACE PROCEDURE find_cpt11. (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER)12. IS13. BEGIN14. IF v_cost_per_ticket > 8.5 THEN15. SELECT cost_per_ticket16. INTO v_cost_per_ticket17. FROM gross_receipt18. WHERE movie_id = v_movie_id;19. END IF;20. END;Which mode should be used for V_COST_PER_TICKET?1. IN2. OUT3. RETURN4. IN OUT73. Read the following code:22. CREATE OR REPLACE TRIGGER update_show_gross23. {trigger information}24. BEGIN25. {additional code}26. END;The trigger code should only execute when the column, COST_PER_TICKET, is greater than $3. Which trigger information will you add?1. WHEN (new.cost_per_ticket > 3.75)2. WHEN (:new.cost_per_ticket > 3.753. WHERE (new.cost_per_ticket > 3.75)4. WHERE (:new.cost_per_ticket > 3.75)

Page 8: quesns

74. What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?1. Only one2. All that apply3. All referenced4. None

77. For which trigger timing can you reference the NEW and OLD qualifiers?1. Statement and Row 2. Statement only 3. Row only 4. Oracle Forms trigger

78. Read the following code:CREATE OR REPLACE FUNCTION get_budget(v_studio_id IN NUMBER)RETURN number ISv_yearly_budget NUMBER;BEGINSELECT yearly_budgetINTO v_yearly_budgetFROM studioWHERE id = v_studio_id;RETURN v_yearly_budget;END;Which set of statements will successfully invoke this function within SQL*Plus?1. VARIABLE g_yearly_budget NUMBEREXECUTE g_yearly_budget := GET_BUDGET(11);2. VARIABLE g_yearly_budget NUMBEREXECUTE :g_yearly_budget := GET_BUDGET(11);3. VARIABLE :g_yearly_budget NUMBEREXECUTE :g_yearly_budget := GET_BUDGET(11);4. VARIABLE g_yearly_budget NUMBER31. CREATE OR REPLACE PROCEDURE update_theater32. (v_name IN VARCHAR v_theater_id IN NUMBER) IS33. BEGIN34. UPDATE theater35. SET name = v_name36. WHERE id = v_theater_id;37. END update_theater;

79. When invoking this procedure, you encounter the error:ORA-000:Unique constraint(SCOTT.THEATER_NAME_UK) violated.How should you modify the function to handle this error?1. An user defined exception must be declared and associatedwith the error code and handled in the EXCEPTION section.2. Handle the error in EXCEPTION section by referencing the errorcode directly.3. Handle the error in the EXCEPTION section by referencing the UNIQUE_ERROR predefined exception.4. Check for success by checking the value of SQL%FOUND immediately after the UPDATE statement.

80. Read the following code:40. CREATE OR REPLACE PROCEDURE calculate_budget IS41. v_budget studio.yearly_budget%TYPE;

Page 9: quesns

42. BEGIN43. v_budget := get_budget(11);44. IF v_budget < 3000045. THEN46. set_budget(11,30000000);47. END IF;48. END; You are about to add an argument to CALCULATE_BUDGET.What effect will this have?1. The GET_BUDGET function will be marked invalid and must be recompiled before the next execution.2. The SET_BUDGET function will be marked invalid and must be recompiled before the next execution.3. Only the CALCULATE_BUDGET procedure needs to be recompiled.4. All three procedures are marked invalid and must be recompiled.

81. Which procedure can be used to create a customized error message?1. RAISE_ERROR2. SQLERRM3. RAISE_APPLICATION_ERROR4. RAISE_SERVER_ERROR

82. The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?1. ALTER TRIGGER check_theater ENABLE;2. ENABLE TRIGGER check_theater;3. ALTER TABLE check_theater ENABLE check_theater;4. ENABLE check_theater;

83. Examine this database trigger52. CREATE OR REPLACE TRIGGER prevent_gross_modification53. {additional trigger information}54. BEGIN55. IF TO_CHAR(sysdate, DY) = MON56. THEN57. RAISE_APPLICATION_ERROR(-20000,Gross receipts cannot be deleted on Monday);58. END IF;59. END;This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire DELETE statement. What additional information must you add?1. BEFORE DELETE ON gross_receipt2. AFTER DELETE ON gross_receipt3. BEFORE (gross_receipt DELETE)4. FOR EACH ROW DELETED FROM gross_receipt

84. Examine this function:61. CREATE OR REPLACE FUNCTION set_budget62. (v_studio_id IN NUMBER, v_new_budget IN NUMBER) IS63. BEGIN64. UPDATE studio65. SET yearly_budget = v_new_budget WHERE id = v_studio_id; IF SQL%FOUND THEN RETURN TRUEl; ELSE RETURN FALSE; END IF; COMMIT; END; Which code must be added to successfully compile this function?

Page 10: quesns

1. Add RETURN right before the IS keyword.2. Add RETURN number right before the IS keyword.3. Add RETURN boolean right after the IS keyword.4. Add RETURN boolean right before the IS keyword.

85. Under which circumstance must you recompile the package body after recompiling the package specification?1. Altering the argument list of one of the package constructs2. Any change made to one of the package constructs3. Any SQL statement change made to one of the package constructs4. Removing a local variable from the DECLARE section of one of the package constructs

86. Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?1. When the transaction is committed2. During the data manipulation statement3. When an Oracle supplied package references the trigger4. During a data manipulation statement and when the transaction is committed

87. Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?1. DBMS_DISPLAY2. DBMS_OUTPUT3. DBMS_LIST4. DBMS_DESCRIBE

88. What occurs if a procedure or function terminates with failure without being handled?1. Any DML statements issued by the construct are still pending and can be committed or rolled back.2. Any DML statements issued by the construct are committed3. Unless a GOTO statement is used to continue processing within the BEGIN section,the construct terminates.4. The construct rolls back any DML statements issued and returns the unhandled exception to the calling environment.

89. Examine this code71. BEGIN72. theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;73. END; For this code to be successful, what must be true?1. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist only in the body of the THEATER_PCK package.2. Only the GET_TOTAL_FOR_YEAR variable must exist in the specification of the THEATER_PCK package.3. Only the V_TOTAL_SEATS_SOLD_OVERALL variable must exist in the specification of the THEATER_PCK package.4. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist in the specification of the THEATER_PCK package.

90. A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable this feature?1. DBMS_DDL

Page 11: quesns

2. DBMS_DML3. DBMS_SYN4. DBMS_SQL

91 How to implement ISNUMERIC function in SQL *Plus ? Method1: Select length (translate(trim (column_name),'+-.0123456789',''))from dual; Will give you a zero if it is a number or greater than zero if not numeric (actually gives the count of non numeric characters) Method 2: select instr(translate('wwww','abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ','XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX'),'X') FROM dual; It returns 0 if it is a number, 1 if it is not.

92 How to Select last N records from a Table? select * from (select rownum a, CLASS_CODE,CLASS_DESC from clm) where a > ( select (max(rownum)-10) from clm) Here N = 10The following query has a Problem of performance in the execution of the followingquery where the table ter.ter_master have 22231 records. So the results are obtainedafter hours.Cursor rem_master(brepno VARCHAR2) ISselect a.* from ter.ter_master awhere NOT a.repno in (select repno from ermast) and(brepno = 'ALL' or a.repno > brepno)Order by a.repnoWhat are steps required tuning this query to improve its performance?-Have an index on TER_MASTER.REPNO and one on ERMAST.REPNO-Be sure to get familiar with EXPLAIN PLAN. This can help you determine the executionpath that Oracle takes. If you are using Cost Based Optimizer mode, then be sure thatyour statistics on TER_MASTER are up-to-date. -Also, you can change your SQL to:SELECT a.*FROM ter.ter_master aWHERE NOT EXISTS (SELECT b.repno FROM ermast bWHERE a.repno=b.repno) AND(a.brepno = 'ALL' or a.repno > a.brepno)ORDER BY a.repno;

93. What is the difference between Truncate and Delete interms of Referential Integrity?DELETE removes one or more records in a table, checking referential Constraints (to see if there are dependent child records) and firing any DELETE triggers. In the order you are deleting (child first then parent) There will be no problems.TRUNCATE removes ALL records in a table. It does not execute any triggers. Also, itonly checks for the existence (and status) of another foreign key Pointing to thetable. If one exists and is enabled, then you will get The following error. Thisis true even if you do the child tables first.ORA-02266: unique/primary keys in table referenced by enabled foreign keysYou should disable the foreign key constraints in the child tables before issuingthe TRUNCATE command, then re-enable them afterwards.

Page 12: quesns

Concurrent Program Submission Through Backend

declarel_request_id number(9) ;beginl_request_id := Fnd_Request.submit_request( 'PO', -Concurrent Prog Application Name'SQL-USERS', -Conccurrent Prog Short Name'Users Data', -Concurrent Prog description '',-start time '',-sub request 1000,-first parameter value 2000,-second parameter value'CREATION_DATE');-third parameter valueCommit;if l_request_id = 0then fnd_file.put_line(fnd_file.log,'Prograqm not sumitted Succesfully');elsefnd_file.put_line(fnd_file.log,'Prograqm sumitted Succesfully Request ID ='l_request_id);End If;Exceptionwhen others thenfnd_file.put_line(fnd_file.log,'Error occured during Porgram submission');End ;

from Triggersdeclarel_request_id number(9) ;beginl_request_id := Fnd_Request.submit_request( 'PO', -Concurrent Prog ApplciationName'SQL-USERS', -Conccurrent Prog Short Name'Users Data', -Concurrent Prog description '',-start time '',-sub request 1000,-first parameter value 2000,-second parameter value'CREATION_DATE','','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','' '','','','','','','','','','');Commit;if l_request_id = 0 thenfnd_file.put_line(fnd_file.log,'Prograqm not sumitted Succesfully');elsefnd_file.put_line(fnd_file.log,'Prograqm sumitted Succesfully Request ID ='l_request_id);End If;Exceptionwhen others thenfnd_file.put_line(fnd_file.log,'Error occured during Porgram submission');End ;fnd_global.apps_initialize(user_id, Resp_id, Resp_appl_id);-To initialize the Application Environment by specifying the UserID and RespID system will verify

Page 13: quesns

the User Access details based on that it will submit the Program.1)fnd_Program.executable2)fnd_program.register3)fnd_program.request_group4)fnd_program.add_to_group - Add concurrent Pogram to the Group5)fnd_program.parameter - To create parameters for concurrent Program6)fnd_program.incompatibility - TO attach Incompatibility Programs List7)fnd_program.delete_group - To delete the Request GroupAny Table ,Procedure,Package,view any database Object starting with "FND" then it is relatedfor AOL(Application Obejct Library) , AOL ObjectSchema Name :APPLSYS"fnd" is nothing but foundation

PL-SQL Interview Questions

PL-SQL Interview Questions

1. Describe the difference between a procedure, function and anonymous pl/sql block.Level: LowExpected answer : Candidate should mention use of DECLARE statement, a function mustreturn a value while a procedure doesn?t have to.

2. What is a mutating table error and how can you get around it?Level: IntermediateExpected answer: This happens with triggers. It occurs because the trigger is tryingto update a row it is currently using. The usual fix involves either use of viewsor temporary tables so the database is selecting from one while updating the other.

3. Describe the use of %ROWTYPE and %TYPE in PL/SQLLevel: LowExpected answer: %ROWTYPE allows you to associate a variable with an entire table row.The %TYPE associates a variable with a single column type.

4. What packages (if any) has Oracle provided for use by developers?Expected answer: Oracle provides the DBMS_ series of packages. There are manywhich developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION,DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL, UTL_FILE. Ifthey can mention a few of these and describe how they used them, even better. Ifthey include the SQL routines provided by Oracle, great, but not really whatwas asked.

5. Describe the use of PL/SQL tablesExpected answer: PL/SQL tables are scalar arrays that can be referenced by abinary integer. They can be used to hold values for use in later queriesor calculations. In Oracle 8 they will be able to be of the %ROWTYPE designation,or RECORD.

6. When is a declare statement needed ?The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone, non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used.

Page 14: quesns

7. In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the NOTFOUND cursor variable in the exit when statement? Why?Expected answer: OPEN then FETCH then LOOP followed by the exit when. If not specified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL.

8. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?Expected answer: SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception.

9. How can you find within a PL/SQL block, if a cursor is open?Expected answer: Use the %ISOPEN cursor status variable.

10. How can you generate debugging output from PL/SQL?Expected answer: Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. The new package UTL_FILE canalso be used.

11. What are the types of triggers?Expected Answer: There are 12 types of triggers in PL/SQL that consist ofcombinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE andALL key words:BEFORE ALL ROW INSERTAFTER ALL ROW INSERTBEFORE INSERTAFTER INSERT etc.

Interview Questions on Oracle Apps AR module – Functional racle Receivables is not an easy module to set-up. To crack the interview is bit more tedious.Below are some of the Functional questions pertaining to Oracle AR module. Just go through them and brush up your skills.

1. How many Address's can have one Customer?Primary Address, Bill – To – Address, Ship – To – Address

2. Customer Number Always Automatic / Manual?Any thing Either Manual or Automatic

3. What are the Mandatory Address's you should create a Customer for Communicate him?Remit – To – Address

4. Can U Merge the Customers? If How?Using the Merging Customer Window

5. What is Accounting Rules?It is For Generating Revenue Recognition Programs like Monthly, Quarterly

6. What is Invoicing Rules?The Invoicing Rules Helps you when you receive data from Outside systems like Auto Invoices how the data should insert and It contains 2 rules Advance Invoice, Arrears Invoice.

7. Where should the customers send the payments of Invoices?Remittance Banks or Vendor Places

Page 15: quesns

8. What is the Transaction Type?It describes us Whether you want transfer the Receivables data into General Ledger or not. And also when ever you create an invoice what are the accounts should be effected and also the sign of Transaction also.

9. What is a Transaction Source?It is For Invoice or Invoice Batch numbers whether automatically or manually

10. How many Transactions we have?Six, Credit Transactions: Invoice: Debit Memo: Charge back: Guarantee: Deposit

11. How can i reduce the Invoice amount?Using with Credit Transactions

12. What are the Accounts to be use in Transaction Types (Few)?Revenue, Receivables, Freight, Tax, Clearing, Unearned, Unbilled

13. How can i Assign a Deposit amount to an Invoice?In the Invoice Window "Commitment" Region

14. What is the Guarantee?It is agreement between both sides for goods or services in the future , specific range of periods

15. Give the Navigation for Credit Transactions?Transactions/Credit Transactions

16. How many ways you can apply the Receipt Amount?Application: Mass Apply

17. How will you know a Customer Balance Amount?Using with the Customer Account Overview window

18. Can U Define Customer Agreements using with AR?No, In the Oracle Order Entry Module

19. What are Aging Buckets?It is for Outstanding Reports purpose the no of days in various ranges

20. How will U View the Outstanding Balance of a Customer?Generating the Aging Buckets Report

Interview Questions on Inventory,Purchasing

Interview Questions on Inventory,Purchasing

Questions:

1. What is an Organization & Location?2. What are the KeyFlexFields in Oracle Inventory Module?3. What are the Attributes of Item Category & System Items?4. What are the KeyFlexFields in Oracle Purchasing & Oracle Payables?5. What are the KeyFlexFields in Oracle HumanResources & Oracle Payroll?6. How would you create an Employee (Module Name) Describe?7. What is a Position Hierarchy? Is there any restriction to create that?8. To whom we call as a Buyer? What are the Responsibilities?9. How do you Setup an Employee as a User – Navigation?10. How many Approval Groups we have? Describe?11. Describe the Types of Requisition?12. How many Status's and Types For RFQ's & Quotations Describe?13. How many Types of Purchase Orders We Have?14. What is a Receipt?15. What is Catlog Rfq?16. Give me online about Planned Po?17. How can the manger view the Approval Documents Information?18. Whether the manager can forward to Any other person? How?19. Can u resend the document your subordinate how?20. What is Po Summary?

Answers:

Page 16: quesns

1. It is a Ware House Which you can Store the Items, And You can setup your business Organization Information Like Key Flexfilelds,Currency,Hr Information and starting time and end time. Location's are like godown place, office place, production point.

2. System items,Item Categories,Account Alias,Sales Order,Item Catalog,Stock Locators

3. The classification of items are Category Like Hard ware and Software, where as the Systems are individual items like Cpu,Key Board.

4. No Flexfields, But the help of Inventory And Human Resources we can use

5. Job Flexfield,Position Flexfield,Grade Flexfiled,Costing,People Group Flexfield,Personal Analysis Flexfield.

6. If Human Resource is Installed Hr/Payroll, If Not I can create Employee using with Gl,Ap,Purchasing,Fixed Assets

7. It is a Grouping of Persons for Approving and Forwarding the Documents from one person to another person, there is no restriction.

8. The Employee is nothing a Buyer, who is responsible for Purchase of Goods or services.

9. Security—-User—-Define, System Administration Module

10. Document Total,Accounts,Items,Item Categories,Location

11. Purchase Requistion,Internal Requistion

12. In Process,Print,Active,Closed for Rfq's In Process,Active,Closed for Quotation

13. Standard,Purchase Agreement,Blanket Po,Planned Po

14. To Register the Purchase orders/Po lines for shipment purpose

15. It contains Price breaks with different quantity levels

16. For a Agreement for long period for goods

17. Notifications Window

18. Yes, In the Notifications Window under the Forward to Push Button

19. Yes, In the Notifications Window under the Forward to Push Button

20. The Purchase Order Summay Information like total lines, and status.

1.We have 2 different databases,and each system has 2 tables. Know there is a link provided between them. The client want a report to be developed based on the 4 tables that r there in the 2 different databases.The solution must be efficient.Assume that the two databases be DB1 and DB2. At one time I could connect to only one database say DB1. Now I should able to access the tables in DB2 from DB1. First I create a DBlink in DB1 that access the tables in DB2. Using the DBlink, create snapshots for each of the tables in DB2. Now we can use these Snapshots in query, as if like tables in DB1.The purpose for creating snapshot is both security and to reduce the network load, for each access of the tables in DB2.

2.what is the difference between _all and with underscore all tables.Tables that end with all are belong to multi-org. They have a field called ORG_ID.

3.Differences between OE and OM.

Page 17: quesns

None of the new features in R11i Order Management or Shipping Execution have been backported to R11 Order Entry or earlier. The data model changes make the effort impractical.The database appears to support the older SO_% tables and the newer OE_% tables for Order Management.The concurrent process, order import, pick up the data from SO_HEADERS_INTERFACE_ALL and populate both the older SO_HEADERS_ALL and the newer OE_ORDER_HEADERS_ALL table. The SO_HEADERS_ALL table is present for those customers who are upgrading from 10.7 to 11i. The tables are there as part of the installation to facilitate the upgrade process.The 'OE:' profile options are still accessible even though these profile options are not used in 11i. These profile options have been replaced by the 'OM:' profile options.

4. we have a system with 10.7 apps,in that we have 2.5 reports and 4.5 forms. Now there is upgrade from 10.7 to 11i.in that case the reports and forms must be converted into 6i. What r the steps we perform.list them.There are a minor changes in the PL/SQL Script in Forms 4.5 and Reports 2.5 with that of Forms6i and Reports6i. The differences are…CHAR replaced by VARCHAR2String length required for VARCHAR2OUT and IN OUT default expressions removedNULL added to RETURN in functionsObsolete built-inLENGTH function returns NULL for zero-length stringPassing NULL to overloaded subprogram does not resolve properlyMissing RETURN statement in function5. The differences between reports 2.5 and 6iie 4t question answer

6. The differences between forms 4.5 and forms 6i.ie 4t question answer

7. How is the stored procedures in the report are called. what is the use of that.There is no sperate method for calling a database stored procedure in Oracle Reports. When a procedure is called form Oracle Report and a procedure with that name is available at several places namely Program Units, Attached Library and Database. The order will be..1. Program Units2. Attached Library3. Database.

8.what is mutating table and mutating error .Through any example explain how we any over come that error.A mutating table is a table that is currently being modified by an UPDATE, DELETE, or INSERT statement, or it is a table that might need to be updated by the effects of a declarative DELETE CASCADE referential integrity constraint. The restrictions on such a table apply only to the session that issued the statement in progress.Tables are never considered mutating for statement triggers unless the trigger is fired as the result of a DELETE CASCADE. Views are not considered mutating in INSTEAD OF triggers.

Page 18: quesns

For all row triggers, or for statement triggers that were fired as the result of a DELETE CASCADE, there are two important restrictions regarding mutating tables. These restrictions prevent a trigger from seeing an inconsistent set of data.The SQL statements of a trigger cannot read from (query) or modify a mutating table of the triggering statement.

9.what r pl/sql table and explain were in ur project u have used that tables.what r the pl/sql records,and advantages of pl/sql tables and records.A PL/SQL table can store rows (not just a column) of Oracle data. PL/SQL tables of records make it easy to move collections of data into and out of database tables or between client-side applications and stored subprograms. We can even use PL/SQL tables of records to simulate local database tables. Attributes are characteristics of an object. Every PL/SQL table has the attributes EXISTS, COUNT, FIRST, LAST, PRIOR, NEXT, and DELETE. They make PL/SQL tables easier to use and your applications easier to maintain.PL\SQL tables give you the ability to hold multiple values in a structure in memory so that a PL\SQL block does not have to go to the database every time it needs to retrieve one of these values - it can retrieve it directly from the PL\SQL table in memory."global temporary tables" are not in-memory structures. But they do offer greatly-reduced disk I/O compared to standard tables (and therefore usually a significant performance improvement) and they also offer the ease-of-use of standard tables, since standard SQL can be used with them, no special array-processing syntax is required.For processes where every bit of performance improvement is critical, PL\SQL tables are the best way to go.

10. what is data mapping and what type of mapping u have done in ur carrer or in the recent projects.In this task, we map the data elements from the legacy systems to the target Oracle Applications.

11.What is Data cleaning and testing.Data Cleaning: Transformation of data in its current state to a pre-defined, standardized format using packaged software or program modules.Testing: The agreed upon conversion deliverables should be approved by the client representatives who are responsible for the success of the conversion. In addition, three levels of conversion testing have been identified and described in the prepare conversion test plans deliverables.Eg: for Summary Balances in GL we set Test Criteria as Record Counts, Hash Totals, Balances, Journal Debit and Credit.

12.what r the differences between oracle data base 7 and 8.Oracle 7 is a simple RDBMS, where as Oracle 8 is ORDBMS i.e., RDBMS with Object Support. The main add-ons in version 8 are…Abstract DatatypesVarraysPL/SQL TablesNested TablesPartitioned Tablesetc.,

Page 19: quesns

13.what r the lexical parameters and were did u used this in ur project .We define lexical parameters in Oracle Reports. Lexical parameters can dynamically replace clauses in the Select statement in the data model and even the whole select statement.A lexical reference replaces any part of a SELECT statement, such as column names, the FROM clause, the WHERE clause, the ORDER BY clause. To create a lexical reference in a query, prefix the parameter name with an ampersand (&). If the parameter object does not exist, Report Builder does not create. We must always create the parameter for a lexical reference in the Object Navigator.

14.while registering a report and a pl/sql block we pass some parameters, for any pl/sql block we pass 2 additional parameters. Can u list them?It requires 2 IN parameters for a PL/SQL procedure that's registered as a concurrent program in Apps. They are1. errcode IN VARCHAR22. errbuff IN VARCHAR2

15.when “no data found” exception occurs, give any example.A SELECT statement in a PL/SQL block should return one and only one row. If it fails to return a row, then we get this exception.

16.How u can delete the duplicate records from the table.delete from awhere a.rowid != (select max(b.rowid)from bwhere a. = b. anda. = b. ...group by a., a....);------------------------------------------------------------Method 1: SQL> DELETE FROM table_name A WHERE ROWID > (2 SELECT min(rowid) FROM table_name B3 WHERE A.key_values = B.key_values);Method 2: SQL> create table table_name2 as select distinct * from table_name1;SQL> drop table_name1;SQL> rename table_name2 to table_name1;Method 3: (thanks to Kenneth R Vanluvanee)SQL> Delete from my_table where rowid not in(SQL> select max(rowid) from my_tableSQL> group by my_column_name );Method 4: (thanks to Dennis Gurnick)SQL> delete from my_table t1SQL> where exists (select 'x' from my_table t2SQL> where t2.key_value1 = t1.key_value1SQL> and t2.key_value2 = t1.key_value2SQL> and t2.rowid > t1.rowid);

17. In matrix reports minimum how many groups are required.A matrix (crosstab) report contains one row of labels, one column of labels, and information in a grid format that is related to the row and column labels. A distinguishing feature of matrix reports is that the number of columns is not

Page 20: quesns

known until the data is fetched from the database.To create a matrix report, you need at least four groups: one group must be a cross-product group, two of the groups must be within the cross-product group to furnish the "labels," and at least one group must provide the information to fill the cells. The groups can belong to a single query or to multiple queries.

18.How we can call from form to form, form to report.Form to Form:i) call_form('your form name', hide, do_replace);ii) open_form('your form name');The first version can be used to hide the calling form until the called form has been exited The second version leaves both forms open at the same time.Form to Report:Using the RUN_PRODUCT built-in procedure.Eg: Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);Where pl_id is the parameter list through which we pass parameter values to the report.

19.why is ref cursor is used in the reports.A ref cursor query uses PL/SQL to fetch data. Each ref cursor query is associated with a PL/SQL function that returns a strongly typed ref cursor. The function must ensure that the ref cursor is opened and associated with a SELECT statement that has a SELECT list that matches the type of the ref cursor. We base a query on a ref cursor when you want to:i) More easily administer SQLii) Avoid the use of lexical parameters in your reportsiii) Share datasources with other applications, such as Form Builderiv) Increase control and securityv) Encapsulate logic within a subprogramFurthermore, if we use a stored program unit to implement ref cursors, we receive the added benefits that go along with storing your program units in the Oracle database.

21.what r the transaction types in OM.With the release of Oracle Order Management 11i, Order Cycles have been replaced by Oracle Workflow definitions, and Order Types have been replaced by Order Management Transaction Types. Order Management provides seeded Workflow process definitions for both orders and lines, and Order Management also enables you to define both order header and Order Line transaction types.Note: Order Management provides NO seeded transaction types. For existing Oracle Order Entry customers, Order Management will update existing Order Types to order and line transaction types during the upgrade process.Order Management Transaction types:i) Determine the workflow processes executed for both the order and lineii) Can act as sources for order and line level attribute defaultingiii) Can establish order or line level processing constraintsiv) Can default from the Customer, Ship To, Bill To, or Deliver-To site at the order header, and line transaction types can default from the order transaction type.v) Enable you to group orders and linesvi) Can specific processing controls for an order or line based upon the transaction type entered. For example, the Scheduling level controls the way

Page 21: quesns

scheduling works at the time of order entry for lines.

22.what r the different types of orders in OM.

23. where does u find the order status column, in which table. If the order which comes in from legacy fails due to some validation, where does the order goes from here. what is the next step to deal with that order.In the base tables, Order Status is maintained both at the header and line level. The field that maintains the Order status is FLOW_STATUS_CODE. This field is available in both the OE_ORDER_HEADERS_ALL and OE_ORDER_LINES_ALL.

24.the order which comes from legacy while it may be a CRM (seibel).it is a service order it must not go to the shipping module ,it must go to AR directly how it will go. can u tell thatBASICALLY WHAT EVER ORDER COMES FROM LEGANCY IT COMES TO OM MODULE THEN THE STATUS IS CHANGED AND IT MAY GO TO INVENTORY OR SHIPPING THEN IT GOES TO AR, but for the service order it has to go to AR directly. How is it possible?http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=118171.1

25. what r the parameter passed to run a report.P_CONC_REQUEST_ID

26. what is the schema attached to OA.APPS schema.

27. when we run the order import program it validates and the errors occurred can be seen in ?Responsibility: Order Management Super UserNavigation: Order, Returns > Import Orders > Corrections

28.when we create a report we use the tables, there is some difference when we use the multi-org tables and ordinary tables, can u tell the difference?If we are using Multi-Org tables, we must define a user parameter, P_CONC_REQUEST_ID with Number(15).

29.what is a template and what is its use.we have predefined template and we can define user defined template.can u tell why we use the user definr=ed template.We can define user-defined templates. Templates are like format that applied on the data. I didn't develop new template in the Reports.

30. How many libraries we can attach to a formAs such there is no limit

31. I moved this field into that repeating frame, but I’m still getting a ”frequency below it’s group” error.http://www.dbasupport.com/oracle/faq/Detailed/351.shtmlMoving fields around does not change what enclosing object is considered it's parent group. Oracle carefully remembers what repeating frame a field was

Page 22: quesns

originally placed in and assigns that as it's parent. If you then reference a column further down the line of the query structure it will return that error. If you are not exactly sure which repeating frame a field belongs to, try dragging it out of all of them. Whichever frame will not allow it to escape is it's parent. To change a field's parent, first click on the lock button on the speedbutton bar. It should now look like an unlocked padlock. Now all of the fields on the layout can be repositioned regardless of their original parent items. When you are satisfied with the repositioning click the lock button again to lock the layout. Oracle will parse the layout and assumes that any item fully enclosed in a repeating frame is a child object of that frame.Sometimes, for unknown and mysterious reasons, this method does not work. The alternative in this case is to highlight the field (or fields), cut it (cntrl-x), and then paste it into the desired frame. The paste does not initially set it into the right frame, but if we drag and drop it there before clicking on any other objects, and then click on something else, Oracle will usually figure what our intent was and assign the object(s) as a child of that frame.One note though, if we are reassigning a group of fields, make sure the frame we are going to move them into is large enough to accept the whole group at once before we do the cut/paste.If this technique also fails, we are probably going to have to delete and then recreate the objects within the desired frame. If the object has triggers attached, save yourself some typing by creating the new object in the right frame, copying over the trigger code, and then deleting the old object.

32. I switched the page size to 11x 8.5,but the printer still prints in Portriat.http://www.orafaq.org/faqrep.htmEven though we set the page size in the report properties, there is a another variable in the system parameters section under the data model in the object navigator called orientation. This sets the printer orientation. Oracle starts by setting it to "default" which means that no matter how we set the page size, the user's default printer setup will be used. We can also set it to either "Landscape" or "Portrait" to force the printer orientation no matter what the user has set as default.

33. I must put a repeating frame around these fields. How do I do this easily?.Oracle looks at the layout, as a sort of layered inheritance model such that anything created on top of and completely inside another object is by definition a child of that object. Creation order is therefore critical to the layout process.First, you can place the new repeating frame in the correct place and then use the techniques shown above in the "I moved this field but am still getting a frequency error" to reassign the fields into the new frame.A second choice, Go ahead and draw the new frame around the fields we want to have placed in it. Now if we try to click on one of the fields you will not be able to as they are fully covered by the new frame. Now go to the "Arrange" menu, use the "send backwards" option to move the frame backwards until all of the fields have popped to the front and are now enclosed in it. Oracle reassigns the new repeating frame as each object's parent as they pop to the front.

34. How do I change the printed value of a field at runtime. What is call form stack?i) Use Format Trigger for that field. Format triggers are PL/SQL functions

Page 23: quesns

executed before the object is formatted. The trigger can be used to dynamically change the formatting attributes of the object. The function must return a Boolean value (TRUE or FALSE). Depending on whether the function returns TRUE or FALSE, the current instance of the object is included or excluded from the report output.Format triggers do not affect the data retrieved by the report. i.e., the data for the field is retrieved even though the field does not appear in the output.ii) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack.The call form stack problem, typically happens when we mix OPEN_FORM and CALL_FORMs together. If A issues an OPEN_FORM to start B, and then we issue a CALL_FORM in A to start C, we cannot issue a CALL_FORM from B to start D because we can have only one call form stack open at one time.

35.what is the difference between the snapshot and synonym?A synonym is another name assigned to a table for easy identification. For example, if we refer to tables residing in other accounts or databases, we may find it convenient to define a synonym for the long string of identifiers. If a table name changes, we can simply redefine the synonym rather than rewrite all related queries. This is particularly useful if we regularly refer to tables with long or oblique names. For example, we could create a synonym 'ORG' for the unwieldy FUNCTIONAL_ORGANIZATION_TABLE, or create an easier-to-remember synonym 'PRODUCT' for the LEDGER_PRODUCT_CHARTFIELD table.A snapshot refers to read-only copies of a master table or tables located on a remote node. A snapshot can be queried, but not updated; only the master table can be updated. A snapshot is periodically refreshed to reflect changes made to the master table. In this sense, a snapshot is really a view with periodicity.

36. what is the difference between anonymous block and a procedure.Anonymous Block is a block of instructions in PL/SQL and SQL which is not saved under a name as an object in database schema. It is also not compiled and saved in server storage, so it needs to be parsed and executed each time it is run. However, this simple form of program can use variables, can have flow of control logic, can return query results into variables and can prompt the user for input using the SQL*Plus '&' feature as any stored procedure.A Stored Procedure is a named program running in the database that can take complex actions based on the inputs send to it. Using a stored procedure is faster than doing the same work on a client, because the program runs right inside the database server. Stored procedures are nomally written in PL/SQL.The Stored Procedure needs to be validated, and if necessary to be recompile.Put it in a package and try pinning the package with dbms_shared_pool.keep('')

37. What are user exits and why do u use them what is their use?To access profile values, multiple organizations, or Oracle Applications user exits, and for program to be used with concurrent processing at all, we must have the first and last user exits called by your Oracle Reports program be FND SRWINIT and FND SRWEXIT.

38. While importing items from the legacy system through items interface what

Page 24: quesns

profile options do u set.There are two profile options that we need to check, before running the Item Import. They arei) PRIMARY_UNIT_OF_MEASURE from INV: Define Primary Unit of Measureii) INVENTORY_ITEM_STATUS_CODE from INV: Define Item Status

39. Maximum how many libraries can u attach to a form.This information is older one. It’s included here for conceptual understanding.The libraries are attached to modules at design time, and although the actual program units are not loaded into memory until they are needed, the .lib file is attached and a file handle is held for future use. Under Windows there is currently a limit of 20 file handles per application, this limit is unchanged by the use of the FILES DOS variable. When using Oracle Forms for example, before the application is executed, Forms has taken up to 10 file handles already for itself. This clearly depletes the number left for the application.The only modules this limit effects are the libraries, other CDE (Cooperative Development Environment) modules (fmx, mmx files etc.) when executed, are loaded into memory and then closed at the file level. This implies the need for 2 (to be safe) or more 'floating' file handles needed to perform this task.This now leaves the application a maximum of 8 spare handles, which in turn only allows the application to attach up to 8 libraries. As this is a limit under Windows, there is little the application developer can do to work around this.If this limit becomes an issue the only solution is to use the referencing facilities within the CDE products.

40. The vendor information in the purchasing module is distributed in 3 to 4 tables which column will keep the tables integrated to get the data I mean by which column we can track the data in different tables.PO_VENDORS and PO_VENDOR_SITES_ALL are the primary vendor tables. They are connected by a column namely “VENDOR_ID”.

41. When a form call a pl/sql routine if there is an error in the pl/sql routine how do u place custom message in the form, which API will u use.FND_MESSAGE.SHOW displays an informational message in a forms modal window or in a concurrent program log file only.fnd_message.set_string('Message Text');fnd_message.show;FND_MESSAGE.HINT to display a message in the forms status line and FND_MESSAGE.ERASE to clear the forms status line. FND_MESSAGE.HINT takes its message from the stack, displays the message, and then clears that message from the message stack.

42. We can import items from legacy system using item import interface using the SRS. if I want to import using the UNIX Commands or pl/sql with out using SRS how do I do it.From the operating system, use CONCSUB to submit a concurrent program. It's an easiest way to test a concurrent program.Normally, CONCSUB submits a concurrent request and returns control to the OS prompt/shell script without waiting for the request to complete. The CONCSUB WAIT parameter can be used to make CONCSUB wait until the request has completed before returning control to the OS prompt/shell scriptBy using the WAIT token, the utility checks the request status every 60 seconds

Page 25: quesns

and returns to the operating system prompt upon completion of the request. concurrent manager does not abort, shut down, or start up until the concurrent request completes. If your concurrent program is compatible with itself, we can check it for data integrity and deadlocks by submitting it many times so that it runs concurrently with itself.Syntax: CONCSUB [WAIT= [START=] [REPEAT_DAYS=] [REPEAT_END=] To pass null parameters to CONCSUB, use '""' without spaces for each null parameter.In words: single quote double quote double quote single quoteFollowing is an example of CONCSUB syntax with null parameters:CONCSUB oe/oe OE 'Order Entry Super User' JWALSH CONCURRENT XOE XOEPACK 4 3 '""' 3

To Invoke a Concurrent Program using PL/SQL:i) Just insert a row in FND_CONCURRENT_REQUESTS with the apropriate parameters and commit.ii) Invoke the SUBMIT_REQUEST procedure in FND_REQUEST package.FND_REQUEST.SUBMIT_REQUEST( 'AR', 'RAXMTR', '', '', FALSE, 'Autoinvoice Master Program', sc_time, FALSE, 1, 1020, 'VRP', '01-JAN-00', chr(0), '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');

43. What is an anchor?Anchors are used to determine the vertical and horizontal positioning of a child object relative to its parent.Since the size of some layout objects may change when the report runs (and data is actually fetched), you need anchors to define where you want objects to appear relative to one another. An anchor defines the relative position of an object to the object to which it is anchored. Positioning is based on the size of the objects after the data has been fetched rather than on their size in the editor. It should also be noted that the position of the object in the Layout editor effects the final position in the report output. Any physical offset in the layout is incorporated into the percentage position specified in the Anchor property sheet.

44. How many types of repeating frames are there.Repeating frames surround all of the fields that are created for a group’s columns. The repeating frame prints (is fired) once for each record of the group.Use repeating frames to define record-level layout information. For example, you can specify the direction in which the records print (e.g., Down, Across, Across/Down, etc.) and the spacing between each record., they provide a subset of repeating frame functionality (e.g., they do not have a Maximum Records per Page property).There are two types of repeating frames:Defaultuser-createdDefault Repeating Frames When you accept the Default Layout dialog box, Oracle Reports generates one repeating frame for each group in the data model, and places one field inside it for each of the group's columns. Repeating frames can enclose any layout object, including other repeating frames. Nested

Page 26: quesns

repeating frames are typically used to produce master/detail and break reports. For each record of the outer repeating frame, Oracle Reports will format all related records of the enclosed repeating frame.User-created Repeating Frames Create a repeating frame in the Layout editor by clicking on the Repeating Frame tool, dragging a region, then specifying its properties in its property sheet.

45. What are the difficulties u faced when customizing a form.There is no built-in functionality to validate duplicate record entry in a multi-record block. We need to build a logic to handle this validation.

47. What is the use of item category column in the items interface table.You can use categories and category sets to group your items for various reports and programs. A category is a logical classification of items that have similar characteristics. A category set is a distinct grouping scheme and consists of categories. The flexibility of category sets allows you to report and inquire on items in a way that best suits your needs.Multiple Organizations is enabled in OracleApplications by partitioning some database tables by the Operating Unit. Other tables are shared across Operating Units (and therefore across set of books). Examples of Applications with partitioned tables are Oracle Payables, Oracle Purchasing, Oracle Receivables, Oracle Projects, Oracle Sales & Marketing etc. The name of each corresponding partitioned table is the view name appended by '_ALL'.

48. What are the difficulties u faced when customizing a form.There is no built-in functionality to validate duplicate record entry in a multi-record block. We need to build a logic to handle this validation.

Read more: http://prasanthapps.blogspot.com/2011/04/interview-questions.html#ixzz1kLysd0YI

Oracle ReportsOracle Apps ReportsObjects of Reports builder6iObject NavigatorData ModelLayout ModelParameter FormReport TriggersProperty paletteOverview of Reports StylesTabularForm likeMailing labelForm letterGroup leftGroup aboveMatrixMatrix with groupCreating ReportsWizardManual

Page 27: quesns

Data model objectsGroupSummary columnFormula columnPlaceholder columnData LinkCross ProductLayout Model objectsFieldsRepeating FrameFrameTextAnchorButtonLayout Sections1. Header Section2. Main section3. Trailer sectionParameters ReportsSystem ParametersUser Parameters1. Bind parameter Report2. Lexical parameter Report\Different Triggers in Report6iValidation TriggerFormat TriggerGroup Filter TriggerAction TriggerReport Trigger

Oracle Reports 6iIn this tutorial you will learn about Introduction to Oracle Reports Builder, Report file storage formats, Oracle Reports Builder Tools, Report Wizard, Triggers in Reports, Types of Triggers and Case Study - Creating a Tabular report.Introduction to Oracle Reports BuilderOracle Reports Builder is a powerful enterprise reporting tool used to build reports that dynamically retrieve data from the database, format, display and print quality reports.Reports can be stored in File or Database (Report Builder Tables).Report file storage formats.rdf ReportBinary File Full report definition (includes source code and comments)Modifiable through Builder. Binary, executable Portable if transferred as binary.PL/SQL recompiles on Open/Run.rep ReportBinary Run-Only FileNo source code or comments. Not modifiable binary, executable.Report ExecutablesRWBLD60 Report BuilderRWRUN60 Report RuntimeRWCON60 Report Converter/Compiler [File => Administration => Compile (rdf to rep)/Convert]Oracle Reports Builder ToolsOracle Reports Builder comes with the following componentsObject NavigatorProperty PaletteData Model EditorLayout Model EditorParameter Form EditorObject NavigatorThe Object Navigator shows a hierarchical view of objects in the report. Each item listed is called a node and represents an object or type of object the report can contain or reference.Property PaletteA Property Palette is a window that displays the settings for defining an Oracle reportsobject.Data Model Editor

Page 28: quesns

To specify data for a report, a data model should be defined. A data model is composed of some or all of the following data definition objects.QueriesQueries are SQL Select statements that fetch data from the oracle database. These statements are fired each time the report is run.GroupsGroups determine the hierarchy of data appearing in the report and are primarily used to group columns selected in the query. Oracle report automatically creates a group for each query.Data ColumnsData columns contain the data values for a report. Default data columns, corresponding to the table columns included in each query’s SELECT list are automatically created byoracle reports. Each column is placed in the group associated with the query that selected the column.Formula ColumnsFormulas can be entered in formula columns to create computed columns. Formulas can be written using PL/SQL syntax. Formula columns are generally preceded by CF_ to distinguish from other columns.Summary ColumnsSummary columns are used for calculating summary information like sum, average etc. This column uses a set of predefined oracle aggregate functions. Summary columns are generally preceded by CS_ to distinguish them from other columns.Data LinksData links are used to establish parent-child relationships between queries and groups via column matching.Layout Model EditorA report layout editor contains the following layout objectsFramesFrames surround other layout objects, enabling control of multiple objects simultaneouslyRepeating FramesRepeating frames acts as placeholders for groups (I.e repeating values) and present rows of data retrieved from the database. Repeating frames repeat as often as the number of rows retrieved.FieldsFields acts as placeholders for columns values. They define the formatting attributes for all columns displayed in the report.BoilerplateBoilerplate consists of text (label of the column) and graphics that appear in a report each time it is run.Parameter Form EditorParameter form is a runtime form used to accept inputs from the user.ParametersParameters are variables for a report that accept input from the user at runtime. These parameter values can then be used in the SQL select statements to retrieve data conditionally. Oracle reports creates a set of system parameters at runtime namely report destination type, number of copies etc.Report WizardWhen we create a default Tabular Report using report wizard, the wizard will take you through the below mentioned pagesReport Style Tabular, Form-Like, Mailing Label, Form Letter, Group Left, Group Above, Matrix, Matrix with GroupQuery Type Choose whether to build a SQL query or an Express query.Data Enter a SELECT statement to retrieve the report dataDisplayed Fields Select the fields that you want to display in the output.Fields to Total Select the fields that you want to summarize.Labels for Fields Alter the labels that appear for each field and the width of each field.Template Select the template that you want to use for this report. A template contains standard information such as company logo, date, and so on.Note: The above steps are different for each report style.Group Left & Have an additional page: ‘Groups’Group Above stylesMatrix Reports styles Have 3 additional pages: ‘Matrix Rows’ ‘Columns’ ‘Cells’Mailing Label & Have 4 pages: ‘Report Style’ ‘Data’Form Letter styles ‘Text’ ‘Template’

Page 29: quesns

The difference between Mailing Labels and Form Letters is, Mailing Label shows multiple records on one page while Form Letter shows one record on each page.Triggers in ReportsTypes of TriggersFormula Triggers: Formula triggers are PL/SQL functions that populate columns of type Formula.Format Triggers:Format triggers are PL/SQL functions executed before the object is formatted. These triggers are used to dynamically change the formatting attributes and used to conditionally print and not to print a report column value. These triggers return Boolean values TRUE or FALSE. If the return value of the format trigger is FALSE, the value is not displayed.Action Triggers: Action triggers are used to perform user-defined action. These triggers do not return any value.Validation Triggers: Validation triggers are PL/SQL functions that are executed when a parameter value is entered and the cursor moves to the next parameter. These triggers return Boolean value TRUE / FALSE.Report Triggers: Report triggers enable execution of PL/SQL functions at specific time during execution and formatting of report.Before Parameter FormFires before the Runtime Parameter Form are displayed. Can access the PL/SQL global variables, report level columns and manipulate accordingly.After Parameter FormFires after the Runtime Parameter form are displayed. Used to validate the parameter values.Before ReportFires before the report is executed but after the queries is parsed and date is fetched.Between PagesFires before each page of the report are formatted, except the very first page. This page is used to customize page formatting.After ReportFires after the report previewer are exited, or after report output is sent to a specified destination.Case Study - Create a Tabular reportAfter invoking the report builder and connecting to the database invoke Report wizard.Click on Tools… Report Wizard… to start the report wizard for a new report. Report wizard shows the following tab pages to enter information required for report.Style Totals DataLabels Fields TemplateIn the Style tab select ‘Tabular’ as the report style and Click NextThe Data tab allows creation of an SQL statement using Query Builder or to enter the SQL statement in the multi line edit box provided in the Data tab.Click NextThis will take you to the next tab if your SQL statement syntax is correct.Fields tab is used to specify the fields that must be displayed in tabular format. Select all fields by clicking on >> icon.Click NextThe Totals tab is displayed that allows creation of Summary columns using aggregate functions.This report does not include totals for the selected fields and thus Click Next.The Labels tab is displayed that enable us to change the labels of the columns.Click NextThe Templates tab is displayed that enable us to create report from templates. There are number of pre-determined templates available in Oracle Reports Builder.Select Corporate 1 as the template. Click FinishClick on File. Save to save the report, specify the report name and click OK.Run the report!!

1.What is SRW Package?Ans: The Report builder Built in package know as SRW Package (Sql Report Writer) This package extends reports, Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exit, to format width of the columns, to page break the column, to set the colorsEx: SRW.DO_SQL, It’s like DDL command, we can create table, views , etc.,SRW.SET_FIELD_NUMSRW. SET_FIELD_CHARSRW. SET FIELD _DATE2.What are Lexical Parameters and bind parameters?

Page 30: quesns

Lexical Parameter is a Simple text string that to replace any part of a SELECT statement. Column names, the from clause, where clause or the order by clause. To create a lexical reference in a query we prefix the parameter name with an ampersand (ex. &.dname,)3. What is User Parameters?A parameter, which is created by user. For to restrict values with where clause in select statement.Data type, width, input mask, initial value, validation trigger, list of valuesWe can use Lovs in use in user parameter with static and Dynamic Select Statement.4. What is System Parameters: These are built-in parameters by corporation.BACKGROUND: Is whether the report should run in the foreground or the background.COPIES Is the number of report copies that should be made when the report is printed.CURRENCY Is the symbol for the currency indicator (e.g., "$").DECIMAL Is the symbol for the decimal indicator (e.g., ".").DESFORMAT Is the definition of the output device's format (e.g., landscape mode for a printer). Thisparameter is used when running a report in a character-mode environment, and whensending a bitmap report to a file (e.g. to create PDF or HTML output).DESNAME Is the name of the output device (e.g., the file name, printer's name, mail userid).DESTYPE Is the type of device to which to send the report output (screen, file, mail, printer, orscreen using PostScript format).MODE Is whether the report should run in character mode or bitmap.ORIENTATION Is the print direction for the report (landscape, portrait, default).PRINTJOB Is whether the Print Job dialog box should appear before the report is run.THOUSANDS Is the symbol for the thousand's indicator (e.g., ",").5. How many Types of Reports available in Reports

Tabular form-like form – letter Group leftGroup above matrix Matrix with group Mailing label

Matrix Report: Simple, Group above, NestedSimple Matrix Report required 4 groups1.Cross Product Group2. Row and Column Group3. Cell Group4. Cell column is the source of a cross product summary that becomes the cell content.Frames: 1.Repeating frame for rows (down direction)2.Repeating frame for columns (Across)3.Matrix object the intersection of the two repeating frames6.What Types of Triggers are Available in Reports.

Report level Triggers

Data Model Triggers

Layout Model Triggers

Report Level TriggersBefore parameter form: If u want take parameters passed to the report and manipulate them so that they appear differently in the parameter form., this is where modification can be done for ex: when u want pass a deptno but show the dname selected , use a before parameter form trigger.After parameter form & Before Report: These two triggers are fired one after the other. No event occurs in between them. However the way the way that the reports product behaves when the triggers fail is quite different. If the After Parameter trigger fails the report will be put back into the parameter form. It’s useful to place code here to check whether values in your parameter form are valid. Even though the Before Report trigger is executed before the query runs, if this trigger fails it won’t fail until reports tries to display the first page of the report. This means that even if something goes wrong in the before report trigger (meaning that you may not want to run the query at all) It will run anywayBetween pages: This Trigger fires before all pages except first page one. It will not fire after the last page of a report. If a report only has one page it will not fire at all. You can use this trigger to send specific control to the change the paper orientation or to do double sided printingAfter report: This trigger fires the report has printed or in the case of a screen report, after the report is closed following viewing. This trigger can be used to update a global variable if u r

Page 31: quesns

returning the number of pages in a report. It is also used to delete temporary table used to print the reportData Model TriggersFormula Column, Group Filter, Parameter valuesLayout Model Triggers7. What is Format triggers.Format triggers enable you to modify the display of objects dynamically at run time or to suppress display altogetherFor Headings, for repeating frames, for field, for boilerplate objectTo format a column based on certain criteria for example

i) To format the max(Sal) for particular department.ii) To format the Sal column with a Dollar($) prefix.iii) To format Date formats….etc

8. What is Data Model?Data Model is logically group of the Report Objects through query and Data model tools . Once query is compiled report automatically generates group. The queries build the groups ant then Groups are used to populate the report. The only function of queries in report is to create the groups. The Report Editor's Data Model view enables you to define and modify the data model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships. To create the query objects for your data model, you can use the Report Wizard, Data Wizard, or the Query tools in the tool palette.9. What is Layout model?Layout Model is to Physically arrange Data model group objects on the Report. The Report Editor's Layout Model view enables you to define and modify the layout model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships.10 What is Livepreviewer?Ans: The Live Previewer is a work area in which you can preview your report and manipulate the actual, or live data at the same time. In the Live Previewer you can customize reports interactively, meaning that you can see the results immediately as you make each change.To activate buttons in the Live Previewer, you must display the report output in the Runtime Previewer. In order to edit your report, such as changing column size ,move columns, align columns insert page numbers, edit text, change colors, change fonts set format masks, insert field the Live Previewer must be in Flex Mode.AccessTitleViewing regionRulersGridToolbarStyle barTool paletteStatus bar11. What is Parameter FormAns: Parameters are variables for report that users can change at runtime immediately prior to the execution of the report. You can use system parameters to specify aspects of report execution, such as the output format, printer name , mailed or number of copies. We can also create own parameters through sql or Pl/sql at runtime.The Parameter Form view is the work area in which you define the format of the report's Runtime Parameter Form. To do this, you define and modify parameter form objects (fields and boilerplate).When you run a report, Report Builder uses the Parameter Form view as a template for the Runtime Parameter Form. Fields and boilerplate appear in the Runtime Parameter Form exactly as they appear in the Parameter Form view. If you do not define a Runtime Parameter Form in the Parameter Form view, Report Builder displays a default Parameter Form for you at runtime.12.   What is Query?The first thing in data model is the query. Through query we access database objects with sql query. Compiled query creates groups. We can create query through query builder, sql query and import query from o/s file or database.13. What is Group?Ans: Groups are created to organize the columns in your report. When you create a query, Report Builder automatically creates a group that contains the columns selected by the

Page 32: quesns

query. You create additional groups to produce break levels in the report, either manually or by using the Report Wizard to create a group above or group left report.14 What is Repeating Frame?Ans: Repeating frames surround all of the fields that are created for a group’s columns.Repeating frames correspond to groups in the data model. Each repeating frame must to be associated with a group of data model The repeating frame prints (is fired) once for each record of the group.15. What is Reference Cursor?A ref cursor query uses PL/SQL to fetch data. Each ref cursor query is associated with a PL/SQL function that returns a strongly typed ref cursor. The function must ensure that the ref cursor is opened and associated with a SELECT statement that has a SELECT list that matches the type of the ref cursor.You base a query on a ref cursor when you want to:n more easily administer SQLn avoid the use of lexical parameters in your reportsn share datasources with other applications, such as Form Buildern increase control and securityn encapsulate logic within a subprogramFurthermore, if you use a stored program unit to implement ref cursors, you receive the added benefits that go along with storing your program units in the Oracle database.16. What is Template?Ans: Templates define common characteristics and objects that you want to apply to multiple reports. For example, you can define a template that includes the company logo and sets fonts and colors for selected areas of a report. And properties of the objects alsoCreation of Template: In Report editor , open a existing Template or Create a new Template and save it concerned directory. Then Edit CAGPREFS.ORA File , and Specify which type of Template are u going to develop.Ex. Tabular, form, matrix Then give your developed template *.tdf file name.Develop Report with Newly developed Template.17 what is Flex mode and Confine mode?

Confine mode

On: child objects cannot be moved outside their enclosing parent objects.Off: child objects can be moved outside their enclosing parent objects.Flex mode:On: parent borders "stretch" when child objects are moved against them.Off: parent borders remain fixed when child objects are moved against them.18. What is Page Break?Ans: To limit the records per page.19 What is Page Protector?Ans: The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page. Ex: if you set yes, the object information print another page.Print ConditionThe print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.20 What is Print Direction?Ans: The Print Direction property is the direction in which successive instances of the repeating frame appear.21 What is Vertical and Horizental ElacityAns: The Horizontal Elasticity property is how the horizontal size of the object will change at runtime to accommodate the objects or data within it:

Page 33: quesns

22.What is Place holder Columns?Ans: A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object. You can set the value of a placeholder column is in a Before Report trigger , A report level formula column(if the place holder column is at report level) A formula column in the place holder group or a group below itUses of place holder columns enables u to populate multiple columns from one piece of code. U can calculate several values in one block of pl/sql code in a formula column and assign each value into a different placeholder column. U therefore create and maintain only program unit instead of many.Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved.23 What is Formula Column?Ans: A formula column performs a user-defined computation on another column(s) data, including placeholder columns.24 What is Summary columns?Ans: A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.25 What is Boilerplate?Ans: Boilerplate is any text or graphics that appear in a report every time it is run. Report Builder will create one boilerplate object for each label selected in the Report Wizard (it is named B_Column name). Also, one boilerplate object is sometimes created for each report summary. A boilerplate object is owned by the object surrounding it, unless otherwise noted.

26 What is Data Link

When we join multiple quires in a report the join condition is stored in the data link sectionData links relate the results of multiple queries. A data link (or parent-child relationship) causes the child query to be executed once for each instance of its parent group. When you create a data link in the Data Model view of your report, Report Builder constructs a clause (as specified in the link's Property Palette) that will be added to the child query's SELECT statement at runtime. You can view the SELECT statements for the individual parent and child queries in the Builder, but can not view the SELECT statement that includes the clause created by the data link you define.

27 What is filter and Group Filter

28.What is Query BuilderAns: it’s a gui tool to build a query in Report Wizard, Data Wizard or Data model.29 What is Break Column?Ans: We can break a column through data model , it Display once for a group30.How do u call Report From form?Ans: RUN_PRODUCT and RUN_REPORT_OBJECT40. HOW CAN U CREATE TWO FORMATSUSING DISTRIBUTION WE CAN CREATE DIFFERENT FORMATS45 HOW TO DISPLY ONE RECORD PER PAGE ( WHICH PROPERTY WE SHOULD SET)Set Repeating Frame Properties : Maximum records per page=1 And it will override group filter property.In Data model Layout , Group Property Through Filter Type & No of records to displayProperty, Values are First, last, pl/sql47. What is Header ,Body, Trailer, and Footer in ReportsHeader: The header consist of on e or more pages that are printed before report proper. The type ofInformation you might want to print title of the page ,company logo and address or chart the

Summarizes the report.Trailer: The trailer consists of one or more pages that print after the report itself, usually used for nothing more than an end of report blank page, but also used for a report summary or chart.

Page 34: quesns

Body: The body is where all the main report objects are placedMargin: the report layout only governs the part of the pages designated for the main data portion of the report. The margins are can be used to specify page headers and page footers.49. what are Executable file definitions in ReportsReport Builder (RWBLD60.EXE)n Reports Runtime (RWRUN60.EXE)n Reports Convert (RWCON60.EXE)n Reports Background Engine (RWRBE60.EXE)n Reports Server (RWMTS60.EXE)n Reports Web Cartridge (RWOWS60.DLL)n Reports CGI (RWCGI60.EXE)n Reports Queue Manager (RWRQM60.EXE)n Reports Launcher (RWSXC60.EXE)n Reports ActiveX Control (RWSXA60.OCX)What are the Non_query fields?Aggregated Information, Calculated information, A string FunctionCan I highlight and change all the format masks and print conditions of a bunch of fields all at once?You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.How do I change the printed value of a field at runtime?Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value.That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure.The syntax is SRW.Set_Field_char (0,) and the output of the object that the current trigger is attached to will be replaced by .There are also SRW.set_fileld_num and SRW.set_field_date for numeric or date fields. While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totalsReport BurstingThe capability of producing multiple copies of a given report or portion of it in different output formats is referred to as report bursting.Additional Layout:Additional layout created for to different format using same query and groups without modifying default layout created by report wizard., we can use both layouts according to user requirement.System Variables as Source Field In Layout EditorAns: Current date, Page Number, Panel number, Physical Page Number, Total Pages,Total Panels, Total Physical Pages.Link File : Is a special type of boilerplate, that doesn’t have to remain constant for each report runThe type of file contents, can be Text, Image, CGM, Oracle drawing format, or image URLSource filename :the name of the file the u want link to the report Through import Image

Read more: http://prasanthapps.blogspot.com/2011/05/oracle-apps-reports.html#ixzz1kLzLWmsA

Report Questions1. What is SRW Package? Ans: The Report builder Built in package know as SRW Package (Sql Report Writer) This package extends reports, Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exit, to format width of the columns,

Page 35: quesns

to page break the column, to set the colorsEx: SRW.DO_SQL, It’s like DDL command, we can create table, views, etc,SRW.SET_FIELD_NUMSRW. SET_FIELD_CHARSRW. SET FIELD _DATE

2. What are Lexical Parameters and bind parameters?Lexical Parameter is a Simple text string that to replace any part of a SELECT statement. Column names, the from clause, where clause or the order by clause. To create a lexical reference in a query we prefix the parameter name with an ampersand (ex. &.dname,)

3. What is User Parameters?A parameter, which is created by user. For to restrict values with where clause in select statement.Data type, width, input mask, initial value, validation trigger, list of valuesWe can use Lovs in use in user parameter with static and Dynamic Select Statement.

4. What is System Parameters: These are built-in parameters by corporation.BACKGROUND: Is whether the report should run in the foreground or the background.COPIES Is the number of report copies that should be made when the report is printed.CURRENCY Is the symbol for the currency indicator (e.g., "$"). 

Ans: The Report builder Built in package know as SRW Package (Sql Report Writer) This package extends reports, Control report execution, output message at runtime, Initialize layout fields, Perform DDL statements used to create or Drop temporary table, Call User Exit, to format width of the columns, to page break the column, to set the colorsEx: SRW.DO_SQL, It’s like DDL command, we can create table, views, etc,SRW.SET_FIELD_NUMSRW. SET_FIELD_CHARSRW. SET FIELD _DATE2. What are   Lexical Parameters and bind   parameters?Lexical Parameter is a Simple text string that to replace any part of a SELECT statement. Column names, the from clause, where clause or the order by clause. To create a lexical reference in a query we prefix the parameter name with an ampersand (ex. &.dname,)3. What is User Parameters?A parameter, which is created by user. For to restrict values with where clause in select statement.Data type, width, input mask, initial value, validation trigger, list of valuesWe can use Lovs in use in user parameter with static and Dynamic Select Statement.4. What is System Parameters: These are built-in parameters by corporation.BACKGROUND: Is whether the report should run in the foreground or the background.COPIES Is the number of report copies that should be made when the report is printed.CURRENCY Is the symbol for the currency indicator (e.g., " $?).DECIMAL Is the symbol for the decimal indicator (e.g., ".").DESFORMAT Is the definition of the output device's format (e.g., landscape mode for a printer). This parameter is used when running a report in a character-mode environment, and when sending a bitmap report to a file (e.g. to create PDF or HTML output).DESNAME Is the name of the output device (e.g., the file name, printer's

Page 36: quesns

name, mail userid).DESTYPE Is the type of device to which to send the report output (screen, file, mail, printer, orScreen using PostScript format).MODE Is whether the report should run in character mode or bitmap.ORIENTATION Is the print direction for the report (landscape, portrait, default).PRINTJOB Is whether the Print Job dialog box should appear before the report is run.THOUSANDS Is the symbol for the thousand's indicator (e.g., ",").

5. How many Types of Reports available in ReportsTabular form-like form – letter Group leftGroup above matrix Matrix with group Mailing labelMatrix Report: Simple, Group above, NestedSimple Matrix Report required 4 groups1. Cross Product Group2. Row and Column Group3. Cell Group4. Cell column is the source of a cross product summary that becomes the cell content.Frames: 1.Repeating frame for rows (down direction)2. Repeating frame for columns (Across)3. Matrix object the intersection of the two repeating frames

6. What Types of Triggers are Available in Reports.Report level TriggersData Model TriggersLayout Model TriggersReport Level TriggersBefore parameter form: If u want take parameters passed to the report and manipulate them so that they appear differently in the parameter form., this is where modification can be done for ex: when u want pass a deptno but show the dname selected , use a before parameter form trigger.After parameter form & Before Report: These two triggers are fired one after the other. No event occurs in between them. However the way the way that the reports product behaves when the triggers fail is quite different. If the After Parameter trigger fails the report will be put back into the parameter form. It’s useful to place code here to check whether values in your parameter form are valid. Even though the Before Report trigger is executed before the query runs, if this trigger fails it won’t fail until reports tries to display the first page of the report. This means that even if something goes wrong in the before report trigger (meaning that you may not want to run the query at all) It will run anywayBetween pages: This Trigger fires before all pages except first page one. It will not fire after the last page of a report. If a report only has one page it will not fire at all. You can use this trigger to send specific control to the change the paper orientation or to do double sided printingAfter report: This trigger fires the report has printed or in the case of a screen report, after the report is closed following viewing. This trigger can be used to update a global variable if u r returning the number of pages in a report. It is also used to delete temporary table used to print the reportData Model TriggersFormula Column, Group Filter, Parameter valuesLayout Model Triggers

Page 37: quesns

7. What are Format triggers?Format triggers enable you to modify the display of objects dynamically at run time or to suppress display altogetherFor Headings, for repeating frames, for field, for boilerplate objectTo format a column based on certain criteria for examplei) To format the max (Sal) for particular department.ii) To format the Sal column with a Dollar ($) prefix.iii) To format Date formats….etc

8. What is Data Model?Data Model is logically group of the Report Objects through query and Data model tools. Once query is compiled report automatically generates group. The queries build the groups ant then Groups are used to populate the report. The only function of queries in report is to create the groups. The Report Editor's Data Model view enables you to define and modify the data model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships. To create the query objects for your data model, you can use the Report Wizard, Data Wizard, or the Query tools in the tool palette.

9. What is Layout model?Layout Model is to physically arrange Data model group objects on the Report. The Report Editor's Layout Model view enables you to define and modify the layout model objects for a report. In this view, objects and their property settings are represented symbolically to highlight their types and relationships.

10 What is Live Previewer? Ans: The Live Previewer is a work area in which you can preview your report and manipulate the actual or live data at the same time. In the Live Previewer you can customize reports interactively, meaning that you can see the results immediately as you make each change.To activate buttons in the Live Previewer, you must display the report output in the Runtime Previewer. In order to edit your report, such as changing column size, move columns, align columns insert page numbers, edit text, change colors, change fonts set format masks, insert field the Live Previewer must be in Flex Mode.

AccessTitleViewing regionRulersGridToolbarStyle barTool paletteStatus bar

11. What is Parameter Form Ans: The Live Previewer is a work area in which you can preview your report and manipulate the actual or live data at the same time. In the Live Previewer you can customize reports interactively,

Page 38: quesns

meaning that you can see the results immediately as you make each change.To activate buttons in the Live Previewer, you must display the report output in the Runtime Previewer. In order to edit your report, such as changing column size, move columns, align columns insert page numbers, edit text, change colors, change fonts set format masks, insert field the Live Previewer must be in Flex Mode.

AccessTitleViewing regionRulersGridToolbarStyle barTool paletteStatus bar11.   What is Parameter Form  Ans: Parameters are variables for report that users can change at runtime immediately prior to the execution of the report. You can use system parameters to specify aspects of report execution, such as the output format, printer name, mailed or number of copies. We can also create own parameters through sql or Pl/sql at runtime.The Parameter Form view is the work area in which you define the format of the report's Runtime Parameter Form. To do this, you define and modify parameter form objects (fields and boilerplate).When you run a report, Report Builder uses the Parameter Form view as a template for the Runtime Parameter Form. Fields and boilerplate appear in the Runtime Parameter Form exactly as they appear in the Parameter Form view. If you do not define a Runtime Parameter Form in the Parameter Form view, Report Builder displays a default Parameter Form for you at runtime.12. What is Query? 

The first thing in data model is the query. Through query we access database objects with sql query. Compiled query creates groups. We can create query through query builder, sql query and import query from o/s file or database.

13. What is Group? The first thing in data model is the query. Through query we access database objects with sql query. Compiled query creates groups. We can create query through query builder, sql query and import query from o/s file or database.

13. What is Group?The first thing in data model is the query. Through query we access database objects with sql query. Compiled query creates groups. We can create query through query builder, sql query and import query from o/s file or database.

13. What is Group? Ans: Groups are created to organize the columns in your report. When you create a query, Report Builder automatically creates a group that contains the columns selected by the query. You create additional groups to produce break levels in the report, either manually or by using the Report Wizard to create a group above or group left report.

14 What is Repeating Frame? 

Page 39: quesns

Ans: Repeating frames surround all of the fields that are created for a group’s columns. Repeating frames correspond to groups in the data model. Each repeating frame must to be associated with a group of data model the repeating frame prints (is fired) once for each record of the group.

15. What is Reference Cursor? Ans: Repeating frames surround all of the fields that are created for a group’s columns. Repeating frames correspond to groups in the data model. Each repeating frame must to be associated with a group of data model the repeating frame prints (is fired) once for each record of the group.

15. What is Reference Cursor? A ref cursor query uses PL/SQL to fetch data. Each ref cursor query is associated with a PL/SQL function that returns a strongly typed ref cursor. The function must ensure that the ref cursor is opened and associated with a SELECT statement that has a SELECT list that matches the type of the ref cursor.You base a query on a ref cursor when you want to:n more easily administer SQLn avoid the use of lexical parameters in your reportsn share data sources with other applications, such as Form Buildern increase control and securityn encapsulate logic within a subprogramFurthermore, if you use a stored program unit to implement ref cursors, you receive the added benefits that go along with storing your program units in the Oracle database.

16. What is Template? Ans: Templates define common characteristics and objects that you want to apply to multiple reports. For example, you can define a template that includes the company logo and sets fonts and colors for selected areas of a report. And properties of the objects alsoCreation of Template: In Report editor , open a existing Template or Create a new Template and save it concerned directory. Then Edit CAGPREFS.ORA File , and Specify which type of Template are u going to develop.Ex. Tabular, form, matrix Then give your developed template *.tdf file name.Develop Report with Newly developed Template.

17 what is Flex mode and Confine mode?Confine modeOn: child objects cannot be moved outside their enclosing parent objects.Off: child objects can be moved outside their enclosing parent objects.Flex mode:On: parent borders "stretch" when child objects are moved against them. Ans: Templates define common characteristics and objects that you want to apply to multiple reports. For example, you can define a template that includes the company logo and sets fonts and colors for selected areas of a report. And properties of the objects alsoCreation of Template: In Report editor , open a existing Template or Create a new Template and save it concerned directory. Then Edit CAGPREFS.ORA File , and Specify which type of Template are u going to develop.Ex. Tabular, form, matrix Then give your developed template *.tdf file name.Develop Report with Newly developed Template.17 what is Flex mode and Confine mode?

Page 40: quesns

Confine modeOn: child objects cannot be moved outside their enclosing parent objects.Off: child objects can be moved outside their enclosing parent objects.Flex mode:On: parent borders " them.

Off: parent borders remain fixed when child objects are moved against them.

18. What is Page Break? Ans: To limit the records per page.

19 What is Page Protector?Ans: The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page. Ex: if you set yes, the object information prints another page.Print ConditionThe print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.

20 What is Print Direction? The print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.20 What is Print Direction? Ans: The Print Direction property is the direction in which successive instances of the repeating frame appear.

21 What is Vertical and Horizental ElacityAns: The Horizontal Elasticity property is how the horizontal size of the object will change at runtime to accommodate the objects or data within it:

22.What is Place holder Columns? Ans: A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object. You can set the value of a placeholder

Page 41: quesns

column is in a Before Report trigger , A report level formula column(if the place holder column is at report level) A formula column in the place holder group or a group below itUses of place holder columns enables u to populate multiple columns from one piece of code. U can calculate several values in one block of pl/sql code in a formula column and assign each value into a different placeholder column. U therefore create and maintain only program unit instead of many.Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved.

23 What is Formula Column?Ans: A formula column performs a user-defined computation on another column(s) data, including placeholder columns.

24 What is Summary columns? Ans: A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.

25 What is Boilerplate? Ans: Boilerplate is any text or graphics that appear in a report every time it is run. Report Builder will create one boilerplate object for each label selected in the Report Wizard (it is named B_Column name). Also, one boilerplate object is sometimes created for each report summary. A boilerplate object is owned by the object surrounding it, unless otherwise noted.

26 What is Data LinkWhen we join multiple quires in a report the join condition is stored in the data link sectionData links relate the results of multiple queries. A data link (or parent-child relationship) causes the child query to be executed once for each instance of its parent group. When you create a data link in the Data Model view of your report, Report Builder constructs a clause (as specified in the link's Property Palette) that will be added to the child query's SELECT statement at runtime. You can view the SELECT statements for the individual parent and child queries in the Builder, but can not view the SELECT statement that includes the clause created by the data link you define.

27 What is filter and Group Filter28.What is Query Builder Ans: A placeholder is a column is an empty container at design time. The placeholder can hold a value at run time has been calculated and placed in to It by pl/sql code from anther object. You can set the value of a placeholder column is in a Before Report trigger , A report level formula column(if the place holder column is at report level) A formula column in the place holder group or a group below itUses of place holder columns enables u to populate multiple columns from one piece of code. U can calculate several values in one block of pl/sql code in a formula column and assign each value into a different placeholder column. U therefore create and maintain only program unit instead of

Page 42: quesns

many.Store a Temporary value for future reference. EX. Store the current max salary as records are retrieved.

23 What is Formula Column?Ans: A formula column performs a user-defined computation on another column(s) data, including placeholder columns.24 What is Summary columns? Ans: A summary column performs a computation on another column's data. Using the Report Wizard or Data Wizard, you can create the following summaries: sum, average, count, minimum, maximum, % total. You can also create a summary column manually in the Data Model view, and use the Property Palette to create the following additional summaries: first, last, standard deviation, variance.25 What is Boilerplate? Ans: Boilerplate is any text or graphics that appear in a report every time it is run. Report Builder will create one boilerplate object for each label selected in the Report Wizard (it is named B_Column name). Also, one boilerplate object is sometimes created for each report summary. A boilerplate object is owned by the object surrounding it, unless otherwise noted.26 What is Data LinkWhen we join multiple quires in a report the join condition is stored in the data link sectionData links relate the results of multiple queries. A data link (or parent-child relationship) causes the child query to be executed once for each instance of its parent group. When you create a data link in the Data Model view of your report, Report Builder constructs a clause (as specified in the link's Property Palette) that will be added to the child query's SELECT statement at runtime. You can view the SELECT statements for the individual parent and child queries in the Builder, but can not view the SELECT statement that includes the clause created by the data link you define.27 What is filter and Group Filter28.What is Query Builder Ans: it’s a gui tool to build a query in Report Wizard, Data Wizard or Data model.

29 What is Break Column? Ans: We can break a column through data model , it Display once for a group

30. How do u call Report from form? Ans: We can break a column through data model , it Display once for a group30. How do u call Report from form?   Ans: RUN_PRODUCT and RUN_REPORT_OBJECT

31. HOW CAN U CREATE TWO FORMATSUSING DISTRIBUTION WE CAN CREATE DIFFERENT FORMATS

32 HOW TO DISPLY ONE RECORD PER PAGE ( WHICH PROPERTY WE SHOULD SET)Set Repeating Frame Properties : Maximum records per page=1 And it will override group filter property.In Data model Layout , Group Property Through Filter Type & No of records to displayProperty, Values are First, last, pl/sql

33. What is Header ,Body, Trailer, and Footer in ReportsHeader: The header consists of one or more pages that are printed before

Page 43: quesns

report proper. The type ofInformation you might want to print title of the page, company logo and address or chart theSummarizes the report.Trailer: The trailer consists of one or more pages that print after the report itself, usually used for nothing more than an end of report blank page, but also used for a report summary or chart.Body: The body is where all the main report objects are placedMargin: the report layout only governs the part of the pages designated for the main data portion of the report. The margins are can be used to specify page headers and page footers.34. what are Executable file definitions in ReportsReport Builder (RWBLD60.EXE)n Reports Runtime (RWRUN60.EXE)n Reports Convert (RWCON60.EXE)n Reports Background Engine (RWRBE60.EXE)n Reports Server (RWMTS60.EXE)n Reports Web Cartridge (RWOWS60.DLL)n Reports CGI (RWCGI60.EXE)n Reports Queue Manager (RWRQM60.EXE)n Reports Launcher (RWSXC60.EXE)n Reports ActiveX Control (RWSXA60.OCX)35 what are the Non_query fields?Aggregated Information, Calculated information, A string FunctionCan I highlight and change all the format masks and print conditions of a bunch of fields all at once?You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.

36 How do I change the printed value of a field at runtime?Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value.That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure.The syntax is SRW.Set_Field_char (0,) and the output of the object that the current trigger is attached to will be replaced by .There are also SRW.set_fileld_num and SRW.set_field_date for numeric or date fields. While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totalsReport BurstingThe capability of producing multiple copies of a given report or portion of it in different output formats is referred to as report bursting.

Page 44: quesns

Additional Layout: Additional layout created for to different format using same query and groups without modifying default layout created by report wizard., we can use both layouts according to user requirement.System Variables as Source Field In Layout EditorAns: Current date, Page Number, Panel number, Physical Page Number, Total Pages,Total Panels, Total Physical Pages.Link File: Is a special type of boilerplate, that doesn’t have to remain constant for each report runThe type of file contents, can be Text, Image, CGM, Oracle drawing format, or image URLSource filename: the name of the file the u want link to the report through import Image from

Read more: http://prasanthapps.blogspot.com/2011/04/report-questions.html#ixzz1kLzXRx3O