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

Prob with "BAPI_USER_CREATE"

Former Member
0 Likes
1,887

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.

6 REPLIES 6
Read only

Former Member
0 Likes
1,299

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

Read only

0 Likes
1,299

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.

Read only

0 Likes
1,299

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

Read only

0 Likes
1,299

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

Read only

Former Member
0 Likes
1,299

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.

Read only

Former Member
0 Likes
1,299

Hi,

Please award points for the post which resolved your issue ,.

Regards,

Naveen