Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Beginner Question - transferring username from login page to next page

Former Member
0 Kudos

Hi,

Beginner level Question ; would appreciate kind reply,TA

How can I implement the following scenario in abap?

I've a login screen wherein user enters requisite credentials.Once authenticated the transfer goes to next screen called erp_training.On this I need to implement the welcome ******* functionality where ******* represents the entered username from the first screen.(Like what happens in most emails when we login in)

Edited by: ItsmeAnkit on May 18, 2011 12:52 PM

6 REPLIES 6

Former Member
0 Kudos

Try using IMPORT..... EXPORT.... statements

Former Member
0 Kudos

Hi Ankit,

Ur query:

Implement the welcome ******* functionality where ******* represents the entered username .

The User who entered in the previous screen has his credentials like username stored in SAP SYST field sy-uname.

Please refer to the following link.

try to code the message or use WRITE TEXT in the Userexit.

based on the following.

data: g_msg type string.

Change the sy-uname to character.

concatenate "Welcome to the Screen of ERP Training" sy-uname to g_msg

write g_msg.

Please do revert if the above is not correct solution for your problem

Thanks

Sri

Former Member
0 Kudos

Hello Ankit,

For above senario, you have to create Module Pool Program using tcode se80 with TOP Include. You have to create screen e.g screen 100 for login on that screen u put username and other stuff. create one more e.g screen 200. on which u welcome user. Both the screen are created in one program so use same screen-name in both screen. so the data from 1st screen automatically used on 2nd screen. if u still confused den plz let clear the concept of Module Pool Program..

And if u want ********** functionality the username field, make that screen field attribute as INVISIBLE.

Regards

Dhiraj Dangore

Edited by: dhirajdangore on May 18, 2011 1:11 PM

Former Member
0 Kudos

Thanks Sri and Dhiraj,

I'll follow your guidelines and update.

A brief about my query - I've created a program which employs 2 screens viz. ztraineelogin(Screen100) and zerp_training.(Screen110).The ztraineelogin screen uses login data from DD table zemplogin and based on entered details,authenticates and directs the user to the next screen page. On the second screen zerp_training,I wish to display the entered username from previous screen as in welcome username on the top.How to implement this and what all global/local definitions to be done whilst transferring details(username here) dynamically from one screen to another.

Thanks and appreciate your help!

0 Kudos

The solution Sri suggested will work only if the SAP user login details is not shared by multiple users(user's using the application you are trying to design within SAP).

Go with what Dhiraj has suggested.

Cheers

Rupesh

0 Kudos

Why don't you define a global variable for the user name (if it is not SAP Login name) and share it across the screens?

For example: if your login screen name (ztraining or whatever) on screen 1100 is a 'xyz123' and the variable is w_usname.

you have that w_usname available across all the screens if you define it as global parameter.

If it is multiple programs, you can always use EXPORT/IMPORT parameter.