2008 Nov 22 7:03 PM
Hi there,
I have a simple question. I want to give out the full name of a sap-user on a write list and so i want ro concatenate the first- and the lastname togehther divided by a single blank.
But how can I achieve this?
Here my coding:
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = lv_username
IMPORTING
address = ls_adress
TABLES
return = lt_return.
CONDENSE: ls_adress-firstname,
ls_adress-lastname.
CONCATENATE ls_adress-firstname
' '
ls_adress-lastname
INTO lv_name
RESPECTING BLANKS.
But the result is like this:
Firstname Lastname
I think the addition RESPECTING BLANKS also gives out the complete chars that are defined in the data element and not the filled one.
How can I recode this for a better solution?
Thanks a lot.
Kind regards
Max
2008 Nov 22 7:08 PM
Hi Max,
You need to use 'SEPARATED BY SPACE'.
CONCATENATE ls_adress-firstname
ls_adress-lastname
INTO lv_name
SEPARATED BY SPACE.
thanks,
Chidanand
Hi there,
I have a simple question. I want to give out the full name of a sap-user on a write list and so i want ro concatenate the first- and the lastname togehther divided by a single blank.
But how can I achieve this?
Here my coding:
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = lv_username
IMPORTING
address = ls_adress
TABLES
return = lt_return.
CONDENSE: ls_adress-firstname,
ls_adress-lastname.
CONCATENATE ls_adress-firstname
' '
ls_adress-lastname
INTO lv_name
RESPECTING BLANKS.
But the result is like this:
Firstname Lastname
I think the addition RESPECTING BLANKS also gives out the complete chars that are defined in the data element and not the filled one.
How can I recode this for a better solution?
Thanks a lot.
Kind regards
Max
2008 Nov 22 7:08 PM
Hi Max,
You need to use 'SEPARATED BY SPACE'.
CONCATENATE ls_adress-firstname
ls_adress-lastname
INTO lv_name
SEPARATED BY SPACE.
thanks,
Chidanand
2008 Nov 22 7:10 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |