on 10-05-2007 3:47 PM
Hi all,
I am stuck up developing an ITS application.
I want to get the user loging in by his employee number(PERNR) in the application.
Now, I want to validate the PERNR as well as to retain that Name and number in the whole application.
Ex. I am entering PERNR in the first screen, press "Submit".
Now the Welcome page appears which displays some instructions, Also I want to display the Name of Employee on the top saying "Welcome <Employee Name>".
Also I want to retain the PERNR and name in the whole application.
Can somebody please help me ?
Some sample code would be appreciated.
Reward points... Don't worry.
Thanks in advance,
Hemant.
Hi Hemant,
With the FM : HR_GETEMPLOYEEDATA_FROMUSER,
You can get the PERNR as well as User name.
(Besides these there are more....!!)
Say,
If my screen structure is P0001 based :
CALL FUNCTION 'HR_GETEMPLOYEEDATA_FROMUSER'
EXPORTING
username = sy-uname
IMPORTING
employeenumber = p0001-pernr
name = p0001-ename
return = return
EXCEPTIONS
user_not_found = 1
countrygrouping_not_found = 2
infty_not_found = 3
OTHERS = 4
.
Hope this helps.
Regards,
Remi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemant,
if the username and PERNR is on the dynpro you just has to refer to the fieldname. If not you have to write this information from ABAP into ITS context, from where you can use it in your template. This can be done using the Web Transaction API http://help.sap.com/saphelp_nw04/helpdata/en/48/35d69f4abf11d18a0f0000e816ae6e/frameset.htm
At first use the macro FIELD-SET and transport the data using FIELD-TRANSPORT.
Best regards,
Klaus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.