Monday, 29 December 2014

ADF Mobile - attached device not being recognised

ADF Mobile - attached device not being recognised


Seemingly randomly I started having errors trying to deploy an ADF Mobile application to my MicromaxA210 mobile.  I was getting


[11:26:02 AM] ----  Deployment started.  ----

[11:26:02 AM] Target platform is  (Android).

[11:26:02 AM] Beginning deployment of MAF application "SigCap" to Android using profile "run1".

[11:26:03 AM] Checking state of Android Debug Bridge server...

[11:26:03 AM] Android Debug Bridge server already running.

[11:26:23 AM] Verifying a single Android device is online and connected to the ADB server...

[11:26:23 AM] Deployment cancelled.

[11:26:23 AM] ----  Deployment incomplete  ----.

[11:26:23 AM] Failed to detect a connected Android device.  Make sure the device is connected.  Otherwise, manually restart the ADB server.  The following results were provided by ADB:

List of devices attached

emulator-5554 offline

 (oracle.adfmf.framework.dt.deploy.android.deployers.CheckAttachedDevicesDeployer)


What I did to fix this was the following


1) From the Windows Start I ran devmgmt.msc and from here I found "Android Composite ADB Device" - I double clicked on this to chose to uninstall AND delete the driver.

2) I then re-connected the MicromaxA210 mobile and it started to install the driver.  I got an error here but I pressed on regardless since now at least Windows Explorer could see the device although JDeveloper couldn't

3) I made sure USB Debugging was ON on the MicromaxA210 mobile AND I also switch off Media Device (MTP) which is a USB connection option.


The combination of the above and the luck of the gods seemed to have got things working.

Sunday, 30 November 2014

API - Supplier & Supplier Site Creation

API - Supplier & Supplier Site Creation

declare
        l_vendor_rec AP_VENDOR_PUB_PKG.r_vendor_rec_type;
        l_vendor_site_rec AP_VENDOR_PUB_PKG.r_vendor_site_rec_type;
        x_return_status VARCHAR2(2000);
        x_msg_count NUMBER;
        x_msg_data VARCHAR2(2000);
        l_upd number := 0;
        x_vendor_id number;
        x_party_id number;
        x_vendor_site_id number;
        x_party_site_id number;
        x_location_id number;
        l_party_site_id number;
        l_organization_id number;
begin
     --mo_global.set_policy_context('S',1650);
          l_vendor_rec.SEGMENT1     := '1234577';
          l_vendor_rec.VENDOR_NAME  := 'TESTSUPPLIER';
          l_vendor_rec.SUMMARY_FLAG := 'N';
          l_vendor_rec.ENABLED_FLAG := 'Y';
         

            AP_VENDOR_PUB_PKG.Create_Vendor
            ( p_api_version    => 1,
              x_return_status  => x_return_status,
              x_msg_count      => x_msg_count,
              x_msg_data       => x_msg_data,
              p_vendor_rec     => l_vendor_rec,
              x_vendor_id      => x_vendor_id,
              x_party_id       => x_party_id
            );

            if (x_return_status <> 'S') then
                    dbms_output.put_line('Encountered ERROR in supplier creation!!!');
                    dbms_output.put_line('--------------------------------------');
                    dbms_output.put_line(x_msg_data);

                    IF x_msg_count > 1 THEN
                        FOR i IN 1..x_msg_count LOOP
                             dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255));
                        END LOOP;
                    END IF;
            else
           
           
           
            l_vendor_site_rec.vendor_id            := x_vendor_id;
            l_vendor_site_rec.VENDOR_SITE_CODE     := 'HOME';
            l_vendor_site_rec.org_id               := 1650;
            l_vendor_site_rec.COUNTRY              := 'AE';                
            l_vendor_site_rec.ADDRESS_LINE1        :='Abu Dhabi';
            l_vendor_site_rec.PURCHASING_SITE_FLAG := 'Y';   
            l_vendor_site_rec.PAY_SITE_FLAG        := 'Y';   
             

            AP_VENDOR_PUB_PKG.Create_Vendor_Site
            ( p_api_version    => 1,
            x_return_status    => x_return_status,
            x_msg_count        => x_msg_count,
            x_msg_data         => x_msg_data,
            p_vendor_site_rec  => l_vendor_site_rec,
            x_vendor_site_id   => x_vendor_site_id,
            x_party_site_id    => x_party_site_id,
            x_location_id      => x_location_id
            );

            if (x_return_status <> 'S') then
                    dbms_output.put_line('Encountered ERROR in supplier site creation!!!');
                    dbms_output.put_line('--------------------------------------');
                    dbms_output.put_line(x_msg_data);
                            IF x_msg_count > 1 THEN
                                FOR i IN 1..x_msg_count LOOP
                                        dbms_output.put_line(substr(FND_MSG_PUB.Get( p_encoded => FND_API.G_FALSE ),1,255));
                                END LOOP;
                            END IF;
            ELSE
                        dbms_output.put_line('Supplier Site Created!!!');

            end if; 
           end if;  
end;

Tuesday, 25 November 2014

Create XML Publisher report without RDF

Create XML Publisher report without RDF

Create Oracle Report in just 4 simple easy steps.

1. Create Concurrent Program by using standard Executable ‘XDODTEXE’
Pls note: XDODTEXE  is XML Publisher Data Template Executable






2. Create XML file based on below sample layout
Pls note: It will be used as Data Template File for XML Publisher Data Definition








3. Create Data Definition using XML Publisher Administrator Responsibility.
Pls note:
-          Data Definition Code should be same as Concurrent program Short name
-          Upload the XML File as Data Template






   4. Create and upload RTF file as Template under XML Publisher Administrator Responsibility.
   Pls note: Template code should be same as Data Definition code 






Finish !!
-----------------------------------------------------------------------------------------------------------------------




Sample XML file for Data Template
-----------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>
- <dataTemplate name="XXADLQ_PR" version="1.0">
- <properties>
  <property name="debug_mode" value="on" />
  </properties>
- <parameters>
  <parameter name="P_EMP_NUMBER" dataType="character" />
  <parameter name="P_FROM_DATE" dataType="date" />
  <parameter name="P_TO_DATE" dataType="date" />
  <parameter name="P_TIME_PERIOD" dataType="character" />
  <parameter name="P_DEPARTMENT" dataType="character" />
  </parameters>
- <dataQuery>
  <sqlStatement name="Q_PAYROLL">SELECT TO_CHAR(PPA.EFFECTIVE_DATE,'MON-YYYY') TIME_PERIOD, EMPLOYEE_NUMBER, FULL_NAME, PAP.NAME "POSITION_NAME", NATIONALITY, HAOU.NAME "DEPARTMENT",to_char(ORIGINAL_DATE_OF_HIRE,'DD-MM-RRRR')ORIGINAL_DATE_OF_HIRE, PETF.ELEMENT_NAME,SUM(ROUND(RESULT_VALUE,0)) RESULT_VALUE FROM PER_ALL_PEOPLE_F PAPF, PER_ALL_POSITIONS PAP, HR_ALL_ORGANIZATION_UNITS_TL HAOU, PER_ALL_ASSIGNMENTS_F PAAF, PAY_ASSIGNMENT_ACTIONS PAA, PAY_ELEMENT_TYPES_F PETF, PAY_INPUT_VALUES_F PIVF, PAY_RUN_RESULTS PRR, PAY_RUN_RESULT_VALUES PRRV, PAY_PAYROLL_ACTIONS PPA, PAY_ELEMENT_CLASSIFICATIONS PEC WHERE PAPF.PERSON_ID = PAAF.PERSON_ID AND PAAF.ASSIGNMENT_ID = PAA.ASSIGNMENT_ID AND PAAF.ORGANIZATION_ID = HAOU.ORGANIZATION_ID AND PEC.CLASSIFICATION_ID = PETF.CLASSIFICATION_ID AND PETF.ELEMENT_TYPE_ID = PIVF.ELEMENT_TYPE_ID AND PIVF.ELEMENT_TYPE_ID = PRR.ELEMENT_TYPE_ID AND PIVF.INPUT_VALUE_ID = PRRV.INPUT_VALUE_ID AND PRR.RUN_RESULT_ID = PRRV.RUN_RESULT_ID AND PAA.ASSIGNMENT_ACTION_ID = PRR.ASSIGNMENT_ACTION_ID AND PAA.PAYROLL_ACTION_ID = PPA.PAYROLL_ACTION_ID AND TRUNC(SYSDATE) BETWEEN PAAF.EFFECTIVE_START_DATE AND PAAF.EFFECTIVE_END_DATE AND TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE AND PAPF.EMPLOYEE_NUMBER = nvl(:P_EMP_NUMBER,PAPF.EMPLOYEE_NUMBER) --AND PPA.EFFECTIVE_DATE BETWEEN :P_FROM_DATE and :P_TO_DATE AND PPA.EFFECTIVE_DATE = (select max(EFFECTIVE_DATE) from PAY_PAYROLL_ACTIONS where to_char(effective_date,'MON-RRRR') like :P_TIME_PERIOD) AND RESULT_VALUE IS NOT NULL AND PIVF.NAME LIKE 'Pay Value%' AND PEC.CLASSIFICATION_NAME LIKE 'Earning%' AND PAAF.POSITION_ID = PAP.POSITION_ID AND HAOU.NAME = nvl(:P_DEPARTMENT,HAOU.NAME) AND HAOU.LANGUAGE = 'US' GROUP BY EMPLOYEE_NUMBER, PETF.ELEMENT_NAME, FULL_NAME,NATIONALITY, PAP.NAME, HAOU.NAME, ORIGINAL_DATE_OF_HIRE, PPA.EFFECTIVE_DATE ORDER BY EMPLOYEE_NUMBER</sqlStatement>
  </dataQuery>
  -----if we want one more sql query we add here......
- <dataStructure>
- <group name="G_PAYROLL" source="Q_PAYROLL">
  <element name="EMPLOYEE_NUMBER" value="EMPLOYEE_NUMBER" />
  <element name="FULL_NAME" value="FULL_NAME" />
  <element name="POSITION_NAME" value="POSITION_NAME" />
  <element name="NATIONALITY" value="NATIONALITY" />
  <element name="DEPARTMENT" value="DEPARTMENT" />
  <element name="ORIGINAL_DATE_OF_HIRE" value="ORIGINAL_DATE_OF_HIRE" />
  <element name="ELEMENT_NAME" value="ELEMENT_NAME" />
  <element name="RESULT_VALUE" value="RESULT_VALUE" />
  <element name="PAYROLL_RUN" value="PAYROLL_RUN" />
  <element name="TIME_PERIOD" value="TIME_PERIOD" />
  -----if we have one more group we can add here.....
  </group>
  </dataStructure>
  </dataTemplate>

Tuesday, 18 November 2014

How to set where clause programmatically in OAF?



Imagine this is the query in your VO:

select  empno,name from Employee;


So in this query you want to set the where clause programatically run time. So what you do is in your VOImpl.java file where you are writing the initQuery method use the below code:

vo.setWhereClause(null);
vo.setWhereClauseParams(null);
vo.setWhereClause("employee_number = :1 and Person_id = :2");
vo.setWhereClauseParam(1,empno);
vo.setWhereClauseParam(2,personid);
vo.executeQuery();



Below example shows coding handled in CO

  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
          if(pageContext.getParameter("item3")!=null)
    {
  /* The below code line is used to initialize the application module */
    OAApplicationModule am=(OAApplicationModule)pageContext.getApplicationModule(webBean);
  /* The below code line is used to initialize VO*/
    XxepmVOImpl vo=(XxepmVOImpl)am.findViewObject("XxepmVO1");

    String from_date = pageContext.getParameter("item1");
    String to_date = pageContext.getParameter("item2");

    vo.setWhereClause(null);
    vo.setWhereClauseParams(null);
    vo.setWhereClause("to_date(XxepmEO.START_DATE,'DD-MM-RRRR') between to_date(:1,'DD-MON-RRRR') and to_date(:2,'DD-MON-RRRR')");
    vo.setWhereClauseParam(0,from_date);
    vo.setWhereClauseParam(1,to_date);
    vo.executeQuery(); 

    
 //   String message = String.valueOf(am);
   // String message = String.valueOf(vo);
//throw new OAException(from_date, OAException.INFORMATION);
  /* DataDisplayVO1 is the instance name in AM which is the original name of the VO */
   // vo.executeQuery();
     }
  }




Thursday, 19 January 2012

Diffrence between Personalization, Extension and Customization

In Oracle EBS development, the terms Personalization, Customizations & Extensions are often used interchangeably. It often creates confusion among developers regarding the meaning of these terms. These terms are critically important terms that developers must understand and use properly. Let’s discuss them briefly here to simply understand what they are.

What is Personalization?
Personalization is the process of making changes to the User Interface (UI) from within an Oracle E-Business Suite Form/Page. It is possible to make personalization to both Form-based and OA Framework based pages.
Simply it can be stated as Enabling or Disabling some fields on User Interface is personalization.

What is Extension?
Extension is the process of making changes to the programmatic (i.e., PL/SQL or Java) elements of an E-Business Suite form/page. It is possible to extend both Forms based and OA Framework-based pages.
Simply it can be stated as adding Enhancement over previous is extension. 

What is Customization?
Customization is the process of creating new forms/pages. While Oracle does provide tools to do this (i.e., Oracle Forms and JDeveloper 10g with OA Extension), this is the least supported option.

Tuesday, 27 September 2011

Setting Up Your First Ext GWT Project in Eclipse


Setting Up Your First Ext GWT Project in Eclipse by Brendan CoughranFor those of you just entering the Ext GWT world, this is a quick guide for setting up your first project in Eclipse.

Prerequisites

It is assumed you already have a working Eclipse install with a recent JDK on your computer. This guide was made using Eclipse 3.6 and JDK 6.

GWT

Follow the GWT setup: http://code.google.com/eclipse/docs/getting_started.html

Ext GWT

Download the latest Ext GWT release (currently 2.2.0).http://www.sencha.com/products/gwt/download.php

Create User Defined Library

Select Windows > Preferences and select Java > Build Path > User Libraries in the preference tree. Click New and type "GXT" into the User library name field. Make sure your new library is selected and click Add JARs. Navigate to the root folder of the Ext GWT download and add the "gxt.jar" file. Click OK.

Create Project

20100920-gxt0Click the New Web Application Project button in Google toolbar to create a new GWT project. Alternatively, if you don't see the button in the toolbar, you can click File > New > Other and select Web Application Project under the Google folder and click Next. In the Project name field, write "HelloGXT". In the Package field, write "com.hello.gxt". Make sure under Google SDKs the "Use Google Web Toolkit" box is checked. Click Finish.

Build Path

In the Project Explorer, you will see a new folder with your project's name. Right click that folder and click Build Path > Configure Build Path. This takes you to the Properties of your project under the Java Build Path settings. Click Add Library and then select User Library and click Next. Make sure the check box for your Ext GWT library is checked and click Finish. Your Ext GWT library should now appear in your build path.
20100920-gxt1

Resources

Copy the resources folder from the Ext GWT download into your war folder.20100920-gxt2

HTML

Open HelloGXT.html in Eclipse and delete the table and h1 data in the body tag. Add the following lines to the head tag.
<link rel="stylesheet" type="text/css" href="resources/css/gxt-all.css" />
<script language='javascript' src='resources/flash/swfobject.js'></script>

XML

Open HelloGXt.gwt.xml in Eclipse. Add the following line under the Other module inherits line.
<inherits name="com.extjs.gxt.ui.GXT" />

Hello World

To test that you have properly setup Ext GWT, try running this sample program. Replace the EntryPoint class in HelloGXT.java with the sample below.
public class HelloGXT implements EntryPoint{
	@Override
	public void onModuleLoad() {
		MessageBox.info("Message", "Hello World!!", null);
	}
}
Run your program like any GWT project (seehttp://code.google.com/eclipse/docs/getting_started.html). If you setup Ext GWT correctly, you should see a message box with the words Hello World!! Congratulations! You have created your first Ext GWT project.20100920-gxt3


Saturday, 24 September 2011

Loading data from external files (like .xls) to your Staging table.

Loading data from external files (like .xls) into Staging table.

In the following example we will use Excel file as our data source and insert it's data into
Staging table using Oracle Apps environment.



















Lets start the process step by step,

1.You need a Excel file containing your source data.
    For example we have two excel files
    a. INVOICE_HEADERS.xls

 b. INVOICE_LINES.xls 

2. What we need is .csv file (comma separated value file) from this .xls file
     So "Save As" the Excel file by selecting Other Formats option and choose the
     Save As type : CSV (Comma delimited).
       Now you are having two .csv files one each for .xls(excel files)
       For example  a: MAD_INVOICE_HEADERS.csv
                            b: MAD_INVOICE_LINES.csv

3. We need two tables (Staging tables) to store and hold the data in database
    Following Query will create the table



So now we have two Staging tables ready in database to get filled with data.

 For example  a: XXMAD_AP_INVOICES_INTERFACE
                      b: XXMAD_AP_INVOICE_LINES_INTF


4. Create a (.ctl) control file which plays an important role to insert / append or do any
    operation on the staging table by using the data which was in .xls file and now which is
    converted  in .csv files.

    Steps to create control file (.ctl)
    a. Open a notepad and write the ctl code in it,
       For eg.   

After writing the code in notepad Save it with   .ctl  extension
 For example  a: MAD_INVOICE_HEADERS.ctl
                      b: MAD_INVOICE_LINES.ctl

5. Now we need to move our .csv and .ctl files to middle tier (Application tire)
    use WinSCP to move files.
    In our case we have 4 files needs to be moved under the the
    CUSTOM_TOP -> Bin folder


6. Concurrent Program needs to be created in Oracle Apps
     Steps,
     a: Create an Executable (System Administrator-> Concurrent-> Program->Executable)
        Note: Execution Method should be SQL*Loader and  Execution File Name must
        be the name of control file (.ctl) don't give any extension to it.


    b: Define a Concurrent program
    Note: Keep the Short Name of Executable (in above step) and Short Name of this
    Concurrent Program same

  c: Now add this Concurrent Program to Request Group of your Responsibility.
 
   d: Now Submit Request through your Responsibility
       (View->Requests->Submit a New Request)
       Write your Concurrent Program name and click submit button


7. Check your Staging tables data is inserted in those tables.


Thus by following these easy steps one can transfer data from external files into Staging tables.





Thanks,
Sudhir Bhilar