apps int ques

Upload: ramyajagarlap6982

Post on 07-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Apps Int Ques

    1/20

    1. Difference b/w procedure and function? A procedure may return (one or morevalues using OUT & INOUT Parameters) or may not return a value. But a functionhas to return a single value and has the return clause in its definition. Function canbe called in select statements but procedure can only be called in a pl/sql block.Procedure's parameters can have IN or OUT or INOUT parameters. But function'sparameters can only have IN parameters.

    2. Difference b/w ROWID and ROWNUM? ROWID : It gives the hexadecimal stringrepresenting the address of a row.It gives the location in database where row isphysically stored. ROWNUM: It gives a sequence number in which rows are retrievedfrom the database.

    3. Give some examples of pseudo columns? NEXTVAL, CURRVAL, LEVEL, SYSDATE

    4. Difference b/w implicit cursor and explicit cursor? Implicit cursors areautomatically created by oracle for all its DML stmts. Examples of implicit cursors:SQL%FOUND, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN; Explicit cursorsare created by the users for multi row select stmts.

    5. How to create a table in a procedure or function? See the below piece of code:Since create stmt can be used only at the sql prompt, we have used dynamic sql tocreate a table.

    DECLAREL_STMT VARCHAR2(100);

    BEGINDBMS_OUTPUT.PUT_LINE('STARTING ');L_STMT := 'create table dummy1 (X VARCHAR2(10) , Y NUMBER)';EXECUTE IMMEDIATE L_STMT;DBMS_OUTPUT.PUT_LINE('end ');

    END;The above piece of code can be written In procedure and function DDL's can be used infunction provided that function should be invoked in Begin-End block not from Selectstatement.

    6. Explain the usage of WHERE CURRENT OF clause in cursors ? Look at thefollowing pl/sql code:

    DECLARECURSOR wip_cur ISSELECT acct_no, enter_date

    FROM wipWHERE enter_date < SYSDATE -7FOR UPDATE;BEGINFOR wip_rec IN wip_curLOOP

    INSERT INTO acct_log (acct_no, order_date)VALUES (wip_rec.acct_no, wip_rec.enter_date);

  • 8/3/2019 Apps Int Ques

    2/20

    DELETE FROM wipWHERE CURRENT OF wip_cur;END LOOP;END;

    "WHERE CURRENT OF" has to be used in concurrence with "FOR UPDATE" in the cursorselect stmt.

    "WHERE CURRENT OF" used in delete or update stmts means, delete/update the currentrecord specified by the cursor.By using WHERE CURRENT OF, you do not have to repeat the WHERE clause in the SELECTstatement.

    7. What is the purpose of FORUPDATE? Selecting in FOR UPDATE mode locks theresult set of rows in update mode, which means that row cannot be updated ordeleted until a commit or rollback is issued which will release the row(s). If you planon updating or deleting records that have been referenced by a Select For Updatestatement, you can use the Where Current Of statement.

    8. What is RAISE_APPLICATION_ERROR? The RAISE_APPLICATION_ERROR is aprocedure defined by Oracle that allows the developer to raise an exception andassociate an error number and message with the procedure other than just Oracleerrors. Raising an Application Error With raise_application_error

    9.DECLARE

    num_tables NUMBER;BEGIN

    SELECT COUNT(*) INTO num_tables FROM USER_TABLES;IF num_tables < 1000 THEN

    /* Issue your own error code (ORA-20101) with your own error message.Note that you do not need to qualify raise_application_error withDBMS_STANDARD */

    raise_application_error(-20101, 'Expecting at least 1000 tables');ELSE

    NULL; -- Do the rest of the processing (for the non-error case).END IF;

    END;/

    The procedure RAISE_APPLICATION_ERROR lets you issue user-defined ORA- errormessages from stored subprograms. That way, you can report errors to yourapplication andavoid returning unhandled exceptions.

    9. What is mutating error? Mutating error occurs in the following scenario:

    WHEN WE ARE UPDATING A TABLE (TRIGGER WRITTEN ON A TABLE FOR UPDATE) AND ATTHE SAME TIME TRYING TO RETRIEVE DATA FROM THAT TABLE. IT WILL RESULT INTOMUTATING TABLE AND IT WILL RESULT INTO MUTATING ERROR.

    10.Can we have commit/rollback in DB triggers? Having Commit / Rollback insidea trigger defeats the standard of whole transaction's commit / rollback all together.Once trigger execution is complete then only a transaction can be said as completeand then only commit should take place. If we still want to carry out some action

  • 8/3/2019 Apps Int Ques

    3/20

    which should be initiated from trigger but should be committed irrespective of triggercompletion / failure we can have AUTONOMUS TRANSACTION. Inside Autonomoustransaction block we can have Commit and it will act as actualcommit.

    11.Can we make the trigger an autonomous transaction? This makes all the

    difference because within the autonomous transaction (the trigger), Oracle will viewthe triggering table as it was before any changes occurredthat is to say that anychanges are uncommitted and the autonomous transaction doesnt see them. So thepotential confusion Oracle normally experiences in a mutating table conflict doesntexist.

    12.What is autonomous transaction? Autonomous transaction means a transactionthat is embedded in some other transaction, but functions independently.

    13.What is a REF Cursor? The REF CURSOR is a data type in the Oracle PL/SQLlanguage. It represents a cursor or a result set in Oracle Database.

    14.What is the difference between ref cursors and normal pl/sql cursors?

    Declaretype rc is ref cursor;cursor c isselect * from dual;l_cursor rc;

    beginif ( to_char(sysdate,'dd') = 30 ) then

    open l_cursorfor select * from emp;

    elsif ( to_char(sysdate,'dd') = 29 ) then

    open l_cursorfor select * from dept;else

    open l_cursorfor select * from dual;

    end if;open c;

    end;Given that block of code you see perhaps the most "salient" difference, no matter how manytimes you run that block The cursor C will always be select * from dual. The ref cursor canbe anything.

    15.Is Truncate a DDL or DML statement? And why? Truncate is a DDL statement.Check the LAST_DDL_TIME on USER_OBJECTS after truncating your table.TRUNCATE will automatically commit, and it's not rollback able. This changes thestorage definition of the object. That's why it is a DDL.

    16.What are the actions you have to perform when you drop a package? If yourename a package, the other packages that use it will have to be MODIFIED. Asimple compilation of the new renamed package won't do. If you have toad, go to

  • 8/3/2019 Apps Int Ques

    4/20

    the "used by" tab that will show you the packages that call the package beingrenamed.

    17.What is cascading triggers? When a trigger fires, a SQL statement within itstrigger action potentially can fire other triggers, resulting in cascading triggers.

    18.What are materialized views? A materialized view is a database object that stores

    the results of a query (possibly from a remote database). Materialized views aresometimes referred to as snapshots.

    19.Example

    If the materialized view will access remote database objects, we need to start bycreating a database link to the remote DB:

    CREATE DATABASE LINK remotedb

    CONNECT TO scott IDENTIFIED BY tiger

    USING 'orcl';

    Now we can create the materialized view to pull in data (in this example, acrossthe database link):

    CREATE MATERIALIZED VIEW items_summary_mv

    ON PREBUILT TABLE

    REFRESH FORCE AS

    SELECT a.PRD_ID, a.SITE_ID, a.TYPE_CODE, a.CATEG_ID,

    sum(a.GMS) GMS,

    sum(a.NET_REV) NET_REV,

    sum(a.BOLD_FEE) BOLD_FEE,

    sum(a.BIN_PRICE) BIN_PRICE,

    sum(a.GLRY_FEE) GLRY_FEE,

    sum(a.QTY_SOLD) QTY_SOLD,

    count(a.ITEM_ID) UNITS

  • 8/3/2019 Apps Int Ques

    5/20

    FROM items@remotedb a

    GROUP BY a.PRD_ID, a.SITE_ID, a.TYPE_CODE, a.CATEG_ID;

    Materialized view logs:

    Materialized view logs are used to track changes (insert, update and delete) to atable. Remote materialized views can use the log to speed-up data replication byonly transferring changed records.

    Example:

    CREATE MATERIALIZED VIEW LOG ON items;

    20.Commonly occurring Errors in Reports?

    Some of the errors are defined below

    1. There Exists uncompiled unit: When the report is not compiled before loading inthe Oracle Applications.

    2. Report File not found: When the rdf is not uploaded in proper directory

    3. Width or margin is zero: When the repeating frame is not within proper frames

    4. Not in proper group: When the repeating frame is not referred to proper group

    21.What is the difference between Compile and Incremental Compile in oracle reports?

    In Full compile all the PL/SQL within the reports are compiled but in incrementalcompile only the changed PL/SQL units are compiled.

    When compiling the report for the first time, we should do the full compilation andnot the Incremental compile.

    22.How to compile Procedures and Packages?

    ALTER COMPILE;

    What is ERP? A packaged business software system that lets a company automate

    and integrate the majority of its business processes; share common data and practices

    across the enterprise; [and] produce and access information in a real-time environment.

  • 8/3/2019 Apps Int Ques

    6/20

    2) Tell me some thing about SQL-LOADER? Sql * loader is a bulk loader utility used formoving data from external files into the oracle database.

    Sql * loader supports various load formats, selective loading, and multi-tables loads.

    Conventional: The conventional path loader essentially loads the data by using standard

    insert statement.

    Direct: The direct path loader (direct = true) by possess of logic involved with that, and

    loads directly in to the oracle data files.

    EX:-

    My data.csv file

    1001, scott tiger,1000,40

    1002,oracleapps4u,2345,50

    Load data

    Infile c:\data\mydata.csv

    Into table emp

    Fields terminated by , optionally enclosed by

    (empno, empname,sal,deptno)

    >sqlldr scott/tiger@vis

    control=loader.ctl log= gvlog.log bad=gvbad.bad discard=gvdis.dsc .

    3) How to dump data from pl/sql block to flat files? Using utl_file package, we candump data from pl/sql block to flat file.PRE-REQUIREMENTS for UTL_FILE is specify the accessible directories for the UTL_FILEfunction in the initialization file (INIT.ORA) Using the UTL_FILE_DIR parameters.

    Ex: UTL_FILE_DIR =

    EX:- remember to update INITSID.ORA, utl_file_dir = c:\oradata

    Declare

    Fp utl_file.file_type;

    BeginFp := utl_file.fopen(c:\oradata,tab1.txt,w);

    Utl_file.putf(fp,%s %s \n text field, 55);

    Utl_file.fclose(fp);

    End;

  • 8/3/2019 Apps Int Ques

    7/20

    4) What is SET-OF-BOOKS? Collection of Chat of Accounts and Currency and Calendars iscalled SOB

    5) What istheinterface Table? Interface Table is a table which is used as medium fortransfer of data between two systems.

    6) What is invoice? A request sent for payment

    7) What is INBOUND and OUT BOUND? (Different types of interfaces)Inbound Interface:

    For inbound interfaces, where these products are the destination, interface tables as well as

    supporting validation, processing, and maintenance programs are provided.

    Outbound Interface:

    For outbound interfaces, where these products are the source, database views are provided

    and the destination application should provide the validation, processing, and maintenance

    programs.

    8) What are the Base tables in the AR? Check the following blog post for AR basetables: http://oracleapps4u.blogspot.com/2011/07/oracle-apps-account-receivable-

    tables.html

    9) What are the interface tables of the customer conversion? Check the followingblog post for interface tables in customer conversion:

    http://oracleapps4u.blogspot.com/2011/07/interfaces-and-conversions-in-oracle.html

    10) What is the procedure to develop an interface? First we will get the Requirement document. We will create control file based on that plot file. Then the control files which loads the data into staging tables. Through pl/sql programs we will mapping and validate the data and then dump into the

    interface tables.

    Through the standard programs we will push the data from interfacetables to Base tables.11) What are the validations in customer interface?

    customer name : The same customer reference cant have different customernames with in this table HZ_PARTIES.PARTY_NAME

    http://oracleapps4u.blogspot.com/2011/07/oracle-apps-account-receivable-tables.htmlhttp://oracleapps4u.blogspot.com/2011/07/oracle-apps-account-receivable-tables.htmlhttp://oracleapps4u.blogspot.com/2011/07/interfaces-and-conversions-in-oracle.htmlhttp://oracleapps4u.blogspot.com/2011/07/interfaces-and-conversions-in-oracle.htmlhttp://oracleapps4u.blogspot.com/2011/07/oracle-apps-account-receivable-tables.htmlhttp://oracleapps4u.blogspot.com/2011/07/oracle-apps-account-receivable-tables.html
  • 8/3/2019 Apps Int Ques

    8/20

    customer number: must be null if your r using automatic customer numbering, must exitif you are not using automatic customer numbering. This value much be unique with in

    HZ_PARTIES

    customer status : must be A for active or I for inactiveHZ_PARTIES_STATUS

    bank account num or bank account currency code :if the bank a/c already exist do not enter a value

    if the bank a/c does not exist you must enter a value

    bank a/c name : it must exist in AP_BANK_ACCOUNTS or if it does not exist values mustexist for BANK_A/C_CURRENCY_CODE

    BANK_A/C_NUM

    BANK_NAME

    BANK_BRANCH_NAMENote : every interface table has two error msg

    1) Error code.

    2) Error msg.

    12) How to submit a concurrent program from sql or pl/sql code?

    FND_REQUEST.SUBMIT_REQUEST (PO,EXECUTABLE NAME,,,, PARAMETERS)

    13) List out some APIs?FND_FILE.PUTLINE(FND_FILE.LOG)

    FND_FILE.PUTLINE(FND_FILE.OUTPUT)

    14)What are profile options?It is some set of options based on which the Functional and Technical behavior

    of Oracle Applications depends.

    EX: - I want to assign the user3 responsibility to p4 printer then

    System Administrator > Profile System

    (FND_PROFILE_OPTIONS)

    15)What are the User PARAMETERS in the Reports? P_CONC_REQUEST_ID P_FLEX_VALUE

    16) What are FND USER EXITS in oracle reports?

    Check the following blog post for user exits in oracle reports:http://oracleapps4u.blogspot.com/2011/06/what-are-user-exits-in-oracle-reports.html

    http://oracleapps4u.blogspot.com/2011/06/what-are-user-exits-in-oracle-reports.htmlhttp://oracleapps4u.blogspot.com/2011/06/what-are-user-exits-in-oracle-reports.html
  • 8/3/2019 Apps Int Ques

    9/20

    17) What are the two parameters that are mandatory for pl/sql type concurrentprog?

    Procedure/Function (ERRBUF OUT, RETCODE OUT)

    ERRBUF: Used to write the error message to log or request file.

    RETCODE: Populate log request file with program submission details info.

    18) What are different validation types in value sets?

    1) None ------validation is minimal.

    2) Independent ------ input must exist on previously defined list of values

    3) Dependent------ input is checked against a subset of values based on a

    prior value.

    3) Table ----- input is checked against values in an application table

    4) Special ------values set uses a flex field itself.

    5) Pair ------ two flex fields together specify a range of valid values.

    6) Translatable independent ----- input must exist on previously defined list

    Of values; translated values can be used.

    7) Translatable dependent ------ input is checked against a subset of values

    Based on a prior values; translated value can be used.

    19) What is the sequence of execution of different clause in a select

    statement? Check out the following blog post for

    detailed explanation: http://oracleapps4u.blogspot.com/2011/08/sequence-of-sql-

    statement-processed.html

    20) Form development process?1. open template form2. Save as .fmb3. Change the form module name as form name.4. Delete the default blocks, window, and canvas5. Create a window.6. Assign the window property class to window7. Create a canvas (subclass info)

    8. Assign canvas property class to the canvas9. assign the window to the canvas and canvas to the window10. Create a data block11. Modify the form level properties. (sub class item Text item)12. Modify the app_custom package in the program unit.13. Modify the pre-form trigger (form level)

    http://oracleapps4u.blogspot.com/2011/08/sequence-of-sql-statement-processed.htmlhttp://oracleapps4u.blogspot.com/2011/08/sequence-of-sql-statement-processed.htmlhttp://oracleapps4u.blogspot.com/2011/08/sequence-of-sql-statement-processed.htmlhttp://oracleapps4u.blogspot.com/2011/08/sequence-of-sql-statement-processed.html
  • 8/3/2019 Apps Int Ques

    10/20

    14. Modify the module level properties ((console window, First navigation15. Save and compile the form.16. Place the .fmx in the server directory.17. Register in the AOL

    APPLICATION -> FORM

    APPLICATION -> FUNCTION

    APPLICATION -> MENU21) How to customize the Reports?

    Identify the Short name of the report and the module in which we have to place thecustomization

    Ex: - if you want to customize in the AR module, path isAppl top\ar\11.5.0\reports\US\ .rdf

    FTP back the file to the local system in Binary mode

    Open the .rdf file in Report builder and change the name of the module. Open the data model and Layout mode, perform all the required changes. Go to report wizard and select the newly created columns. Compile it. Save it. Then Register in the AOL Concurrent > executable.

    Concurrent > program.

    Go to system administrator Security > Responsibility > request Add and assign a concurrent program to a request group

    22) List some report names in oracle apps?1) OPEN-DEBIT MEMO REPORT?

    This report shows all the open-debit memo transactions, based on customer number anddates.

    Columns: type, customer_no, trx_no, amt_due, remaining.Parameter: type, customer, from_date, to_date.

    2) GENERATING POSITIVE PAY FILE FOR BANK REPORT?Basically this report generates a flat file of all the payments in order to send in to the bank.

    3) UPDATE POSITIVE PAY CHECKS REPORT?This report which updates the data into the (AP) account payables system from the plot file,

    the file which is sent by bank4) UPDATE POSITIVEPAY OUT STANDING CHECKS?

    This report which shows the out standing checks5) CUSTOMER PAYMENT DETAILS REPORT?

    This report shows each customer original amount, amount pay and due amount based ontransaction type (books, pens)

    Transaction types in AR

  • 8/3/2019 Apps Int Ques

    11/20

    Credit memo transaction typesInvoice, debit memo, and charge back transaction typesCommitment transaction types

    23) HOW DO YOU RECTIFY THE ERRORS IN INTERFACE TABLES?Depending on the naming convention used, errors appear in either alphabetical order or byerror code number.

    24)What are WHO Columns in oracle apps tables?1) Created by

    2) Creation date

    3) Last _updated by

    4) last_update_date

    5) last_update_value

    25) What are FLEX FIELDS?Flexfields are used to capture the additional business information.

    DFF KFF

    Additional Unique Info, Mandatory

    Captured in attribute prefixed

    columns

    Segment prefixed

    Not reported on standard reports Is reported on standard reportsTo provide expansion space onyour form With the help of []. []Represents descriptive Flex field.

    FLEX FILED : DESCRIPTIVE :

    REGIGSTER

    Used for entering and displaying keyinformationFor example Oracle General uses akey Flex field called Accounting Flexfield toUniquely identifies a general account.

    FLEX FILED : KEY : REGIGSTER

    Oracle Applications KEY FLEX FIELDS

    1) GL: ACCOUNTING

    2) AR: SALES TAX LOCATION, TERRITORY,3) AP: BANK DETAILS, COST ALLOCATION, PEOPLE GROUP

    Oracle Applications DESCRIPTIVE FLEX FIELDS (Partial)

    1) GL: daily rates

    2) AR: credit history, information

    3) PA: bank branch, payment terms, site address,

  • 8/3/2019 Apps Int Ques

    12/20

    26) What are different concurrent requests?a) Single request: this allows you to submit an individual request.

    b) Request set: this allows you to submit a pre-defined set of requests.

    27) What are the activities in Sys Admin Module? a) Define Custom Users, b) Define Login Users, c) Register oracle DB users, d) Define Concurrent Programs, e) Register Concurrent Executable,

    f) Setting Profile Option Values, g) Define Request Types.

    28)What activities can be performed in AOL? a) Registering tables. b) Registering views c) Registering db sequences

    d) Registering profile options e) Registering lookups and lookup codes

    f) Registering forms g) Registering Form and Non-Form functions

    i) Registering menus and sub-menus j) Registering DFF and KFF k) Libraries

    29)What are the type Models in thesystem parameters of the report?1) Bit map 2) Character mode

    30)What is SRW Package?(Sql Report Writer): The Report builder Built in package knowas SRW Package 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 Exist, to format width of the columns, to page break the column,

    to set the colors

    Ex: SRW.DO_SQL, Its like DDL command, we can create table, views , etc.,SRW.SET_FIELD_NUMSRW. SET_FILED_CHAR

    SRW. SET FILED _DATECheck the blog post for more details on SRW Package:http://oracleapps4u.blogspot.com/search/label/SRW%20Package

    31) Difference between Bind and Lexical parameters?BIND VARIABLE:-- are used to replace a single value in sql, pl/sql

    -- Bind variable may be used to replace expressions in select, where, group, orderby, having, connect by, start with cause of queries.-- Bind reference may not be referenced in FROM clause (or) in place of

    reserved words or clauses.LEXICAL REFERENCE:-- You can use lexical reference to replace the clauses appearing AFTER select,

    from, group by, having, connect by, start with.-- You cant make lexical reference in a pl/sql statement.

    http://oracleapps4u.blogspot.com/search/label/SRW%20Packagehttp://oracleapps4u.blogspot.com/search/label/SRW%20Package
  • 8/3/2019 Apps Int Ques

    13/20

    32) Matrix Report: Simple, Group above, NestedSimple Matrix Report : 4 groups

    1. Cross Product Group2. Row and Column Group3. Cell Group4. Cell column is the source of a cross product summary thatBecomes 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

    33) 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.

    34)What is Place holder Column?A placeholder is a column is an empty container at design time. The placeholder can hold avalue 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. Store aTemporary value for future reference. EX. Store the current max salary as records areretrieved.

    35)What is Formula Column? A formula column performs a user-defined computation onanother column(s) data, including placeholder columns.

    36) What is a Summary column?A summary column performs a computation on another column's data. Using the ReportWizard 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 DataModel view, and use the Property Palette to create the following additional summaries:first, last, standard deviation, variance.

    37) What is cursor?A Cursor is a pointer, which works on active set, I.e. which points to only one row at a timein the context areas ACTIVE SET. A cursor is a construct of pl/sql, used to process multiple

    rows using a pl/sql block.

    38)Types of cursors?1) Implicit: Declared for all DML and pl/sql statements. By default it selects one row only.2) Explicit: Declared and named by the developer. Use explicit cursor to individuallyprocess each row returned by a multiple statements, is called ACTIVE SET.

    Allows the programmer to manually control explicit cursor in the pl/sql block Declare: create a named sql area

  • 8/3/2019 Apps Int Ques

    14/20

    Open: identify the active set. Fetch: load the current row in to variables. Close: release the active set.

    CURSOR ATTRIBUTES: %is open: evaluates to true if the cursor is open. %not found: evaluates to true if the most recent fetch does not return a row %found: evaluates to true if the most recent fetch returns a row. %row count: evaluates to the total number of rows returned to far.

    EXAMPLE:Begin

    Open emp_cursor;Loop

    Fetch when emp_cursor % rowcount >10 orEmp_curor % not found;

    dbms_output_put_line(to_char(vno)|| || vname);End loop;

    Close emp_cursor;End;

    CURSOR FOR LOOPA) cursor for loop is a short cut to process explicit cursorsB) it has higher performanceC) cursor for loop requires only the declaration of the cursor, remaining things like opening,

    fetching and close are automatically take by the cursor for loopExample:1) Declare

    Cursor emp_cursor isSelect empno,ename

    From emp;BeginFor emp_record in emp_cursor loopDbms_output.putline(emp_record.empno);Dbms_output.putline(emp_record.ename)

    End loopEnd;

    39)Can we create a cursor without declaring it?Yes by using cursor for loop using subqueries.BEGINFOR emp_record IN ( SELECT empno, ename

    FROM emp) LOOP-- implicit open and implicit fetch occur

    IF emp_record.empno = 7839 THEN...

    END LOOP; -- implicit close occursEND;

    40)Attribute data types?1) %type 2) %row type.

  • 8/3/2019 Apps Int Ques

    15/20

    41)Exception Handling?Is a mechanism provided by pl/sql to detect runtime errors and process them with out

    halting the program abnormally1) pre-defined2) user-defined.

    PRE-DEFINED:1) cursor_already_open ------ attempted to open an already open cursor.2) Dup_val_on_index ------ attempted to insert a duplicate values.3) Invalid_cursor ------ illegal cursor operation occurred.4) Invalid_number ------ conversion of character string to number fails.5) Login_denied ------ loging on to oracle with an invalid user name

    and password.6) program_error ------ pl/sql has an internal problem.7) storage_error ------ pl/sql ran out of memory or memory is corrupted.8) to_many_row ------ single row select returned more than one row.9) value_error ------ arithmetic,conversion,truncation or size constraint error10) zero_devided ------ attempted to divided by zero.

    USER-DEFINED:Declare : name the exceptionRaise : explicitly raise the exception by using the raise statementsReference: exception handing section.

    The Raise_Application_Error_Procedure:n You can use this procedure to issue user-defined error messages from stored sub

    programs.n You can report errors to your applications and avoid returning unhandled exceptions.

    Raise_Application_Error(error_number,message[,{true/false}]Error number between -20000 to -20999

    pragma exception_init?It tells the compiler to associate an exception with an oracle error. To get an error

    message of a specific oracle error.

    Ex: pragma exception_init(exception name, oracle error number)

    Example for Exceptions?1) Check the record is exist or not?

    DeclareE emp% rowtype

    Begine.empno := &empno;

    select * into e from emp where empno =e.empno;Dbms_output.putline(empno || e.empno);Exception

    When no_data_found thenDbms_output.putline(e.empno ||doest exist);

    End;

    2) User defined exceptions? Define p_dept_desc =Oracleapps4u

  • 8/3/2019 Apps Int Ques

    16/20

    Define p_dept_number =1236Declare

    E_invalid_dept exception;Begin

    Update departmentsSet dept_name=&p_dept_desc

    Where dept_id =&p_dept_number;If sql% not found then

    Raise e_invalid_departments;End if;Commit;

    ExceptionWhen e_invalid_departments thenDbms_output.putline(no such dept);

    End;

    42) Can u define exceptions twice in same block?No

    43) Can you have two functions with the same name in a pl/sql block?Yes

    44)Can you have two stored functions with in the same name?Yes

    45)Can function be overload?Yes

    46)What is the maximum number of statements that can be specified in a triggerstatement?

    One

    47) Can functions be overloaded ?Yes

    48)Can 2 functions have same name & input parameters but differ only by returndata type

    No

    49) What is a package?Group logically related pl/sql types, items and subprograms.

    1) Package specification

    2) Package body

    Advantages of a package:

    Modularity Easier Application Design Information Hiding Overloading

    You cannot overload:Two subprograms if their formal parameters differ only in name or parameter mode.(datatype and their total number is same).Two subprograms if their formal parameters differ only in datatype and the differentdatatypes are in the same family (number and decimal belong to the same family)

  • 8/3/2019 Apps Int Ques

    17/20

    Two subprograms if their formal parameters differ only in subtype and the differentsubtypes are based on types in the same family (VARCHAR and STRING are subtypes ofVARCHAR2)

    Two functions that differ only in return type, even if the types are in different families.

    50) What is FORWARD DECLARATION in Packages?PL/SQL allows for a special subprogram declaration called a forward declaration. It consistsof the subprogram specification in the package body terminated by a semicolon. You canuse forward declarations to do the following: Define subprograms in logical or alphabetical order. Define mutually recursive subprograms.(both calling each other). Group subprograms in a package

    Example of forward Declaration:

    CREATE OR REPLACE PACKAGE BODY forward_packISPROCEDURE calc_rating(. . .); -- forward declarationPROCEDURE award_bonus(. . .)IS -- subprograms definedBEGIN -- in alphabetical ordercalc_rating(. . .);

    . . .END;

    PROCEDURE calc_rating(. . .)IS

    BEGIN. . .

    END;

    END forward_pack;

    100 Parameters are permitted from back end

    (FND_REQUEST.SUBMIT_REQUEST) is used to submit the request from back end.

    why we register a table in apps schema?

    We register a custom table in the custom schema. Then give all permissions to APPS schema.

    Reason being, when stored procedures or functions are written to perform DMLs on the custom

    table, it is done from APPS schema.

    Can you add a descriptive FlexField to a table which lready have data in it?

    yes,,u can add descriptive flex fields to the table that is already existing..but it should be registered

    using ad_dd package.and after table registeration,,ur columns must also be registered.and once this

    databaseregisteration is over,,u need to login as appdevelop responsibility and then dff steps is to

    be done,,,like giving the name of the attribute category to hold the dff columns..

    regards

    What are User Exits and what are different types o...

    http://www.geekinterview.com/question_details/16055http://www.geekinterview.com/question_details/16055http://www.geekinterview.com/question_details/16055
  • 8/3/2019 Apps Int Ques

    18/20

    Types of user exits

    FND SRWINIT sets your profile option values and allows Oracle AOL user exits

    to detect that they have been called by a Oracle Reports program.[Before

    Report trigger, P_CONC_REQUEST_ID lexical parameter]

    FND SRWEXIT ensures that all the memory allocated for Oracle AOL user exits

    has been freed up properly. [After Report trigger]FND FORMAT_CURRENCY is used for MULTIPLE CURRNECY REPORTING (MRC) [formula

    Column, P_MIN_PRECISION lexical parameter]FND FLEXSQL this API is used for get ELECT/WHERE/HAVING/ORDER BY/GROUP BY

    from flex field

    tables.FND FLEXIDVAL this API is used for get descriptions from flexfields, gets

    input from FND FLEXSQL.

    Call this user exit to populate fields for display. You pass the key

    flexfields data retrieved by the query into this exit from the formula

    column. With this exit you display values,descriptions and prompts by passing

    appropriate token (VALUE/DESCRIPTION/APROMPT/LPROMPT).

    it will take inputs from columns of query , the columns are defined by FND

    FLEXSQL.

    Manadatory Parameters in Oracle Apps Reports

    p_conc_request_id

    this is system parameter captures user concurrent program request id from srs window

    What is a segment qualifier and how is it set for ...Segment Qualifier : From this we can identify the account is relating to which type ie whether the

    particular account is for expenses or for revenue or assets or liabilities or fund balance.

    While entering the values for the segments we set the segment qualifiers.

    Navigation steps:-

    Flexfields -> key -> values.

    What is FlexField?

    A flex field is a field made up of subfields, or segments.

    A flex field appears on your form as a popup window that contains a prompt

    for each segment. Each segment has a name and a set of valid values.

    A Flexfield is used to capture information about Your organization. Flexfield have

    flexible structure for storing key(main) information. Like Company, Cost Center, andAccount. They also give u highly adaptable Structure for storing customized information

    in oracle Applications.

    http://www.geekinterview.com/question_details/16079http://www.geekinterview.com/question_details/49938http://www.geekinterview.com/question_details/16079http://www.geekinterview.com/question_details/49938
  • 8/3/2019 Apps Int Ques

    19/20

    FlexFields are two types :Key Flex Fields (KFF) and Descriptive Flex Fields

    (DFF).KFF : KFF Provide a flexible way of representing primary keys using different

    set of segements like accounting codes, part numbers, job descriptions , and

    more.It is mandatory.DFF : DFF Provide a flexible way for provide customizable expansion space in

    forms,

    as well as to implement context sensitive fields that appear only when needed.

    .Descriptive flexfield (DFF), where we can enter extra information regarding our organisation which

    is context sensitive segment.

    What is the table column link between PO and AP ?

    po_req_distributions_all.code_combination_id =ap_invoice_disributions_all.dist_code_combination_id

    If the Iinvoice Distribution is matched to a Purchase Order then

    ap_invoice_distributions_all.PO_DISTRIBUTION_ID is the link to po_distributions_all table

    How can multi org can be set up?

    begin

    fnd_client_info.set_org_context(204);

    end;

    begin

    fnd_global.apps_initialize(user_id,resp_id,resp_appl_id);

    end;

    begin

    dbms_application_info.set_client_info('ORG_ID');

    end;

    What are the different types of value sets and als...

    Different types of Value sets are,

    1) Independant- This Value set contains list of values which does not depends on any other value.

    2) Dependant- It contains values which depends on any one of the Independant value.

    3) Pair- combines 2 flexfield together to specify range of valid values.

    http://www.geekinterview.com/question_details/16077http://www.geekinterview.com/question_details/16077
  • 8/3/2019 Apps Int Ques

    20/20

    4) Special- Uses only 1 flexfield structure to specify values.

    5) Table- This Value set contains list of values from 1 or more than 1 table columns.

    6) Translatable Dependant- Same as Dependant value set, only translated values are present.

    7) Translatable Independant- Same as Independant value set, only translated values are present.