2009 Apr 03 12:22 PM
Hello all,
I'm am getting dump while calling FM BAPI_USER_CREATE in ECC 6.0. Parameter 'password' lenght is 8 charectors in itab & 40 char lenght in FM. Still getting dump If passing 8 char value parameter passing to 40 char parameter.
If i called same FM 4.6c then its working fine. In 4.6c, lenght of "password" parameter lenght is 8 char in FM & same length in my itab.
CALL FUNCTION 'BAPI_USER_CREATE'
DESTINATION rfc
EXPORTING
username = itab-bname
logondata = wa_data
password = itab-password
address = wa_addr
TABLES
return = itab2.
" <Dump is>
Runtime Errors CALL_FUNCTION_CONFLICT_LENG
Exception CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time 04/03/2009 02:18:34
Short text
Type conflict when calling a function module (field length).
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "DATA_CREATION" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The call to the function module "BAPI_USER_CREATE" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "PASSWORD".
Although the currently specified field
"itab-PASSWORD" is the correct type, its length is incorrect.
Is there any problem with the fm in ecc 6.0.
Plz help on this.
Regards.
2009 Apr 03 12:30 PM
Hi,
BAPI_USER_CREATE is Obsolete and its replacement is BAPI_USER_CREATE1.
This is not the reason for dump.
Have you defined the parameters which you are passing same as BAPI reference parameter types.
Regards,
Naveen
2009 Apr 03 12:36 PM
Hi Naveen,
I have defined all parameter which i am passing to fm. as below
DATA: BEGIN OF itab OCCURS 0 ,
bname LIKE usr02-bname,
password(8),
class LIKE usr02-class,
END OF itab.
regards.
2009 Apr 03 12:38 PM
always use the same type as FM, so in this case for password use STRUCTURE BAPIPWD.
DATA: BEGIN OF itab OCCURS 0 ,
bname LIKE usr02-bname,
password type BAPIPWD,
class LIKE usr02-class,
END OF itab.
Edited by: Micky Oestreich on Apr 3, 2009 1:38 PM
2009 Apr 03 12:38 PM
Hi,
Try this way
DATA: BEGIN OF itab OCCURS 0 ,
bname LIKE BAPIBNAME-BAPIBNAME,
password like BAPIPWD,
class LIKE BAPIUCLASS,
END OF itab.
Regards,
Naveen
2009 Apr 03 12:43 PM
Hi,
Please check again.
The password type should be declared as bapipwd.
And as I saw the length is of 8 char.
not of 40 char.
use like that.
DATA: BEGIN OF itab OCCURS 0 ,
bname LIKE BAPIBNAME-BAPIBNAME,
password(8) like BAPIPWD,
class LIKE usr02-class,
END OF itab.
Thanks.
2009 Apr 03 1:04 PM
Hi,
Please award points for the post which resolved your issue ,.
Regards,
Naveen