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_CHANGE - Change User Type

Former Member
0 Likes
5,260

Hi All,

BAPI_USER_CHANGE doesnot seem to work while trying to change the User Type.

User Type is stored under  LOGONDATA -> U

I am trying to change from A (Dialog) to B (System User); its not working. Any ideas?

Thanks!

11 REPLIES 11
Read only

former_member201275
Active Contributor
0 Likes
3,505

Are you getting an error message, or dump (st22), if so please post here.

Read only

0 Likes
3,505

I am using SE37 and it doesnot change it at all.

It says ,

S SUID01               029 No changes were made to user XXXXX

Read only

0 Likes
3,505

Have you read note 1168508? This might solve your issue, but i am not 100% sure.

Read only

0 Likes
3,505

hi,

If you are testing via SE37 then you have to use the sequence FM:BAPI_TRANSACTION_COMMIT

After BAPI_USER_CHANGE.

COMMIT WORK is not happening, so use FM: in sequence

Then only it will reflect.

One more way is display the BAPI_USER_CHANGE and search for COMMIT WORK, put a break point on this and above of this. Search whether it falls under any IF condition then put on that IF condition also in debug mode jump to COMMIT WORK statement, then it will change your user.

Regards

Kamaal

Read only

Former Member
0 Likes
3,505

Hi,

you can try to analyze also LOGONDATAX and not only LOGONDATA

LOGONDATAX      LIKE BAPILOGONX                       Select Change-Relevant Fields

LOGONDATA        LIKE BAPILOGOND                       Logon Data

Ivan

Read only

former_member201275
Active Contributor
0 Likes
3,505

This message was moderated.

Read only

0 Likes
3,505

No. Not yet. BAPI_TRANSACTION_COMMIT After BAPI_USER_CHANGE also doesnot change the User Type. Any ideas?

Read only

0 Likes
3,505

Hi,

Try to use the Test sequence in that first give BAPI_USER_CHANGE then in second row give BAPI_TRANSACTION_COMMIT.

How to do this:

Go to SSE37

Choose Function Module from the Menu bar->Choose Test-> Test Sequence.

Here provide BAPI_USER_CHANGE & BAPI_TRANSACTION_COMMIT

Thanks

Kamaal

Read only

0 Likes
3,505

Doesnot work. It seems if cannot read the data in LOGONDATA

Read only

Former Member
0 Likes
3,505

hello Bidwan,

Try the following executable program:

Read only

Former Member
0 Likes
3,505

Hi Bidwan,

Did you set the update flag for User type change?

ls_logond-ustyp = 'B'.

ls_logondx-ustyp = 'X'.

CALL FUNCTION 'BAPI_USER_CHANGE'

    EXPORTING

      username   = iv_username

      logondata  = ls_logond

      logondatax = ls_logondx

    TABLES

      return     = lt_bapiret.