Wednesday, April 8, 2009

How to load data in PeopleSoft using "Excel to CI"


Load data in PeopleSoft using "Excel to CI".



This is a ten step process.
1. Create a Component Interface ( CI) using Application Designer.
2. Give yourself secuity to that component using PeopleSoft Security tool.
3. Make sure you have access to "WEBLIB_SOAPTOCI" permissions.
4. Open Excel to CI template and create a template.
5. Make changes to template.
6. Create "New Data Input" format
7. Key In the data in "Data Input" worksheet.
8. Click "Stage Data for submission".
9. Review and Submit the data.
10. Validate results and / or corret data and resubmit again.


Thursday, April 2, 2009

Step by step instructions - Run your First Java program using Eclipse

This is to continue with the assumption that you have already read -
A Total Beginners guide to setting up Selenium (Make sure you have all the installation about Selenium, Java - Please refer to other links on this blog).

The first step is to get Eclipse.

Eclipse is a software platform comprising extensible application frameworks, tools and a runtime library for software development and management. It is written primarily in Java to provide software developers and administrators an integrated development environment (IDE).
–source: http://en.wikipedia.org/wiki/Eclipse_(software)

In other words Eclipse is a software that allows you to write and execute programs in many different languages. In our case we will be using Eclipse to write and execute Selenium via Java.

Best of all Eclipse is a free software! (~Thank you Open Source)

Let us begin…

Getting Eclipse:
Go to http://www.eclipse.org/downloads/
1. You will want to get Eclipse Classic 3.4
2.Click on “Windows” link to the right.
3.Now to download it, Click on the link that appears to the right of “Download from:”
4.Save the file.

After it has finished downloading, you need to extract the files to your C: driver directory.
In windows you would take the following steps:

1. Right Click on the zip file you just downloaded
2. Click on Extract All...
3. Click Next
4. Click on Browser…
5. Click on My Computer
6. Click on Local Disk (C:)
7. Click on OK
8. Click on Next
9. Click on Finish

At this point Eclipse is installed and ready to be used

Note: Keep in mind Eclipse is an “Executable” program; there is no installation need other than extracting the files on to your hard drive.

Now let us start up Eclipse…
1.Go to your C: driver and open up your Eclipse folder.
2.Double Click on Eclipse to run the program.
3.A Settings Window will open up letting you know that Eclipse saves your projects into a folder called “workspace.”

If you wish to change the location of this folder from it’s default location, Click on Browser… and choose your desired location.

If you do not wish to be informed about this again, Check the Box next to “Use this as the default and do not ask me again.”

Click on OK to continue.
Once Eclipse has loaded you will have the option to get an overview of the application, find out what is knew, review come sample codes, go through some tutorials, or go to your workbench. In our case, we want to go to the workbench, so click on the icon with the title “Workbench.”

This will bring you to the environment that you will be working in:

Our first step will be to create a Project*.

1. Go to File
2. Click on New
3. Click on Project…At this point a new window has opened, here you will tell Eclipse what type of Project you want to create.
4. Click on Java
5.Click on Java Project

6. Click Next
7. On the top next to Project name: give your project the name “First”
8. Click FinishNow you should be back at your work bench with your project’s folder visible to the left.

The next step in the process is to import two Selenium Libraries, without them, you would not be able to run Selenium.

1. Right Click on the “First” folder
2. Click on Properties
3. Click on Java Build Path
4. Click on the Libraries tab
5. Click on Add External JARs…
6. Find and select selenium-server.jar then Click Open (i.e. C:\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar)
7. Click on Add External JARs… again
8. Find and select selenium-java-client-driver.jar then Click Open (i.e. C:\selenium-remote-control-0.9.2\selenium-java-client-driver-0.9.2\ selenium-java-client-driver.jar)
9.You should now see the two new JARs added to your Libraries list
10. Click OK

You have finished setting up your project to run selenium, now we create a class and write a simple Selenium program.

1. Right Click on First Folder
2. Click on New
3. Click on Class

At this point a new Window will open up

1. In the Name field give it the name MySelenium
2. Click Ok
A new sub folder was created called “src” (short for source), and in this subfolder your class file was created called “MySelenium.java”

Further more your class file is opened up in eclipse and ready to be populated by code.

Lets try to run a simple Selenium program that opens of a browser and goes to the Google website.Copy and past this code into your class file:

import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.DefaultSelenium;

public class MySelenium {

static Selenium browser;

public static void main(String arg[])
{
browser = new DefaultSelenium("localhost",
4444, "*iexplore", "http://www.google.com");

browser.start();

browser.open("http://www.google.com");

}
}

Save the file, and now before we run the program we need to start the Selenium Server.

1. Click on Start (Windows Start menu)
2. Click RunType cmd
3. This will open up the command window
4. Type in java –jar -multiWindow
(i.e. java -jar C:\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar
-multiWindow)
5. The Selenium Server should be running now:

Now that Selenium Server is running in the background lets go back to Eclipse and run our program.

1. Click on Run
2. Click on Run As
3. Click on 2 Java Application

And you are DONE! Congratulations you have written your first Java-Selenium program using Eclipse.

Wednesday, April 1, 2009

A Total Beginners guide to setting up Selenium

This posting assumes that you have already installed Java Runtime Environment (JRE).
To check that you do follow these instructions:

• Click on Start
• Click on Run…
• Type in cmd and click Ok
• Type in java –version and push Enter If you have JRE installed it will echo back a versionIf you do not have JRE it will receive an error message

Go to
http://www.java.com/en/download/manual.jsp to download the installation file.

Install jdk 1.6 for windows from site -
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewFilteredProducts-SingleVariationTypeFilter

Installation:
Your first step will to be to get Selenium:
Go to
http://selenium-rc.openqa.org/download.html and download the zip file.
After it has finished downloading, you need to extract the files to your C: driver directory.

In windows you would take the following steps:
1. Right Click on the zip file you just downloaded
2. Click on Extract All...
3. Click Next
4. Click on Browser…
5. Click on My Computer
6. Click on Local Disk (C:)
7. Click on OK
8. Click on Next
9. Click on Finish
At this point your Selenium files are where they need to be and ready to be used.


Now that you have installed the Selenium files, you need to let windows know where to look if you run a selenium command. You do this by adding the Selenium directory to your environment path:

To add Selenium to your Windows environment take the following steps:
1. Click on Start

2. Right Click on My Computer
3. Click on Properties
4. Click on the Advanced tab.
5. Click on Environment Variables
6. On the upper half there should be a Variable named PATH
a. If you located it, double click on it, and add this value at the end of what is already in “Variable value”:
;C:\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar

Make sure you replace -0.9.2 with the version you downloaded
b. If you do not located it, do this:
i. Click on New
ii. For Variable name: enter: PATH
iii. For Variable value: enter:
C:\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar
(Make sure you replace -0.9.2 with the version you downloaded)
iv. Click on OK
7. Click on OK

8. Click on OK

Now you have finished setting up the environment, the next step is to run a few selenium commands.

Ok now we are going to run some basic selenium commands from the command line.

To start off lets first open the command line window:
1. Click on Start

2. Click on Run…

3. Type in cmd
Now that the command line window is open lets try some basic Selenium commands as mentioned on the Selenium tutorial page (http://wiki.openqa.org/display/SRC/Selenium+RC+FAQ)

• First we need to start up Selenium, we do this by typing in the following:
java -jar c:\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar -interactive
(Once again make sure you replace 0.9.2 with the version number you are using)

• Now that Selenium is up and running we can run some Selenium commands.
To open up Internet Explorer and go to Google, you need to first create a Browser session. A Browser session is what selenium will use to target the browser and execute its commands.
To create a Browser Session type in the following command and push Enter
cmd=getNewBrowserSession&1=*iexplore&2=http://www.google.com

• After you execute this command, wait a few second to allow Selenium to run its course. By the time it has finished executing, a new browser should have opened up.
Now going back to the command line, you should see the following statement as the last line printed out:
Got result: OK,278394 on session 278394
Remember that you will not have the same session number as the one shown above. As long as it has the same format:

Got results: OK, on session
You are fine.

If you don’t get this message, make sure you typed in the command correctly, and if you are still having trouble, visit the Selenium website for help with troubleshooting.
Now that you have your session and browser up and running, it is time to go visit the Google website. To do this type in the following command with your session number;
cmd=open&1=http://www.google.com/webhp&sessionId=
EXAMPLE:
cmd=open&1=http://www.google.com/webhp&sessionId=278394
cmd=open&1=http://www.google.com/webhp&sessionId=181cf02b49344feebc24ad2f61af626d

If you check your browser now, you will see that it is pointing to google.com.
CONGRAGULATION! You have now finished setting up Selenium and executed a few simple commands.

Good luck and have fun learning to use Selenium!

Few simple steps to set up Junit & Eclipse & Selenium

Hello everyone - I recently started learning Selenium IDE & Selenium RC & JUNIT. I read the materials available on the Selenium RC website.(www.openqa.org)

This material assumes that you are familiar with Java and JUnit concepts. Therefore, it is difficult to setup a working Selenium RC with Java for people having worked on Test Automation with limited knowledge of Java and JUnit.

Following are the 15 easy step by step instructions to setup Selenium RC with JUnit for test execution.

1. Download Selenium RC from www.openqa.org

2. Extract the files to the following location C:\selenium-rc

3. Download JUnit 4.4 from www.junit.org.

4. Extract the files to the following location C:\junit4.4

5. Download and Install JDK 1.6 or above to the following location C:\jdk1.6

6.One thing to note if you are using eclipse to run the JUNIT make sure you have it installed to your root directory. ( Please check my othe archive where I explain how to work on ecplise)

7. Create a new folder C:\selenium_tests (This would be the location where you will save the test classes).

8. Set an environment variable CLASSPATH as C:\selenium-rc\selenium-java-client-driver-1.0-beta-1\selenium-java-client-driver.jar;C:\selenium_tests\;C:\junit4.4\junit-4.4.jar;

9. Make sure that C:\jdk1.6\bin is included in your PATH environment variable.

10. Download the GoogleTest.java from the Java Tutorials available for Selenium RC at www.openqa.org. Save this file under selenium_tests directory you made eariler.

11. Open a Command Prompt and go to the following location. C:\selenium-rc\selenium-server-1.0-beta-1

12. Type the following command to start the selenium RC server for test execution.
>java -jar selenium-server.jar -interactive

13. Open another command prompt window and go the location where you saved GoogleTest.java file. i.e. C:\selenium_tests

14. Compile the java file with javac as
>javac GoogleTest.java


15. This would create a class file that you can run with JUnit for testing purposes as
>java junit.textui.TestRunner GoogleTest

You will notice that it would open a firefox session with Selenium Test Runner and execute the tests. In the end you will get the status of the test result on the command prompt as
C:\Selenium>java junit.textui.TestRunner GoogleTest.Time: 5.769
OK (1 test)

This shows that you have successfully run GoogleTest.java as a Selenium RC test using JUnit.
You can experiment editing GoogleTest.java and see the changes in the output.
I would also recommend using Selenium IDE for recording a new test, saving it as Selenium RC Java test and then executing it using Selenium RC and JUnit.

I hope this helps news users like me to better setup and understand Selenium RC.
I am also working on defining a Test Automation Framework that involves Selenium RC, Selenium IDE, Firebug, XML and TestNG.
I would keep posting my findings and step by step instructions on this blog. Keep Reading!!!

Tuesday, March 31, 2009

PeopleSoft Self Service Overview

Working With Self-Service Transactions in PeopleSoft


This blog provides an overview of self-service transactions and describes how to:

· Configure self-service transactions.

· Set up direct report access for managers.

· Use workflow with self-service transactions.

Understanding Self-Service Transactions


Self-service transactions are designed to be extensions of a core PeopleSoft product. They enable employees to update their personal information or to perform some basic task required by their job.

When the self-service transactions were designed there were two things to consider when an employee entered new data:

· Do you want that new information to update the HR database or do you want a system administrator to update the database?

· Do you want the transaction to go through an approval process? This means that once the new information is submitted, a notification is sent to someone who has to look at this information and approve it before the database can be updated.

Configuring Self-Service Transactions

This section discusses setting rules for self-service transactions and how to:

· Set up approvals and database updates.

· Set up administrator notification rules.

· Set up component interface rules.

· Review transaction activity.

Understanding Rules for Self-Service Transactions

You can set rules that define whether the transaction:

· Goes through an approval process.

· Updates the database or sends a notice to the administrator to complete the transaction manually.

· Who to notify when problems occur during the processing of the transaction or when a transaction successfully completes.

Which Transactions Can Be Configured

The following self-service transactions were designed so users could define how processing for each self-service transaction would behave:

· Performance Document

· Address Change

· Change Full/Part Time Status

· Change Location

· Marital Status

· Name Change

· Promotion

· Reporting Change

· Retire Employee

· Salary Change

· Terminate Employee

· Training Enrollment

· Training Enrollment by Manager

· Transfer

Overview of the Self-Service Processing

The following diagram maps out the process a self-service transaction takes when the transactions is set up to follow the configuration rules.







VI Editor Commands

General Startup
To use vi: vi filename
To exit vi and save changes: ZZ or :wq
To exit vi without saving changes: :q!
To enter vi command mode: [esc]


Counts
A number preceding any vi command tells vi to repeat
that command that many times.



Cursor Movement

h move left (backspace)

j move down

k move up

l move right (spacebar)

[return] move to the beginning of the next line

$ last column on the current line

0 move cursor to the first column on the
current line

^ move cursor to first nonblank column on the
current line

w move to the beginning of the next word or
punctuation mark

W move past the next space

b move to the beginning of the previous word
or punctuation mark

B move to the beginning of the previous word,
ignores punctuation

e end of next word or punctuation mark

E end of next word, ignoring punctuation

H move cursor to the top of the screen

M move cursor to the middle of the screen

L move cursor to the bottom of the screen



Screen Movement

G move to the last line in the file

xG move to line x

z+ move current line to top of screen

z move current line to the middle of screen

z- move current line to the bottom of screen

^F move forward one screen

^B move backward one line

^D move forward one half screen

^U move backward one half screen

^R redraw screen
( does not work with VT100 type terminals )

^L redraw screen
( does not work with Televideo terminals )



Inserting

r replace character under cursor with next
character typed

R keep replacing character until [esc] is hit

i insert before cursor

a append after cursor

A append at end of line

O open line above cursor and enter append mode



Deleting

x delete character under cursor

dd delete line under cursor

dw delete word under cursor

db delete word before cursor



Copying Code

yy (yank)'copies' line which may then be put by
the p(put) command. Precede with a count for
multiple lines.



Put Command
brings back previous deletion or yank of lines,
words, or characters

P bring back before cursor

p bring back after cursor


Find Commands

? finds a word going backwards

/ finds a word going forwards

f finds a character on the line under the
cursor going forward

F finds a character on the line under the
cursor going backwards

t find a character on the current line going
forward and stop one character before it

T find a character on the current line going
backward and stop one character before it

; repeat last f, F, t, T



Miscellaneous Commands

. repeat last command

u undoes last command issued

U undoes all commands on one line

xp deletes first character and inserts after
second (swap)

J join current line with the next line

^G display current line number

% if at one parenthesis, will jump to its mate

mx mark current line with character x

'x find line marked with character x

NOTE: Marks are internal and not written to the file.



Line Editor Mode
Any commands form the line editor ex can be issued
upon entering line mode.

To enter: type ':'

To exit: press[return] or [esc]



ex Commands
For a complete list consult the
UNIX Programmer's Manual



READING FILES
copies (reads) filename after cursor in file
currently editing

:r filename



WRITE FILE

:w saves the current file without quitting



MOVING

:# move to line #

:$ move to last line of file



SHELL ESCAPE
executes 'cmd' as a shell command.

:!'cmd'

Monday, March 30, 2009

Useful PeopleSoft Links

******* Some useful PeopleSoft Links ************

http://www.techonthenet.com/

http://peoplesofttipster.com/applications/

http://www.oracle.com/applications/peoplesoft-enterprise.html

https://metalink3.oracle.com/od/faces/index.jspx

http://www.oracle.com/index.html

Friday, March 27, 2009

PeopleSoft Interview Questions

Development

App Designer: What are the steps to create a component.

App Designer: You just completed development of an inquiry page. What do you need to do to make it available through the web?

PeopleCode: On a Purchase Order entry page, you’ve been asked to make sure the purchasing business unit is the same as the GL business unit. Where would you put the PeopleCode to do this validation? Why?

Application Engine: An application engine program errors out with a Unique Constraint error. What process would you go through to troubleshoot it?

After moving a new custom report into production, the DBA calls and says that the new SQL is running very long. What would you do to troubleshoot the problem and tune the SQL?

Security

A user can’t view a public query. What might be the reason? How would you approach making it available for the user?

Workflow

Describe the basic components of PeopleSoft’s workflow

Integration Tools

How many ways can you think of to import a flat file into PeopleSoft?

Reports are posting in Process Monitor, but aren’t showing up in report manager. What tool would you use to see if the REPORT_CREATE message had errored out?

PERSON_BASIC_SYNC is a message sends changes of employee Personal Data from HR to other PeopleSoft systems. Describe some of the steps required to activate it so that
Personal Data changes are replicated to the Financials application.

Application Architecture

Describe at a high level the different tier’s of the PeopleSoft’s Internet Architecture.
Maintenance and Upgrades

PeopleSoft just released bundle #6 for PeopleSoft financials 8.9. How and where would you apply it? How would you know if it updated a customized object?


Functional

What module are you most familiar with?

What are the top transaction tables in that module?

What other modules does that module integrate with?




Also Found on the web .. Other interview questions.

www.erpgenie.com/peoplesoft/interviewquestions.htm

Thursday, March 26, 2009

NPI check digit validation - PeopleCode Sample

/* NPI check digit Validation PeopleCode
:::::::::::::::: How to do NPI validation ::::::::::::::::::

Assume the 9-position identifier part of the NPI is 123456789.
Using the Luhn formula on the identifier portion, the check digit is calculated as follows:
NPI without check digit: 1 2 3 4 5 6 7 8 9

Step 1: Double the value of alternate digits, beginning with the rightmost digit.
2 6 10 14 18

Step 2: Add constant 24, to account for the 80840 prefix that would be present on a card issuer identifier, plus the individual digits of products of doubling, plus unaffected digits.
24 + 2 + 2 + 6 + 4 + 1 + 0 + 6 + 1 + 4 + 8 + 1 + 8 = 67

Step 3: Subtract from next higher number ending in zero.
70 – 67 = 3

Check digit = 3

NPI with check digit = 1234567893

**********************************************************************/


If %Component = Component.LICENSES_CERTIF Then
If All(LIC_CERT_NBR) And
ACCOMPLISHMENT = "US-NPI" Then

For &I = 1 To Len(RTrim(LIC_CERT_NBR))
&CHAR = Substring(LIC_CERT_NBR, &I, 1);
&ASCII = Code(Substring(LIC_CERT_NBR, &I, 1));
If (&ASCII > 57 or &ASCII <> 10 Then
Error MsgGet(22000, 3, "NPI number should contain 10 digit numeric data only");
End-If;

/* We should always see 10 digit NPI code in Application */
&I = 10;
/* mysum initialized to 24 since it accounts for the first 5 digits 80840 prefix */
&mysum = 24;
&r = 0;
&bflag = 1;


While &I > 0
If &bflag = 0 Then
&r = Value(Substring(LIC_CERT_NBR, &I, 1)) * 2;

If &r > 9 Then
&r = &r - 9;
End-If;
&mysum = &mysum + &r;
&bflag = 1;
Else
&mysum = &mysum + Value(Substring(LIC_CERT_NBR, &I, 1));
&bflag = 0;
End-If;

&I = &I - 1;
/* WinMessage("Mysum is" &mysum) */
End-While;
If ((Mod(&mysum, 10) = 0) And
&mysum <> 0) Then
&a = "Good NPI code"
Else
Error MsgGet(22000, 4, "The NPI number entered is invalid. Please verify.");

End-If;

End-If;
End-If;

Wednesday, March 25, 2009

Converting military time to AM PM format

Below is the code for changing time format from military format to AM PM format. Lot of databases keep the time in HH24:MI format e.g. 14:20 .. but the users may want it to display in user friendly format like 2:20 PM.. so here goes the code to re-format.

If RTrim ($MILITARY_TIME, $Space) <> $Null

Let $HH_TIME = SubStr ($MILITARY_TIME, 1, 2)
Let $MI_TIME = SubStr ($MILITARY_TIME, 4, 2)

Let #HH_TIME = To_Number ($HH_TIME)

If #HH_TIME <>
let $AMPM= ' AM'
else
let $AMPM= ' PM'
End-If

If #HH_TIME = 0
let #HH_TIME = 12
End-If

If #HH_TIME > 12
let #HH_TIME = #HH_TIME - 12
End-If

Let $HH_TIME = To_Char (#HH_TIME)

Let $AM_PM_TIME = $HH_TIME ':' $MI_TIME $AMPM

End-If