‎2011 Jul 24 12:51 AM
I am creating a user by executing BAPI_USER_CREATE1 via SE37.
No matter what I do, I can't get the e-mail address to populate in the user when it's created.
The BAPI uses a structure called "BAPIADSMTP" which has these components:
STD_NO
E_MAIL
EMAIL_SRCH
STD_RECIP
R_3_USER
ENCODE
TNEF
HOME_FLAG
CONSNUMBER
ERRORFLAG
FLG_NOUSE
VALID_FROM
VALID_TO
I've populated most if not all of these fields, definitely the e_mail component. The user adds fine. It's just nothing in the e-mail address field when I look at the user via SU01. Some developers have suggested a BAPI_COMMIT_WORK. However I thought exiting the FM in SE 37 did a commit and besides, the user is indeed being created!!!
‎2011 Jul 24 5:41 AM
Hi Wardell,
Do you have the import parameter ADDRESS (TYPE BAPIADDR3) in the BAPI.
Try passing the mail address to the field E_MAIL in import parameter ADDRESS
Regards
Rajvansh
‎2011 Jul 24 6:12 AM
Hi Wardell,
No need to use bap_transaction_commit. As Ravi told pass the parameter.
Regards,
Madhu.
‎2011 Jul 24 12:50 PM
I figured it out by doing a SQL Trace on SU01 transaction and examining the parameters on the insert on table USR004. Turns out I needed to populate consnumber with '001' instead of '000' in the BAPI. I have to admit, there should be a lot more documentation on how to use this BAPI than there apparently is.