Tuesday, May 15, 2007

SAP HR Interview Questions

Here is the SAP interview Questions as I got it a very difficulty to just set up some qoestion pattrens. Well, i m posting this questions to the SAp professionals for their interview in respectives company.


1) What is internal recruitment ?

Internal recruitment is search for internal applicants. when you integrate
with personal development, you can use profile match up which help to search
for resources internally.

Also  In recruitment it is represented by 'P' as Person and 'AP"
as external person.

2) What are problems generally faced while posting result to FICO
?

Normally mismatching of amount get posted.

3) What is controlling area, what does it do, and how were is it
assigned ?

Controlling area is under of FI person which helps to set for costing
purposes also based on thses fiscal variant is set.

4) What is the purpose of creating symbolic a/c, what is transaction
code for same ? Can we assign one symbolic a/c to multiple wage types ?

It depends upon your payrol requirement to create salary head like expense
account etc.

5) What is REPORT VARIANT FOR OFF CYCLE ACTIVITIES, what do we do
in this step ?

Variant is to save all input field parameters.  once you saved
as a variant , you can use the same for future purposes.

6) What all infotypes which has to be created at the time of hiring
OR PA40 and cannot be maintained later with PA30 ?

Why you require creation of infotypes... 

7) If we have to create multiple positions, what method OR tool we
can use to avoid errors due to creating them manually.

You can create muliple position by LSMW or batch programs for the Tcode
PP01 or PPOCE

8) What do is LANDSCAPE in SAP Project, I think its related to no.
of servers used, Pls correct me if I am wrong, Or what it is ?

It is related to Basis

9) What is the role of a administrator in PA ?

To restrict access to Personnel administration based on PA/PSA.

Administrator: we come across for Personnel admininstration,
Time management, and Payroll in sap .

Each admiinistrator is reponsible for each individual
activity.  You can get the name of the administrator in the pay slip
so the employee for any clarification he can meet the responsible administrator 
(accessed through payslip)

This administrtor (is created in PA of PM) is
responsible for recruitment.  *-- HR Tips by : Somasekhar

10) What is golive actually ? What is the role of a functional consultant
in it ?

Go live is transfering of data from Development server to Production
server.

  Development ----->  Quality server 

In Qulaity you need to Unit, Integration testing, Once it is OK in Qulaity
server,

  Then you need 

  Development ----> Production

Sunday, May 13, 2007

Loops in JavaScript

So what's a loop then? A loop is something that goes round and round. If I told you to move a finger around in a loop, you'd have no problem with the order (unless you have no fingers!) In programming, it's exactly the same. Except a programming loop will go round and round until you tell it to stop. You also need to tell the programme two other things - where to start your loop, and what to do after it's finished one lap (known as the update expression).

There are three types of loops in JavaScript: for loops, while loops, and do … while loops. We'll start with the most common type - the for loop.



For Loops
Here's a JavaScript for loop in a little script. Type, or copy and paste, it into the HEAD section of web page (along with the script tags) and test it out.

counter = 0

for(start = 1; start < 10; start++) {
counter = counter + 1
document.write("start = " + start + " counter = " + counter + "
")

}

How did you get on? You should have this printed on your page:

start = 1 counter = 1
start = 2 counter = 2
start = 3 counter = 3
start = 4 counter = 4
start = 5 counter = 5
start = 6 counter = 6
start = 7 counter = 7
start = 8 counter = 8
start = 9 counter = 9
start = 10 counter = 10

The format for a for loop is this:

for (start value; end value; update expression) {

}

The first thing you need to do is type the name of the loop you're using, in this case for (in lower case letters). In between round brackets, you then type your three conditions:

Start Value
The first condition is where you tell JavaScript the initial value of your loop. In other words, start the loop at what number? We used this:

start = 1

We're assigning a value of 1 to a variable called start. Like all variables, you can make up your own name. A popular name for the initial variable is the letter i . You can set the initial condition before the loop begins. Like this:

start = 1
for(start; start < 11; start++) {

The result is the same - the start number for the loop is 1

End Value
Next, you have to tell JavaScript when to end your loop. This can be a number, a Boolean value, a string, etc. Here, we're telling JavaScript to bail out of the loop when the value of the variable start is Less Than 11.

Update Expression
Loops need a way of getting the next number in a series. If the loop couldn't update the starting value, it would be stuck on the starting value. If we didn't update our start value, our loop would get stuck on 1. In other words, you need to tell the loop how it is to go round and round. We used this:

start++

In the java programming language the double plus symbol (++) means increment (increase the value by one). It's just a short way of saying this:

start = start + 1

You can go down by one (decrement) by using the double minus symbol (--), but we won't go into that.

So our whole loop reads "Starting at a value of 1, keep going round and round until the start value is less than 11. Increase the starting value by one each time round the loop."

Every time the loop goes round, the code between our two curly brackets { } gets executed:

counter = counter + 1
document.write("start = " + start + " counter = " + counter + "
")

Notice that we're just incrementing the counter variable by 1 each time round the loop, exactly the same as what we're doing with the start variable. So we could have put this instead:

counter++

The effect would be the same. As an experiment, try setting the value of the counter to 11 outside the loop (it's currently counter = 0). Then inside the loop, use counter- - (the double minus sign).

JavaScript While and Do Loops




While Loops
Instead of using a for loop, you have the option to use a while loop. The structure of a while loop is more simple than a for loop, because you're only evaluating the one condition. The loop goes round and round while the condition is true. When the condition is false, the programme breaks out of the while loop. Here's the syntax for a while loop:

while (condition) {
statement
}

And here's some code to try. All it does is increment a variable called counter:

counter = 1
while (counter < 11) {
document.write(" counter = " + counter + "
")
counter++
}

The condition to test for is counter < 11. Each time round the while loop, that condition is checked. If counter is less than eleven then the condition is true. When counter is greater than eleven then the condition is false. A while loop will stop going round and round when a condition is false.

If you use a while loop, be careful that you don't create an infinite loop. You'd create one of these if you didn't provide a way for you condition to be evaluated as true. We can create an infinite loop with the while loop above. All we have to do is comment out the line where the counter variable is incremented. Like this:

counter = 1
while (counter < 11) {
document.write(" counter = " + counter + "
")
//counter++
}

Notice the two forward slashes before counter++. This line will now be ignored. Because the loop is going round and round while counter is less than 11, the loop will never end - counter will always be 1.

Here's the times table programme again, only now we've used a while loop instead of a for loop (the lines that write the result to the text area have been left out):

start = 1
end = 1
times = 2
answer = 0

while (end < 11) {
answer = start * times
start++
end++
}

The while loop calculates the 2 times tables, up to a ten times 2. Can you see what's going on? Make sure you understand the code. If not, it's a good idea to go back and read this section again. You won't be considered a failure. Honest.



Do ... While loops
This type is loop is almost identical to the while loop, except that the condition comes at the end:

do
statement
while (condition)

The difference is that your statement gets executed at least once. In a normal while loop, the condition could be met before your statement gets executed. Don't worry too much about do while loops.

Thursday, May 10, 2007

VBScript for beginners

Adding VBScript to Web Pages
I had included spaces in betwween tage s to not to been parsed so when making VBScreipt olease exclude the spaces.
Scripting languages, like JavaScript and VBScript, are designed as an extension to HTML. The web browser receives scripts along with the rest of the web document. It is the browser's responsibility to parse and process the scripts. HTML was extended to include a tag that is used to incorporate scripts into HTML-the < S C R I P T > tag.
The < S C R I P T > Tag
You add scripts into your web pages within a pair of < S C R I P T > tags. The < S C R I P T >tag signifies the start of the script section, while < / S C R I P T > marks the end. An example of this is shown below:

< HTML >

< HEAD >

< TITLE >Working With VBScript< /TITLE >

< SCRIPT LANGUAGE="VBScript" >

MsgBox "Welcome to my Web page!"

< /SCRIPT >

The beginning < SCRIPT > tag includes a LANGUAGE argument that indicates the scripting language that will be used. The LANGUAGE argument is required because there is more than one scripting language. Without the LANGUAGE argument, a web browser would not know if the text between the tags was JavaScript, VBScript or another scripting language.

While technically you can place scripts throughout an HTML document using pairs of < SCRIPT > tags, typically scripts are often found at either the top or bottom of a Web document. This provides for easy reference and maintenance.

Handling Non-Supporting Browsers
Not all browsers support scripting languages. Some only support JavaScript. Only Microsoft's Internet Explorer supports VBScript. You might be wondering what happens to your scripts when non-supporting browsers encounter them. Usually browsers will do what they do most frequently with text, they will display your scripts as part of the web page. Obviously, this isn't the result you had hoped for. One simple way to address this problem is to encase your scripts in comment tags (). Below is our example script as it appears with the addition of the comment tags:

< HTML >

< HEAD >

< TITLE >Working With VBScript< / TITLE >

< SCRIPT LANGUAGE="VBScript" >



< /SCRIPT >

< /HEAD >

< /HTML >

Now, when a browser that does not support VBScript processes this page, it will view your script as a comment and simply ignore it.

Monday, May 7, 2007

How To Create JavaScript Objects

Creating objects
The following function can be used as demonstrated to create an object of class myobject:

function myobject() {
this.containedValue = 0;
this.othercontainedValue = 0;
this.anothercontainedValue = 0;
}

var mything = new myobject();And there you go, mything is now an instance of class myobject. It will have the following properties, all of which will be 0:

mything.containedValue
mything.othercontainedValue
mything.anothercontainedValue
You could also now write myobject.prototype.newContainedValue = someValue; and all instances of class myobject will have the property newContainedValue with value someValue.

Creating an object with methods
Now I will give you an example showing you how to create methods for your objects. As an example, I will create a circle as my object. The methods will be

nameOfCircle.retArea()
Returns the area of the circle (pi r2)
nameOfCircle.retCirc()
Returns the circumference of the circle (2 pi r)
nameOfCircle.mvBy(xDis,yDis)
Moves the circle by xDis in the x direction and yDis in the y direction
The following lines point the methods to functions that the object will use as the methods:

this.retArea = getTheArea;
this.mvBy = mvCclBy;
this.retCirc = function () { ... };
The third of these defines the method using an anonymous function in one line, and does not work in some early Netscape 4 releases. Note, it has a semicolon after the '}', and is one of the few places where this is correct practice.

function mycircle(x,y,r) {
this.xcoord = x;
this.ycoord = y;
this.radius = r;
this.retArea = getTheArea;
//This next line uses an alternative syntax
this.retCirc = function () { return ( Math.PI * this.radius * 2 ); };
this.mvBy = mvCclBy;
}
function getTheArea() {
return ( Math.PI * this.radius * this.radius );
}
function mvCclBy(xDis,yDis) {
this.xcoord += xDis;
this.ycoord += yDis;
}

/*
create a mycircle called testcircle where testcircle.xcoord is 3
and testcircle.ycoord is 4 and testcircle.radius is 5
*/
var testcircle = new mycircle(3,4,5);
/*
use the mvBy method to displace the centre of testcircle.
move it by 2 in the x direction and 3 in the y direction
*/
testcircle.mvBy(2,3);
//testcircle.xcoord is now 5 and testcircle.ycoord is now 7

window.alert( 'The area of the circle is ' + testcircle.retArea() );
window.alert( 'The circumference is ' + testcircle.retCirc() );The special 'toString' method
All objects have the 'toString' method, even if you do not define it yourself. The method returns a string representation of the object, and is automatically called whenever a string representation of an object is required, such as when you use alert(myObject);

In most browsers, this returns '[object Object]', although some more useful browsers return a string like this:

'{property1:value1,property2:value2,method1:function () { ... },etc.}'However, for your own objects, you may wish to provide a special string that may provide more useful information. To do this, simply define the 'toString' method:

this.toString = function () {
return 'Circle object; xcoord: ' + this.xcoord + ', ycoord: ' +
this.ycoord + ', radius: ' + this.radius;
};Advanced object techniques
These deal with concepts that are rarely used in JavaScripting. JavaScript is a more powerful programming language than most people make use of, but that is because in normal scripting, these powerful features are not really necessary. If you are just learning, or if you are interested only in day-to-day scripting, I suggest you move on to the next chapter.

Some of these techniques may not work in older browsers like early Netscape 4 releases.

Adding extra properties/methods using prototype
Take the mycircle example from the top of this section (creating new objects). We have already created an instance of the mycircle class called 'testcircle'. And we can also assume that we have created a few other mycircles. Now, let us assume that we want to add another property to each circle. For example, we want each circle to have a 'texture' property. We could use this:

testcircle.texture = 'smooth';And we could do this for each individual mycircle. But since we want to do this for all of them, it would be much more easy to give all instances the property at the same time. So we can use the 'prototype' property of the class constructor:

mycircle.prototype.texture = 'smooth';Immediately, all of the mycircles that we have created will now inherit the new property:

alert(testcircle.texture);
//alerts 'smooth'We can add new methods the same way:

mycircle.prototype.setArea = function (oArea) {
this.radius = Math.sqrt( oArea / Math.PI );
};
mycircle.setArea(5);This is most useful with instrinsic (fundamental inbuilt) objects. For example, the regular expression construct /a[0-9]b/g is shorthand for new RegExp('a[0-9]b','g'); and in fact the same is true for all intrinsic object classes, such as String, Number and Boolean. So if, for example, we wanted to create a new method on all strings called 'reverse' that returned their contents in reverse order, we could do this:

String.prototype.reverse = function() {
for( var oStr = '', x = this.length - 1, oTmp; oTmp = this.charAt(x); x-- ) {
oStr += oTmp;
}
return oStr;
};The use of prototype could have been applied to create all of the methods of the mycircle object, not just new ones. This gives a mixed response to performance. It will not have to store individual copies of the methods for each instance of the object, so it may require less memory, but it will require the browser to search the current and parent scopes to find the methods. This may cause a marginal delay. Generally, you should use what is appropriate for your code, and not base this decision on performance (unless you are dealing with a very specific controlled environment):

function mycircle(x,y,r) {
this.xcoord = x;
this.ycoord = y;
this.radius = r;
}
mycircle.prototype.retArea = function () {
return ( Math.PI * this.radius * this.radius );
};
mycircle.prototype.retCirc = function () {
return ( Math.PI * this.radius * 2 );
};
mycircle.prototype.mvBy = function (xDis,yDis) {
this.xcoord += xDis;
this.ycoord += yDis;
};Public and private properties
This is a concept that is almost never used in JavaScript, and there is a good reason. It simply is not necessary. Even complicated scripts are almost never complex enough to require this level of control. However, many programmers familiar with other programming languages (such as Java or C++) often desire this behavior in JavaScript simply because it is a concept they are familiar with. This sort of concept is only really useful when putting together large projects from multiple pieces of code.

Say for example that I am producing a public functions library. A set of constructors and methods that people can include in their own projects (something that Java programmers use all of the time). Say for example that the mycircle constructor is included in it, so that you can create your own mycircles. Now say for example you try this:

var aCircle = new mycircle(5,6,'about 3mm');That will work now (it's not a valid measurement, but my constructor will not argue), but later on when you try to use the methods that my class provides, it will fail. So I can check what you have provided, and make sure it is a valid number, and use a default value if it is not. But then you can say something like this:

aCircle.radius = 'some text';Again, it would break (of course, it is your own fault, but in more complicated applications, it would be possible to make a mistake where this causes a real problem). So what I want to do is to not allow you to modify that property directly, and only allow you to change it using a method that I control:

this.setRadius = function (oRad) {
if( typeof(oRad) == 'number' && oRad >= 0 ) {
this.radius = oRad;
} else {
this.radius = 0;
}
};An alternative situation where this can be important is if I am storing the information in one set of properties. I then upgrade my libraries, maybe adding some extra functionality. But in order to do so, I have to change the properties that I am using. If your script was relying on them existing in a specific format, and I have now changed that format, your script would fail. If I could protect those properties, and force you to use only methods, then I could do whatever I needed with the properties, and as long as I then change the methods to use the new properties, your script would keep working, and you would not even need to know what I had changed or why. That way, we could each manage our own project, and not waste each other's time.

It would also help avoid possible conflicts between undisclosed properties, and your own scripting. For example, if you decide to temporarily assign a property to an object, but you were unaware that internally, my object constructor already used that property name, you would overwrite my object's property, and cause problems with the object.

This is what private properties are for. They do not allow scripts that use the contructor to use or modify the properties directly. They only allow the methods of the object itself to use and modify them. Unlike many other languages, JavaScript does not declare each variable type as 'public' or 'private'. It all depends on how you create them.

Saying 'this.propertyname' as I did above will create a public property. Any script can create an object then use and modify its properties directly. Using 'var' to define a variable in the constructor will create a private property. Note that unlike public properties, the private properties are then accessed, including from within methods, without the 'this.' prefix - just like a normal variable. This makes heavy use of JavaScript's scope functionality. Private variables can only be accessed from methods that are declared inline, and not externally referenced or created using the prototype construct. Methods of this kind are also known as privileged methods. An example of its use might be: this.mymethod = function () { alert( propertyname ); };

function myob() {
this.property1 = 'value1'; //this creates a public property
var property2 = 'value2'; //this creates a private property
this.method1 = function () { alert( property2 ); };
}
var oneOb = new myob();
alert(oneOb.property1); //alerts 'value1'
alert(oneOb.property2); //alerts undefined (private property)
oneOb.method1(); //alerts 'value2'Similarly, you can also create private methods. These are simply a function that you create inside the constructor function. This may look confusing, but it works. The private function can only be called by the constructor itself, or by methods that are defined inline. Private methods can be used as public methods, if they are assigned to a public method constructor, and accessed using the public method constructor (as with 'method2' below).

function myob() {
function cantBeSeen() {
alert(secretValue);
}
var secretValue = '';
this.method1 = function () {
secretValue = 'no surprises';
cantBeSeen();
};
this.method2 = cantBeSeen;
}
var oneOb = new myob();
oneOb.method1(); //alerts 'no surprises'
oneOb.method2(); //alerts 'no surprises'For more information on private, public and privileged properties and methods in JavaScript, see Douglas Crockford's 'Private Members in JavaScript' page.

Sunday, May 6, 2007

VB.NET Program

Open Visual Studio .NET and create a new Windows Application Project. Call it WatchFolder and click OK:




Create a user interface as shown in the image below:




Add the following controls to our form:
txt_watchpath: TextBox (for folder path)
btn_startwatch: Button (start watching)
btn_stop: Button (stop watching)
txt_folderactivity: Textbox (folder activity)
Lets start coding for this application. The first thing we need to do is to import the required classes. Type the following code before your class declaration:

Imports System.IO
Imports System.Diagnostics

This code will import the necessary class required for our application. We also need to declare a public variable for our FileSystemWatcher class:

Public watchfolder As FileSystemWatcher

Add the following code to the btn_start_click procedure:

watchfolder = New System.IO.FileSystemWatcher()

'this is the path we want to monitor
watchfolder.Path = txt_watchpath.Text

'Add a list of Filter we want to specify
'make sure you use OR for each Filter as we need to
'all of those

watchfolder.NotifyFilter = IO.NotifyFilters.DirectoryName
watchfolder.NotifyFilter = watchfolder.NotifyFilter Or _
IO.NotifyFilters.FileName
watchfolder.NotifyFilter = watchfolder.NotifyFilter Or _
IO.NotifyFilters.Attributes

' add the handler to each event
AddHandler watchfolder.Changed, AddressOf logchange
AddHandler watchfolder.Created, AddressOf logchange
AddHandler watchfolder.Deleted, AddressOf logchange

' add the rename handler as the signature is different
AddHandler watchfolder.Renamed, AddressOf logrename

'Set this property to true to start watching
watchfolder.EnableRaisingEvents = True

btn_startwatch.Enabled = False
btn_stop.Enabled = True

'End of code for btn_start_click

The NotifyFilter propery is used to specify the types of changes that we want to watch. You can combine the notify filters to watch for one or more types of changes. For example, set the NotifyFilter property to Size if you want to monitor the changes in the file/folder size.

There are many NotifyFilter properties that you can set. Here’s the complete list:
Attributes: The attributes of the file or folder
CreationTime: The time the file or folder was created
DirectoryName: The name of the directory
FileName: The name of the file
LastAccess: The date the file or folder was last opened
LastWrite: The date the file or folder last had anything written to it
Security: The security settings of the file or folder
Size: The size of the file or folder
The default is the bitwise OR combination of LastWrite, FileName, and DirectoryName.

The FileSystemWatcher class raises five events, which are Created, Changed, Deleted, Renamed and Error. Because Created, Changed, and Deleted events share the same event signature, we can write just one event handler. We will also write one event handler for Renamed, because its event signatures are different.

Lets type code for handling Created, Changed, and Deleted events raised by the FileSystemWatcher class.

[Note] You will have to type the event declaration, as this procedure is not generated automatically [End Note]

Private Sub logchange(ByVal source As Object, ByVal e As _
System.IO.FileSystemEventArgs)
If e.ChangeType = IO.WatcherChangeTypes.Changed Then
txt_folderactivity.Text &= "File " & e.FullPath & _
" has been modified" & vbCrLf
End If
If e.ChangeType = IO.WatcherChangeTypes.Created Then
txt_folderactivity.Text &= "File " & e.FullPath & _
" has been created" & vbCrLf
End If
If e.ChangeType = IO.WatcherChangeTypes.Deleted Then
txt_folderactivity.Text &= "File " & e.FullPath & _
" has been deleted" & vbCrLf
End If
End Sub

This is the code for handling the Renamed event, risen by the FileSystemWatcher class:

Public Sub logrename(ByVal source As Object, ByVal e As _
System.IO.RenamedEventArgs)
txt_folderactivity.Text &= "File" & e.OldName & _
" has been renamed to " & e.Name & vbCrLf
End Sub

Lastly, here's is the code for the btn_stop_click, which will stop the monitor:

' Stop watching the folder
watchfolder.EnableRaisingEvents = False
btn_startwatch.Enabled = True
btn_stop.Enabled = False

Testing Our Application
Now it's the time to run the application and see it in action. Build and run the application, type the folder you want to monitor into the text box and click start watching to start watching that folder.

In the folder you specified, create a file, rename it, update it and delete it to see our application recording those changes, as shown below:




Useful Information
Use the FileSystemWatcher.Filter property to determine what files should be monitored. Setting the filter property to "*.txt" will monitor all files with a txt extension. The default is *.*, which means that all files will be monitored. If you want to monitor all files -- with and without extensions -- set the Filter property to "".

FileSystemWatcher can be used to watch files on a local computer, a network drive, or a remote computer, but it does not raise events for a CDROM drive. It only works on Windows 2000 and Windows NT 4.0, and common file system operations might raise more than one event. For example, when a file is edited or moved, more than one event might be raised. Likewise, some anti virus or other monitoring applications can cause additional events.

The FileSystemWatcher class will not watch the specified folder until the path property has been set and EnableRaisingEvents is set to true. Set the FileSystemWatcher.IncludeSubdirectories property to true if you want to monitor subdirectories; otherwise, set it to false. The default is false.

The FileSystemWatcher.Path property supports universal naming convention (UNC) paths. If the folder that the path points to is renamed, then the FileSystemWatcher will reattached itself to the new renamed folder – a very handy function indeed!

Friday, May 4, 2007

Oracle Apps 11i : Getting started with Oracle Applications

Courtsey(exforsys.com)

This tutorial explains about Oracle Apps login, Choosing Responsibility, Choosing Function / Opening Form, Switch Responsibility, Query Form and Keyboard Shortcuts. This chapter would tell a user about the basics of login to the Oracle Applications instance. It would also demonstrate the basics of working with Oracle Applications. To understand the complete functionality of a particular responsibility please refer to the respective User Guide.

Oracle Applications Login




Before you connect to Oracle Applications you must know the URL of the Oracle Applications server you want to connect to. Clicking on the URL would lead you to the Oracle Applications Login Page as shown in figure 1 Above.

Choosing Responsibility
To connect to the Oracle Applications, you must have an Oracle Apps login ID created by the System Administrator of the Oracle Applications instance.

Enter the appropriate Login ID and password and click login. If the login is successful it will lead you to the responsibility page as shown in figure 2 below. This page will show all the responsibilities that have been assigned to your Login ID by the System Administrator.

List of Responsibilities

Choosing Function / Opening Form
Once you click on a responsibility, it will show you the menus and functions associated with the responsibility. Click on the Sys Admin, Vision Services (USA) responsibility. The page will look like as shown in the figure 3 below.

Menus and Functions attached to a responsibility


Each function under a menu opens a form when clicked upon. The forms are basically an interface between you and the applications for various functionalities. These forms are run on Oracle Jinitiator. Once you click on a function, the jinitiator is invoked and it then opens the respective form. If you are login for the first time, Oracle Applications automatically downloads and installs the jinitiator for you. It, therefore, takes a longer time to open the form for the first time. Once the jinitiator is installed, it opens an intermediate window (figure 4) before the form is opened. Please do not close this window as it will close the Oracle Applications session. Wait till the form window opens up automatically. The intermediate page would go to the background.

Intermediate Window

Click on the Define link under the Concurrent : Program Menu. This will open the form to define the Concurrent Program in Oracle Applications. The form is shown in the Figure 5 below.

Figure 5. Concurrent Programs a Define form


Switch Responsibility
The details about using the above form are given in the document on Concurrent Programs. To switch to another responsibility, you can either go to the page which was shown in the figure 3 above and click on the required responsibility and follow the step 4 and step 5 or you can click on File tab and choose Switch Responsibility as shown in figure 6 below.


Clicking on Swicth Responsibility would lead you to the list of the available responsibilities to choose from as shown in figure 7 below.



If you want to go to Application Developer responsibility to check the responsibilities attach to your username then follow these steps.


Click on File->Switch Responsibility
Choose Sys Admin responsibility among the list of responsibilities displayed.
Choose Security->User->Define from the following screen. The screen would look like as shown in the figure 8 below.

Once the Define Function is clicked, it will open the Define form which looks like as shown in the figure 9 below.


Query Form

The Define shown in the figure 9 above is used to create Login Ids for the Oracle Applications users by the System Administrator. The same form can also be used to query the existing users’ data. To view (query) the existing data go to View->Query By Example->Enter to enter the query criteria as shown in the figure 10 below.


Once you click on Enter as shown in the form above, the Define form switched mode to query mode and the color of the fields changes to BLUE. Enter a value in a field in the form above for which you want to query the data.

If you want to query for your username, type your username in the ‘User Name’ field on the form. The form would look like as shown in the figure 11 below.


To fetch the results matching the entered criteria, you need to run the query. This can be done by clicking on View->Query By Example->Run as shown in the figure 12 below.




The data would be displayed in following fashion as shown in the figure 13 below. The form shows a lot of details about the username entered in the query. All the responsibilities attached to the user name are shown in the form.







Keyboard Shortcuts
The same process can be used to query data on any form in Oracle Applications. You can also use the keyboard shortcuts for entering and running the query. For example, F11 key puts the form in the query mode and Ctrl + F11 runs the query. You can get the list of the complete key board shortcuts by clicking on Help->Keyboard Help as shown in the figure 14 below


Thursday, May 3, 2007

10 Tips for Coding with Netbeans

These are the 10 first nice things I found while using the Netbeans 5.5 Beta 2 for the first time yesterday. Hope you’ll enjoy them too

If you want to type something in the beginning of a statement/line, you can just press ctrl+space, or several first characters first, and Netbeans will pops up all the possible words for you. And if you choose some Object whose packages is not already imported, Netbeans will automatically adds the required packages for you.
Don’t bother typing import statements, just wait till it shows the red box with cross in the left side of the editor. Put your cursor in that line, and a lightbulb will show. Press alt+enter to display the proposed actions, click on it. And you’ll get your import statements automatically.
When you are typing a method, the moment you type in the opening brackets for method arguments, Netbeans will automatically add the closing brackets (default setting). If you type in your own closing bracket, it’ll overwrite the previously added closing brackets. To have the ending semicolon, you don’t have to move one position after the closing bracket, just directly type in the semicolon, Netbeans will put it at the end of the line. Also if you have a String literal as the arguments, Netbeans will automatically add the closing double-quote the same fashion with the brackets. In this case, you do need to put your cursor after the closing quote before you type in the semicolon.
Don’t bother to type the try-catch statements. Just code the expressions, select it, right click, select surround with try catch. Or wait untill it shows warning, you can choose either to enclose them in a try-catch block or just to add a throw clause in the method signature. But if you really want to have the try-catch block in the beginning, okay, you can type try and then press ctrl+space and enter. You’ll have a try-catch block and your cursor will be on the ‘Exception’ which you can change directly to any specific Exception you want.
When you want to implement an interface or extend a class, you can just type ‘im’ or ‘ex’ and then Space, and Netbeans will type in the complete word for you.
When you implements an interface, you’ll initially have an error warning for unimplemented interface methods. Just put your cursor on the method declaration line, and the lightbulb will show. Press Alt+Enter or click on the bulb, and then click on the menu for implementing those methods. Netbeans will put all the methods you need to implement for you.
If you a have a block of code with messed up indentation, just block the code using your mouse, right click, and selet reformat code. Netbeans will tidy up your code indentation.
In a method definition body, when you want to use a member field, you don’t have to manually declare the field first. Just type in the name of the field as if it was already declared. When the warning shows, press alt+enter and select option to create member fields. Or if you just want to have a local variable, there’s also an option for that in the lightbulb’s proposed actions.
If you want to rename something, Class name, method name, variable name, or whatever, don’t do ReplaceAll. Use Refactoring! Just select the name, right click, select Refactor > Rename. If you don’t know what Refactoring is, then I suggest you look for it in Wikipedia or Google Mr Martin Fowler will help you on this subject.
If your class still has errors, you’ll know even before compiling because Netbeans will mark the line with a red box with an ‘x’ sign. Also, each class editor page will have a box in the upper right corner. If it is red, then you still have errors, if it’s green, then your class is OK. If it is still has errors, you can see several red bars in the right of the page, click those to go the problem line.
Also, did you know that Netbeans was initially a student project named Xelfi at Charless Univ in Prague? The name Netbeans came from the idea of creating Network-ready JavaBeans. After acquired by Sun, it was called Forte for Java, but now it is Netbeans as we love it.

Wednesday, May 2, 2007

How to Create a JavaScript Image Viewer

Courtsey (web reference)

Not so long ago, photo collections were stored in photo albums, sometimes with carefully written captions, or as slide shows ready made to strike fear into the hearts of many a social guest. Lately, these photo albums are going high-tech as people put their fondest memories on the web.



A quick look through some of these photo album sites indicates that there is some room for improvement in presentation. While there are lots of photo slide show servers on the web – and some that will even store and show your photos for free, the slide-show format limits the size of the images and there is not so much room for personalization. Additionally, it seems that the only other option is to display all the images at full size with a little text accompanying each image. This has three significant disadvantages: with the images being so large there is little room left for layout and the images end up in a long list resulting in a very tall page. Also, the number of bytes making up each image can be quite large, adding to the time taken for the page to download.



In this article is an effective solution to this problem. Images are displayed in thumbnail size giving much more room for layout and surrounding text. Also, many images can be seen at once giving the reader a fuller presentation. If readers wish to see more detail on a specific image, they can click on it and it will expand to its full size.



The images are presented in the document in thumbnail form as in the following HTML:



< a href="spike.jpg" onclick="this.href = 'javascript:void(0);';">

< img src="spike_thumb.jpg" title="click to expand." style="float:right;"

onclick="new ImageExpander(this, 'spike.jpg');">

< /a>



Notice that the tag displays a thumbnail version of the image. The full size image is only downloaded and displayed when the user clicks on the image. Thumbnail images can be created from their originals by most image processing applications. I have also wrapped the image in a link tag to enable users without JavaScript to view the image. If JavaScript is enabled, the onclick of the link tag disables its own link so that it doesn’t interfere with the JavaScript code.



The onclick handler of the thumbnail image creates a new ImageExpander object passing itself and the URL of the full size image as arguments.



function ImageExpander(oThumb, sImgSrc)

{

// store thumbnail image and overwrite its onclick handler.

this.oThumb = oThumb;

this.oThumb.expander = this;

this.oThumb.onclick = function() { this.expander.expand(); }



// record original size

this.smallWidth = oThumb.offsetWidth;

this.smallHeight = oThumb.offsetHeight;



// initial settings

this.bExpand = true;

this.bTicks = false;



// insert into self organized list

if ( !window.aImageExpanders )

window.aImageExpanders = new Array();

window.aImageExpanders.push(this);



// create the full sized image and automatically expand when loaded

this.oImg = new Image();

this.oImg.expander = this;

this.oImg.onload = function(){this.expander.onload();}

this.oImg.src = sImgSrc;

}



The ImageExpander constructor takes ownership of the thumbnail object and reassigns the onclick handler to call its own expand. The this.bTicks flag is used to indicate whether or not the animation engine is active. Initially, this value is false as the ImageExpander must wait for the image to download before starting the animation.



Once expanded, the image will take up a large portion of the visible area of the browser so to avoid confusion; only one ImageExpander should be allowed to expand at any one time. To enforce this, the ImageExpander inserts itself into an array held in the window object. We’ll see how this is used later.



Lastly, the full size image is loaded into a new Image object. The onload handler on the image is set to call the onload method on the ImageExpander.



ImageExpander.prototype.onload = function()

{

this.oDiv = document.createElement("div");

document.body.appendChild(this.oDiv);

this.oDiv.appendChild(this.oImg);

this.oDiv.style.position = "absolute";

this.oDiv.expander = this;

this.oDiv.onclick = function(){this.expander.toggle();};

this.oImg.title = "Click to reduce.";

this.bigWidth = this.oImg.width;

this.bigHeight = this.oImg.height;



if ( this.bExpand )

{

this.expand();

}

else

{

this.oDiv.style.visibility = "hidden";

this.oImg.style.visibility = "hidden";

}

}



Once the image has loaded, the ImageExpander object can display the image in the browser. First a < div > element is created to contain the image. The < div > element is used to position the image on the screen and to handle the onclick event as once the image has grown to full size, the user will want to be able to reduce it by clicking on it again. At this point, the width and height of the full size image can be retrieved, these values will be used to calculate how big to make the image when it is expanded.



Now, it is possible that while the image was downloading, the user may have clicked on another thumbnail, so the this.bExpand flag must be tested to see whether to go on with the expansion. If not, the image and its enclosing < div > are quickly hidden from view.



ImageExpander.prototype.toggle = function()

{

this.bExpand = !this.bExpand;

if ( this.bExpand )

{

for ( var i in window.aImageExpanders )

if ( window.aImageExpanders[i] !== this )

window.aImageExpanders[i].reduce();

}

}



The toggle method is called by the onclick handler of the full size image. All this function does is to reverse the direction of the image so the users can change their minds if they desire. It is not necessary to start the animation because this function can only be called while the animation is already running. So all that is required is to change the this.bExpand flag and force all other ImageExpander objects to reduce.

ImageExpander.prototype.expand = function()

{

// set direction of expansion.

this.bExpand = true;



// set all other images to reduce

for ( var i in window.aImageExpanders )

if ( window.aImageExpanders[i] !== this )

window.aImageExpanders[i].reduce();



// if not loaded, don't continue just yet

if ( !this.oDiv ) return;



// hide the thumbnail

this.oThumb.style.visibility = "hidden";



// calculate initial dimensions

this.x = this.oThumb.offsetLeft;

this.y = this.oThumb.offsetTop;

this.w = this.oThumb.clientWidth;

this.h = this.oThumb.clientHeight;



this.oDiv.style.left = this.x + "px";

this.oDiv.style.top = this.y + "px";

this.oImg.style.width = this.w + "px";

this.oImg.style.height = this.h + "px";

this.oDiv.style.visibility = "visible";

this.oImg.style.visibility = "visible";



// start the animation engine.

if ( !this.bTicks )

{

this.bTicks = true;

var pThis = this;

window.setTimeout(function(){pThis.tick();},25);

}

}



The expand method first sets the this.bExpand flag to true so that the animation engine knows which direction it is going and then forces all other ImageExpander objects to reduce. It is possible that this method may be called before the image has downloaded so a check is done at this point and the method is exited if not ready. Otherwise the thumbnail is hidden (although it will continue to take up browser space) and the initial position and size of the full size image are set to match the thumbnail. Then the animation engine is started to manage the expansion of the image to full size.



ImageExpander.prototype.reduce = function()

{

// set direction of expansion.

this.bExpand = false;

}



All that is needed to reduce an image is to set the this.bExpand flag to false. If the full size image is visible, then the animation engine will already be running and changing this flag will control its direction. If the thumbnail image is visible, then there is nothing to do as the image is already reduced as far as it should go.



The animation engine is contained in a single method of the ImageExpander object called tick. As its name suggests, this function is called repeatedly at fast enough intervals to make the image movements it controls appear to be smooth.



ImageExpander.prototype.tick = function()

{

// calculate screen dimensions

var cw = document.body.clientWidth;

var ch = document.body.clientHeight;

var cx = document.body.scrollLeft + cw / 2;

var cy = document.body.scrollTop + ch / 2;



The first thing the tick does is to calculate the browser page dimensions – at least that part that is visible to the user.

The next task is to calculate the target size and position; this will depend on the direction of the animation defined by the this.bExpand flag.



If the image is expanding then the original dimensions of the image are taken and then reduced to fit the page if necessary:



// calculate target

var tw,th,tx,ty;

if ( this.bExpand )

{

// start with the full size dimensions

tw = this.bigWidth;

th = this.bigHeight;



// reduce to fit the screen

if ( tw > cw )

{

th *= cw / tw;

tw = cw;

}

if ( th > ch )

{

tw *= ch / th;

th = ch;

}

// then center it on the page

tx = cx - tw / 2;

ty = cy - th / 2;

}



Otherwise the current size and location of the thumbnail image are used. Note that if the browser window changes size, then the actual position of the thumbnail can change accordingly, so this must be calculated for each tick.



else

{

tw = this.smallWidth;

th = this.smallHeight;

tx = this.oThumb.offsetLeft;

ty = this.oThumb.offsetTop;

}



Once the target size and position are calculated, we can use some algorithm to move the full size image towards the target. In the following code, each dimension; left, top, width and height are moved 10% closer to its target. While 10% might sound like a lot, the size of movement will reduce as the target comes closer, so the effect is to start with an initial burst of speed and then slowing down as it approaches the target position and size.



The algorithm below is contained inside a nested function which is assigned to the variable fMove. This function operates on each dimension and does two things: it calculates the value 10% closer to the target and counts the dimensions that a getting very close to the target value – less than three pixels away. This count is declared outside the function but it is still accessible as nested functions have access to the context in which they are defined.



// move 10% closer to target

var nHit = 0;

var fMove = function(n,tn)

{

var dn = tn - n;

if ( Math.abs(dn) < 3 )

{

nHit++;

return tn;

}

else

{

return n + dn / 10;

}

}

this.x = fMove(this.x, tx);

this.y = fMove(this.y, ty);

this.w = fMove(this.w, tw);

this.h = fMove(this.h, th);



this.oDiv.style.left = this.x + "px";

this.oDiv.style.top = this.y + "px";

this.oImg.style.width = this.w + "px";

this.oImg.style.height = this.h + "px";

If the image is reducing and all four dimensions (left, top, width and height) have hit their target, then the animation engine is stopped by switching off the this.bTicks flag, hiding the full size image and showing the thumbnail again. Expanding images stay active in case the user changes the size of the browser window.



// if reducing and size/position is a match, stop the tick

if ( !this.bExpand && (nHit == 4) )

{

this.oImg.style.visibility = "hidden";

this.oDiv.style.visibility = "hidden";

this.oThumb.style.visibility = "visible";



this.bTicks = false;

}



Finally, if still active, the animation engine schedules another tick a short time in the future.



if ( this.bTicks )

{

var pThis = this;

window.setTimeout(function(){pThis.tick();},25);

}

}



Now, with this code in place, all that is left is to design the layout of the web page, taking advantage of the extra space resulting from the smaller thumbnail images. Remember to enclose each thumbnail in a link tag to cater for those users who do not have JavaScript.

Conclusion
In this article I have presented a JavaScript class that will manage a pair of images; a full-sized image and its thumbnail. When the user clicks on the thumbnail, the ImageExpander code will enlarge the image until it either fills the browser or reaches its full size – whichever comes first. A second click on the image or clicking on another thumbnail reduces the image back to its original position.



To see a working demonstration of this code, click here.

A little disclaimer:
I have endeavored to make this code as browser compatible as possible, meaning that it’s been tested with the latest versions of Internet Explorer (6.0) and Netscape (7.1) – this accounts for over 80% of users).

Tuesday, May 1, 2007

SAP ABAP interview questions

Courtsey(Techinterview)

What is an ABAP data dictionary?- ABAP 4 data dictionary describes the logical structures of the objects used in application development and shows how they are mapped to the underlying relational database in tables/views.

What are domains and data element?- Domains:Domain is the central object for describing the technical characteristics of an attribute of an business objects. It describes the value range of the field. Data Element: It is used to describe the semantic definition of the table fields like description the field. Data element describes how a field can be displayed to end-user.

What is foreign key relationship?- A relationship which can be defined between tables and must be explicitly defined at field level. Foreign keys are used to ensure the consistency of data. Data entered should be checked against existing data to ensure that there are now contradiction. While defining foreign key relationship cardinality has to be specified. Cardinality mentions how many dependent records or how referenced records are possible.

What is ERP? - ERP is a package with the techniques and concepts for the integrated management of business as a whole, for effective use of management resources, to improve the efficiency of an enterprise. Initially, ERP was targeted for manufacturing industry mainly for planning and managing core business like production and financial market. As the growth and merits of ERP package ERP software is designed for basic process of a company from manufacturing to small shops with a target of integrating information across the company.

Different types of ERP? - SAP, BAAN, JD Edwards, Oracle Financials, Siebel, PeopleSoft. Among all the ERP’s most of the companies implemented or trying to implement SAP because of number of advantages aver other ERP packages.

What is SAP? - SAP is the name of the company founded in 1972 under the German name (Systems, Applications, and Products in Data Processing) is the leading ERP (Enterprise Resource Planning) software package.