Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_USER_CREATE1 problem

Former Member
0 Likes
1,123

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!!!

3 REPLIES 3
Read only

Former Member
0 Likes
778

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

Read only

madhu_vadlamani
Active Contributor
0 Likes
778

Hi Wardell,

No need to use bap_transaction_commit. As Ravi told pass the parameter.

Regards,

Madhu.

Read only

Former Member
0 Likes
778

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.