Skip to Content
0
Dec 30, 2011 at 07:00 AM

SAP Netweaver 7.x BAPI_USER_CREATE doesnt work

47 Views

I am deploying a user create program which uses the FM BAPI_USER_CREATE. The RETURN parameter gives me the following message:

The entered password is not downward compatible (see long text)

The communication type RML is not defined

No data maintained for standard communication type 'Remote Mail'

Code Extract of the program is as follows:

REPORT Z_USER_CREATE .

TABLES: ZUSERTAB,

USR02,

USH02.

DATA:

E_BAPIBNAME LIKE BAPIBNAME,

E_BAPILOGOND LIKE BAPILOGOND,

E_BAPIADDR3 LIKE BAPIADDR3,

E_LANGU_P TYPE SPRAS VALUE 'E',

E_COMM_TYPE TYPE AD_COMM VALUE 'RML',

E_COMPANY LIKE BAPIUSCOMP,

E_USR02 LIKE USR02,

E_USH02 LIKE USH02,

D_PASSWORD LIKE BAPIPWD,

D_PSWD TYPE STRING,

E_SOUD3 LIKE SOUD3,

T_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.

SELECT * FROM ZUSERTAB. "Populate temporary table with new info.

E_BAPIBNAME-BAPIBNAME = ZUSERTAB-BNAME.

E_BAPIADDR3-LASTNAME = ZUSERTAB-LASTNAME.

E_BAPIADDR3-FIRSTNAME = ZUSERTAB-FIRSTNAME.

E_BAPIADDR3-FUNCTION = ZUSERTAB-FUNCTION.

E_BAPIADDR3-LANGU_P = E_LANGU_P.

E_BAPIADDR3-COMM_TYPE = E_COMM_TYPE.

E_BAPILOGOND-CLASS = ZUSERTAB-CLASS.

E_BAPILOGOND-ACCNT = ZUSERTAB-ACCNT.

E_BAPILOGOND-GLTGV = ZUSERTAB-GLTGV.

E_BAPILOGOND-GLTGB = ZUSERTAB-GLTGB.

E_USR02-ANAME = ZUSERTAB-ANAME.

E_USH02-MODBE = ZUSERTAB-MODBE.

MOVE zusertab-modti TO e_ush02-modti.

MOVE zusertab-modda TO e_ush02-modda.

ENDSELECT.

CALL FUNCTION 'DEQUEUE_E_USR04'

EXPORTING

BNAME = ZUSERTAB-BNAME.

DO 2 TIMES.

CALL FUNCTION 'GENERAL_GET_RANDOM_PWD'

EXPORTING

NUMBER_CHARS = 8

IMPORTING

RANDOM_PWD = D_PSWD

.

IF SY-SUBRC EQ 0.

  • Do Nothing

ENDIF.

ENDDO.

D_PASSWORD = D_PSWD.

E_COMPANY = 'X&Y'

CALL FUNCTION 'BAPI_USER_CREATE'

EXPORTING

USERNAME = ZUSERTAB-BNAME

  • NAME_IN =

LOGONDATA = E_BAPILOGOND

PASSWORD = D_PASSWORD

  • DEFAULTS =

ADDRESS = E_BAPIADDR3

COMPANY = E_COMPANY

  • SNC =

TABLES

  • PARAMETER =

RETURN = T_RETURN.

Regasrds,

Tashi