Wednesday, 22 June 2016

Problem in reading Numeric value as String from Excel file using Selenium Web-Driver Using Java

1. First Get value from excel.

  sheet1.getRow(12).getCell(1).getNumericCellValue();

2. Type Cast with int type

  int SrNumber = (int)sheet1.getRow(12).getCell(1).getNumericCellValue();

3. Concatenate SrNumber with the null value and store value into a String variable.

   String SrNum ="" + SrNumber;

4. Print the String Value

  System.out.println(SrNum);
  
  

How to get Current LOV value in Selenium Web-Driver Using Java


Problem: In this Example, I want to get the current Status value as output i.e Open.

Code:  WebElement element1=Driver.findElement(By.id("HIssueStatus"));
                Select se=new Select(element1);
WebElement firstOption = se.getFirstSelectedOption();

                System.out.println("The First selected option is::" +firstOption.getText());

Query to Find out the Current Running Concurrent Program Tracing Details

Query:

SELECT SQLT.hash_value
,      SQLT.sql_text
,      VSES.username
,      VSES.module
,      VSES.command
  FROM v$sqltext SQLT
,      v$session VSES
,      APPS.fnd_concurrent_requests FCONC
 WHERE SQLT.hash_value = VSES.sql_hash_value
   AND FCONC.oracle_session_id = VSES.audsid
   AND FCONC.request_id = 24105126
  ORDER BY SQLT.piece;

Friday, 15 April 2016

Steps to migrate personalization from one instance to another instance

Events in Source instance.

1.       Go to System Administrator set FND: Personalization Document Root Path appropriately before exporting personalization.
2.       Here already  we have set root profile to  \user\tmp



Identify the document path

From Back end:

set serveroutput on;

begin
jdr_utils.printdocuments('/oracle/apps/per/selfservice/personalinformation/webui/MainAddrPG');
end;

From Front End:

Go to Functional Administrator Click on Personalization tab.
Under Import/Export click on Personalization Repository.
Give Document Root Path as “/oracle/apps/per/selfservice/personalinformation/webui” and press
GO Page will Display all the Personalization.



Select which one you wish to Export. (You can migrate more than one at a time also, at that time select all).
Click the Export to File System button.


Click OK button.

Go to the path in FND: Personalization Document Root Path (\user\tmp) 
and run below command 

Syntax: tar -cvf <FILENAME.tar>

Ex: tar -cvf  xxmandatoryPer.tar ./*

Transfer the xxmandatoryPer.tar to destination in Binary mode

Note: Before import the file, first we have to check the .xml file whether the personalization is effected in .xml file or not

Events in Destination instance.

Set profile option FND: Personalization Document Root Path appropriately before importing
Personalization
Set same as 1st step (\user\tmp).
Copy .tar file to middle tier directory pointed by FND: Personalization Document Root Path (\user\tmp)
Run tar –xvf xxTypemandatoryPer.tar in the location (\user\tmp)
Go to Functional Administrator Click on Personalization tab.
Under Import/Export Click on Exported Personalization.
Select the all file structure
Click on Import from File System

After successfully importing bounce Apache server.




Second Method:

set serveroutput on;
/
begin
jdr_utils.listCustomizations('/oracle/apps/per/selfservice/personalinformation/webui/MainAddrPG');
end;

/oracle/apps/per/selfservice/personalinformation/webui/customizations/site/0/MainAddrPG


Export Script.

Syntax:
java oracle.jrad.tools.xml.exporter.XMLExporter <personalization document from step #2>  \
-username "<username>" -password "<password>"  \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port)))(connect_data=(sid=<sid>)))" \
-rootdir "<output directory>"

Example:
java oracle.jrad.tools.xml.exporter.XMLExporter /oracle/apps/per/selfservice/personalinformation/webui/customizations/site/0/MainAddrPG.xml  \
-username "apps" -password "apps"  \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=localhost)(port=1521)))(connect_data=(sid=xxsid)))" \
-rootdir "/usr/tmp"

Importer Script:

Syntax:
java oracle.jrad.tools.xml.importer.XMLImporter \
<full path of the file you want to import> \
-username "<username>" -password "<password>"  \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<port>)))(connect_data=(sid=<sid>)))" -rootdir "<top level directory>" \
-rootPackage "/oracle/apps/<prod>"

java oracle.jrad.tools.xml.importer.XMLImporter \
/oracle/apps/per/selfservice/personalinformation/webui/customizations/site/0/MainAddrPG.xml \
-username apps -password apps \
-dbconnection "(description=(address_list=(address=(protocol=tcp)(host= localhost)(port=1521)))(connect_data=(sid=xxsid)))" -rootdir "/usr/tmp" \
-rootPackage "/oracle/apps/per/selfservice/personalinformation"

Note: After running the importer script. bounce the Apache server


How to Enable Personalization at Site level for Seeded OAF Page


Hi,
My requirement is to make a field mandatory at the site level, but in my instance, the personalization page not allowing us to do personalization at the site level (site level is disabled i.e. non-editable). This was resolved by setting the profile option 
FND: Personalization Seeding Mode = 'Yes'.


GOAL

On: 12.1.3 version, Customers Module

Personalization is not editable at the Site level for Seeded OAF page.

You have a requirement to extend a Controller and add its name to the corresponding OAF page through Personalization.

Your navigation is like below:
Functional Administrator > Personalization > Document path=/oracle/apps/ar/cusstd/acctoview/webui/AcctOviewPG > Personalize Page
Select Organization and Responsibility
Apply
Click on the Page Layout level Personalize link.

You want to replace the Controller Class name with the Extended custom Controller class through Personalization at the Site level, but the site level is not editable here.
It shows only Inherit in view only mode, even though the Organization and Responsibility level are open.

All the necessary Profile Options set up are done properly.
For Example:
1) FND: Personalization Region Link Enabled = 'Yes' at User level
2) Personalize Self-Service Defn = 'Yes' at User level
3) Disable Self-Service Personal = 'No' at site level

SOLUTION

This was resolved for this specific customer, by setting the Profile Option FND: Personalization Seeding Mode = 'Yes' 




SCript to Migrate OAF Personalizations To Other Instances

Download OAF form personalization java oracle.jrad.tools.xml.exporter.XMLExporter \/oracle/apps/ar/hz/components/account/site/webui/cust...