2006 Oct 07 9:08 PM
Hi,
I am using the FM susr_user_address_read in my print program to get the name of the user given in the field bkpf-usnam. The Export parameter of the FM is user_name which i am giving as bkpf-usnam.The import parameter is user_usr03. what should i equate it to? Please help me by looking at that FM. I want name1 and name2 fields from user_usr03 in the output of the form.
2006 Oct 07 9:53 PM
If you simply need the first and last name, then there is no need to import that structure as the first and last name are contained in the USR_AD structure, simply comment the USER_03 out. For example.
report zrich_0003.
data: xusr_ad type addr3_val.
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
* USER_USR03 =
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
If you still want to get form USER_03 structure, you can like this.
report zrich_0003.
data: xusr_ad type addr3_val.
<b>data: xusr_03 type usr03.</b>
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
<b> USER_USR03 = xusr_03</b>
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
<b>write:/ xusr_03-name1, xusr_03-name2.</b>
Regards,
Rich Heilman
If you simply need the first and last name, then there is no need to import that structure as the first and last name are contained in the USR_AD structure, simply comment the USER_03 out. For example.
report zrich_0003.
data: xusr_ad type addr3_val.
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
* USER_USR03 =
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
If you still want to get form USER_03 structure, you can like this.
report zrich_0003.
data: xusr_ad type addr3_val.
<b>data: xusr_03 type usr03.</b>
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
<b> USER_USR03 = xusr_03</b>
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
<b>write:/ xusr_03-name1, xusr_03-name2.</b>
Regards,
Rich Heilman
2006 Oct 07 9:53 PM
If you simply need the first and last name, then there is no need to import that structure as the first and last name are contained in the USR_AD structure, simply comment the USER_03 out. For example.
report zrich_0003.
data: xusr_ad type addr3_val.
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
* USER_USR03 =
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
If you still want to get form USER_03 structure, you can like this.
report zrich_0003.
data: xusr_ad type addr3_val.
<b>data: xusr_03 type usr03.</b>
call function 'SUSR_USER_ADDRESS_READ'
exporting
user_name = sy-uname
* READ_DB_DIRECTLY = ' '
importing
user_address = xusr_ad
<b> USER_USR03 = xusr_03</b>
exceptions
user_address_not_found = 1
others = 2.
write:/ xusr_ad-NAME_FIRST, xusr_ad-NAME_last.
<b>write:/ xusr_03-name1, xusr_03-name2.</b>
Regards,
Rich Heilman
2006 Oct 07 10:36 PM
THANKS A TON RICH!
RICH, IS THERE A FM TO RETRIEVE EMAIL ADDRESS?
Message was edited by: vishwanath vedula
2006 Oct 07 11:08 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |