Tuesday, September 13, 2016

ADD_ROWS in Advance Table OAF

In Controller Code:


  OAAdvancedTableBean tableBean =
      (OAAdvancedTableBean)webBean.findChildRecursive("AdvTableId");

    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)) &&
        ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    {

      String[] param ={ pageContext.getParameter(EVENT_PARAM), pageContext.getParameter("ProgrId") };
      Serializable[] k ={ pageContext.getParameter("ProgrId"),ObjVerNum};
      am.invokeMethod("repeatRowValidation", param);
      am.invokeMethod("createRow", k);
    }


Inside AM:


  public void repeatRowValidation(String Event, String prgid)
  {
    OAViewObject VOMain = getSaleableAreaDtlsVO1();

    System.out.println("Fetched vvvv Rowcount -->" + 
                       VOMain.getFetchedRowCount());
    int fetchedRowCount = VOMain.getFetchedRowCount();

    if (fetchedRowCount >= 1)
    {
      intIter = intIter + 1;
      strIter = "Iter" + intIter;
      RowSetIterator iter = VOMain.createRowSetIterator(strIter);
      for (int i = 1; i <= fetchedRowCount; i++)
      {
        SaleableAreaDtlsVORowImpl row = (SaleableAreaDtlsVORowImpl)iter.next();
        if (row == null)
        {
          iter.closeRowSetIterator();
          intIter = intIter + 1;
          strIter = "Iter" + intIter;
          throw new OAException("SaleableAreaDtlsVORow Doesnt Exist");
        } else
        {
          System.out.println("type is -->" + row.getSaleableareaType());
          if (row.getSaleableareaType() != null && 
              !row.getSaleableareaType().equals("USR_DTLS"))
          {
            Row[] VOCommerRows = 
              VOMain.getFilteredRows("SaleableareaType", row.getSaleableareaType());
            System.out.println("length -->" + VOCommerRows.length);
            if (VOCommerRows.length > 1)
            {
              throw new OAException("The Type should be Unique..", 
                                    OAException.ERROR);
            }
          }
          Row[] rows = VOMain.getFilteredRows("ProgramId", prgid);
          Row Vorow = null;
          if (rows != null && rows.length > 0)
          {
            if (Event != null && Event.equals("addRows"))
            {
              Vorow = rows[rows.length - 1];
              if (Vorow.getAttribute("UnitsMeasure") == null)
              {
                throw new OAException("Units Should not be null..", 
                                      OAException.ERROR);
              }
            }
          }
        }
      }iter.closeRowSetIterator();
    }
  }

public void createRow(String progid,String ObjVerNum)
  {
    OAViewObject pervo = getSaleableAreaDtlsVO1();
    //if(!pervo.isPreparedForExecution()){  pervo.executeQuery(); }
    pervo.setMaxFetchSize(0);
    pervo.last(); // Go to the last Row of the VO
    pervo.next();
    Row row = pervo.createRow();
    pervo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);

    row.setAttribute("ProgramId", progid);
    Number Sno = new Number(pervo.getFetchedRowCount());
    row.setAttribute("SrNo", Sno);
    row.setAttribute("ObjVerNum",new Number(Integer.parseInt(ObjVerNum)));
    row.setAttribute("DeleteDisable", Boolean.FALSE);
  }








Thursday, September 8, 2016

Finance Interview Questions and Answers

1.       What are mandatory parameters of Procedures and what the use of those?
·         Errorbuf: It is used to returns the error messages and sent it to the log file.
·         Retcode: It is used to show the status of the Procedure with 0, 1, and 2.
0 for Completed Normal
1 for Completed Warning
2 for Completed Error
2.       What are the levels at which profile option can be set? If answered, ask the priority from lowest to highest of these level.
1. Site
2. Application
3. Responsibility
4. User
3.       What is Exception? What are the two types of exceptions?
Error handling part of PL/SQL block is called Exception. They have two types : user_defined and predefined
4.       List of Pre-Defined Exception.(Expecting a minimum of four)
DUP_VAL_ON_INDEX
ZERO_DIVIDE
NO_DATA_FOUND
TOO_MANY_ROWS
CURSOR_ALREADY_OPEN
INVALID_NUMBER
INVALID_CURSOR
PROGRAM_ERROR
TIMEOUT _ON_RESOURCE
STORAGE_ERROR
LOGON_DENIED
VALUE_ERROR
5.       What are the cursor attributes used in PL/SQL?
%ISOPEN: it checks whether the cursor is open or not.
%ROWCOUNT: returns the number of rows affected by DML operations: INSERT,DELETE,UPDATE,SELECT.
%FOUND: it checks whether cursor has fetched any row. If yes - TRUE.
%NOTFOUND: it checks whether cursor has fetched any row. If no - TRUE.
6.       What are the modes of parameters that can be passed to a procedure?
IN,OUT,IN-OUT parameters
7.       What is difference between a PROCEDURE & FUNCTION?
A FUNCTION is alway returns a value using the return statement.
A PROCEDURE may return one or more values through parameters or may not return at all.
8.       Can we associate a view to a trigger
Yes
9.       When a trigger is associated to a view, Is the base table triggers are normally disabled ?
No
10.   Difference between KFF and DFF
     

11.   What are different report triggers and what is their firing sequence ?
Before Parameter Form
After Parameter Form
Before Report
Between Pages
After Report.
12.   What are Interface table in AP
AP INTERFACE TABLE: 1). AP_INTERFACE_CONTROLS.
                                        2). AP_INTERFACE_REJECTIONS
                                        3). AP_INVOICE_INTERFACE
                                        4). AP_INVOICE_LINES_INTERFACE.

13.   What are Interface table in AR
                                                    1). AR_PAYMENTS_INTERFACE_ALL
                                                    2). AR_TAX_INTERFACE
                                                    3). HZ_PARTY_INTERFACE
                                                    4). HZ_PARTY_INTERFACE_ERRORS
                                                    5). RA_CUSTOMERS_INTERFACE_ALL
                                                    6). RA_INTERFACE_DISTRIBUTIONS_ALL
                                                    7). RA_INTERFACE_ERRORS_ALL
                                                    8). RA_INTERFACE_LINES_ALL
                                                    9). RA_INTERFACE_SALESCREDITS_ALL
14.   What are Interface table in GL
                     1). GL_BUDGET_INTERFACE
                                                  2). GL_DAILY_RATES_INTERFACE
                                                  3). GL_IEA_INTERFACE
                                                  4). GL_interface
                                                  5). GL_INTERFACE_CONTROL
                                                  6). GL_INTERFACE_HISTORY
15.   Difference between Lookups and Value Sets
1.Value sets can be attached to parameters of a concurrent program, whereas Lookups can't.
2.Value sets can contain values that are a result of an SQL Statement.
Hence it is possible to make Value Set list of values dynamic.
On the contrary, Lookup Codes are Static list of values.
16.   What are the differences between FAH and SLA?
FAH
• Deals with external (i.e. non-E-Business Suite) applications.
• No seeded event models – event models need to be build from scratch.
• No seeded accounting rules – accounting rules need to be build from scratch.
• Requires purchasing a separate license.
SLA:
• Deals with the E-Business Suite subledger applications (AR, AP, etc.).
• Seeded event models which cannot be changed (extensions can be build using Custom Sources).
• Seeded accounting methods which can be customized (copied and modified) at will.
• Integral part of E-Business Suite Financials (R12 onwards).

17.   What is transaction object table in FAH
These are the custom staging tables created to map the Third party system data to oracle.

18.   What are the mandatory accounting attributes used in FAH?
Entered Amount, Entered Currency code, First distribution identifier, distribution type ,GL Date
19.   What are supporting references and when can we use?
• To provide additional business information about a sub ledger journal entry at the header or line level
• To establish a sub ledger balance for a particular source value or combination of source values for a particular account
20.   Name few XLA tables
XLA_Events,
XLA_Transaction_entities,
xla_ae_headers,
xla_ae_lines,

xla_distribution_links

Wednesday, September 7, 2016

Xml Publisher Report

1. How to Upload RTF Template from Back end ?

By using oracle.apps.xdo.oa.util.XDOLoader

Upload:

java oracle.apps.xdo.oa.util.XDOLoader UPLOAD -DB_USERNAME $apps_user -DB_PASSWORD $apps_pwd -JDBC_CONNECTION Host Ip:Port:SID -LOB_TYPE TEMPLATE_SOURCE -APPS_SHORT_NAME XX -LOB_CODE XX_TEMP -LANGUAGE en -TERRITORY US -XDO_FILE_TYPE RTF -FILE_CONTENT_TYPE 'application/rtf' -FILE_NAME 'XX_TEMP.rtf' -CUSTOM_MODE FORCE

2. How to Map RTF Template Via Backend
   Using api FND_PROGRAM.ADD_TEMPLATE

3. What are the executeable and Concurrent Program used to develop a report without RDF?
     Executable: XDODTEXE
     Concurrent Program : Java Concurrent Program
  For developing a XML Publisher report without RDF

4. How to repeat header of the template on each and every page of the output ?
   Use <?@section: ?> in order to repeat that specific section in each page of the output. Also to reset the page number.

5. How many ways we can display images in a BI Publisher report?
    It can done in 5 ways
--> Direct insertion in RTF Template
--> URL Reference
--> OA_MEDIA directoty reference
--> Image from BLOB datatype from database
--> Using BI Beans

6. Conditional formatting:
      --> If statements :     <?if:condition?> your data <?end if?>
      -->If then else statements :            <?xdofx:if element_condition
                                                                                 Then output1
                                                                                 else output2     end if?>
      -->Choose statements:     for multiple conditions
                                                  <?choose?><?when:expression?><?otherwise?>

    There are more ways for Conditional Formatting in addition to the above like column formatting, row formatting etc.

7. Tables in Xml Publisher:
PER_GB_XDO_TEMPLATES
XDO_DS_DEFINITIONS_B
XDO_DS_DEFINITIONS_TL
XDO_DS_DEFINITIONS_VL
XDO_LOBS
XDO_TEMPLATES_B
XDO_TEMPLATES_TL
XDO_TEMPLATES_VL
XDO_TEMPLATE_FIELDS
XDO_TRANS_UNITS
XDO_TRANS_UNIT_PROPS
XDO_TRANS_UNIT_VALUES





Web ADI (Web Application Desktop Integrator)

Oracle Web Application Desktop Integrator (Web ADI) is Oracle E-Business Suite's solution for integrating E-Business Suite applications with desktop applications such as Microsoft Excel, Word and Projects.  "Integrators" encapsulate the metadata and other information needed to integrate a particular Oracle E-Business Suite task with a desktop application


The Desktop Integration Framework allows you to:

  • Create Integrators using a wizard-based user interface
  • Define Integrators to upload data through PL/SQL APIs or directly to tables
  • Define Integrators to download data from text files or using SQL Queries
  • Define data validation rules
  • Embed UI widgets (List of values, Pop lists, Date pickers, Flexfields) in spreadsheets
  • Use the Oracle E-Business Suite Security Model
  • Define layouts and mappings for custom integrators



Login --> Desktop Integration Manager --> Manage Integrator or Create Integrator



Contains below stages:

1. Integrator 
          --> Integrator Information
          --> Integrator Parameters
          --> Security Rules (functions to attach access the Web ADI)
2. Interfaces
          --> Enter the Interface table name (Temporary Table to load data into table)
                     or Procedure name (select in TYPE column)
          --> API Returns (FND Message Code - shows user defined messages, error messages - oracle error messages
          --> Define all attributes based on the Interface columns or parameters.
3. Contents
          --> Used to download data into Excel from Temporary (Interface) table.
          --> Need to write SQL Query in Content type to get data into excel
          --> Content Columns: link between query columns and excel columns

4. Uploader
         --> to Upload data 
5. Importer
         --> Validation package (procedure) to load data from Temporary table to Interface table.


6. Define Layout
   --> Need to select Integrator and  Require fields (line , Header etc)
7.Define Mappings:
     --> To Link for Layout and Integrator
     --> Select Source Columns and Target Columns for LOV buttons
8. Preview to see the preview of Integrator.

Tuesday, September 6, 2016

Data Template Method

Data engine supports the following functionality:
·         Single and multiple data queries
·         Query links
·         Parameters
·         Aggregate functions (SUM, AVG, MIN, MAX, COUNT)
·         Event triggers
·         Multiple data groups
XML output generated by the data engine supports the following:
·         Unicode for XML Output
Unicode is a global character set that allows multilingual text to be displayed in a single application. This enables you to develop a single multilingual application and deploy it worldwide.
·         Canonical format
The data engine generates date elements using the canonical ISO date format: YYYY-MM-DDTHH24:MI:SS.FF3TZH:TZM for a mapped date element, and ######.## for number elements in the data template XML output.

Data Template Definition:

The data template is an XML document that consists of 4 basic sections:
- Define parameters,
- Define triggers,
- Define data query,
- Define data structure.

This structure is shown as follows:



As shown in the sample figure, the data template consists of 
     a <parameters> section in which parameters are declared in child <parameter> elements; 
     a <dataQuery> section in which the SQL queries are defined in child <sqlStatement> elements; 
     a <dataStructure> section in which the output XML structure is defined.


Create Data Definition & Associate with Data Template
XML Publisher Administrator -> Data Definitions -> Create Data Definition




GL Interview Questions

1. What is journal, how many types of journal?
 Journals it is used to record the business transaction it contains debit and credit lines always debit must be equal to credit.
         Types of journals are
              --> Suspense Journal or Unbalanced Journal
              --> Recurring Journals
              --> Reversal journals.

Types of Journals:

1. Functional Currency Journal: This Journal, we enter Local Currency transaction purpose.

2. Foreign Currency Journal: this Journal, we enter other than local currency transaction purpose...before we define exchange rates

3.Suspense Journal: this Journal, whenever debit is not equal to credit that time, we enable in set of books window Suspense button, then it works otherwise it's not working

4.Tax Journal: this Journal, calculate taxation of Purchased items

5.Reverse Journal: this Journal whenever we enter recurring journal, at the time of we using..We have two methods...one is Debit to Credit and second one is sign (+ to -)

6.Recurring Journal:this one is We define one template, we use Periodically, these are 3 types
1.Standard 2.Skeleton 3.Formula

7.Mass Allocation Journal:Set of Expenses or Set of Revenue allocate different parts using Formula A*B/C
A is Total Cost Pool..B is Usage Factor...C is Total Usage Factor...

8. Batch Journal: Group of Journal we enter at a time, We Define Control Amount

9. Stat Journal: This JV we have one side of Amount either debit or Credit.....

3. Interface tables in General Ledger ?

GL_BUDGET_INTERFACE
GL_DAILY_RATES_INTERFACE
GL_IEA_INTERFACE
GL_INTERFACE
GL_INTERFACE_CONTROL
GL_INTERFACE_HISTORY




TCA API's

API's in TCA: