on 06-08-2007 10:09 AM
Hello
when call sy-uname in the form i get user name. But I need firs and last name of user who is logged in.
I see that this info contains structure ADDR3_DATA but I don't know how to use it in form.
Thanks for answers!
I'm begginer in sapscript form so can you give me som example?
Is printig program should be changed or I can do this in form directly?
printing program is SAPF130K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Since you are using a standard driver program , so you will need to modify the script.
Here is a link which will give you all information you need to implement it
http://help.sap.com/saphelp_nw04/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Regards
Arun
Your requirements mean you have to change a program, either copy the standard print program and insert your code or create a PERFORM program to be called by your SAPscript.
There is no way round this. Either register yourself as a developer or ask one of your colleagues who is a developer to make this change for you.
Gill
Thanks Gill. Last question.
I have that code already written in (z) printing program for invoices.
So is it posible via PERFORM to call that code (from different print program)?
Or could I include below code into sapscript (not in print program):
TABLES: adrs ,
adrp , "Persons (Business Address Services)
usr21 , "Assign user name address key
vbdkr ,
DATA: ccname(30) TYPE c, "Card Type
adrp_name_last like adrp-name_last,
adrp_name_first like adrp-name_first,
name_last(15) type c,
name_first(15) type c,
creator's name
name_last = sy-uname.
name_first = ' '.
SELECT SINGLE persnumber FROM usr21 INTO usr21-persnumber
WHERE bname = vbdkr-ernam.
if sy-subrc = 0.
SELECT SINGLE name_first name_last
INTO (adrp_name_first, adrp_name_last)
FROM adrp
WHERE persnumber = usr21-persnumber
and date_from le sy-datum
and nation = ' '
and date_to ge sy-datum.
if sy-subrc = 0.
name_last = adrp_name_last.
name_first = adrp_name_first.
endif.
endif.
Message was edited by:
Giovanni Giovanni
Check in the following tables basing on Sy-uname.
Check table ADDR3_DATA
ADDR3_DATA-NAME_LAST "Last name
ADDR3_DATA-NAME_FIRST "First name
If want more check here
usr01, usr02, usr03...
Reward points.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Get the User personal number form USR21 Table then use the Personal nukmber form the table <b>ADRP</b> to get the first and last name.
If useful reward,
Vasanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giovanni ,
The data is available in the view USER_ADDR , you can write a select statement to retreive the details.
Regards
Arun
Assign points if reply is helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.