Display User id ,User name,Responsibility id,Responsibility name from current login information


In this tutorial we are going to learn how to display User id ,User name,Responsibility id,Responsibility name and also display User information based on login.

Step1: Create a page LoginDetailsPG under xxerpschools.oracle.fnd.erps.webui

Image 1

Give the Page name and package name as said earlier.

Image 2

Now the page will be created and the structure of the page is shown below.

Image 4

Now create an Am under  Package xxerpschools.oracle.apps.fnd.erps.server  and name it as ErpsAM.

In PageLayoutRN-Property Inspector attach AM Definition .
Window Title – Login Details Web Page
Title- Welcome!!
Image 3

Step:2
Create a region under PageLayoutRN—>rightclick —>New—>Region
In Property Inspector
Region Style as messageComponentLayout
Rows:2
Columns:2

Image 5

After creating messageComponentLayout Region under PageLayoutRN  create four items and Item style of all the four items is ” messageStyledText “.

ID : UserId
Item Style :messageStyledText
Prompt : User Id
CSS Class : OraDataText
ID : UserName
Item Style :messageStyledText
Prompt : User Name
CSS Class : OraDataText

ID : RepId
Item Style :messageStyledText
Prompt : Responsibility Id
CSS Class : OraDataText

ID : RespName
Item Style :messageStyledText
Prompt : Responsibility Name
CSS Class : OraDataText

Now the below structure shows the four items which we created .

Image 5

Image 6

Step:3
Create a  Controller Rightclick PageLayoutRN—>Set New Controller

Image 7

Name its as LoginDetailaCO under package xxerpschools.oracle.apps.fnd.erps.webui.

Image 8

 

 

In Controller write the below code in processRequest.
import  the package
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;

Image 9

 

Now,we can also display the User information based on login.
Add the below code in processRequest

10

Rebuild the controller and  Run the page . The output of the page  is as follows.

Image 79