‎2007 Oct 03 7:54 PM
Hi Gurus,
What I need to do is to put the default value for parameter on selection screen. It should be the email address of the person who run this program (from user profile).To get this value I called BAPI_USER_GET_DETAIL . How to pass the value to the parameter on selection screen now?
Thank you in advance.
Regards,
Lena
‎2007 Oct 03 8:11 PM
Try this:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
PARAMETERS e_mail TYPE bapiadsmtp-e_mail.
DATA: return TYPE TABLE OF bapiret2,
email TYPE TABLE OF bapiadsmtp WITH HEADER LINE.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = sy-uname
TABLES
return = return
addsmtp = email.
LOOP AT email.
e_mail = email-e_mail.
EXIT.
ENDLOOP.
Rob
‎2007 Oct 03 8:02 PM
You need to code this logic in INITIALIZATION event. Get the user id and mail address of the user running this program. In Initialization event, pass assign the value of email address to the parameter.
‎2007 Oct 03 8:04 PM
Hi,
Try this
INITIALIZATION.
" Run your bapi and get email address and pass it P_EMAIL parameter or select- option LOW
P_EMAIL = BAPI-EMAIL
a®
‎2007 Oct 03 8:11 PM
Try this:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
PARAMETERS e_mail TYPE bapiadsmtp-e_mail.
DATA: return TYPE TABLE OF bapiret2,
email TYPE TABLE OF bapiadsmtp WITH HEADER LINE.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = sy-uname
TABLES
return = return
addsmtp = email.
LOOP AT email.
e_mail = email-e_mail.
EXIT.
ENDLOOP.
Rob
‎2007 Oct 03 8:30 PM