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

Problem using FM BAPI_USER_CHANGE to update 'Validy End date'.

Former Member
0 Likes
1,185

Hi All,

Am facing a problem using BAPI_USER_CHANGE to change the value of 'Validy end date' of a user.

Though the status is shown as 'User record updated', date is not changed.

Can any one help or guide in this regard.

My code:

call function 'BAPI_USER_GET_DETAIL'

exporting

username = 'K17532'

importing

defaults = i_defaults

company = i_company

snc = i_snc

ref_user = i_ref_user

alias = i_alias

uclass = i_uclass

tables

parameter = i_param

  • profiles = i_profiles

  • activitygroups = i_activitygroups

groups = i_groups

return = i_return_tab.

clear: i_return_tab[], i_return_tab.

i_logondata-gltgb = '20100404'.

i_logondatax-gltgb = 'X'.

call function 'BAPI_USER_CHANGE'

exporting

username = 'K17532'

logondata = i_logondata

logondatax = i_logondatax

defaults = i_defaults

tables

return = i_return_tab

.

if sy-subrc eq 0.

call function 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

endif.

Regards

Raj

1 REPLY 1
Read only

Former Member
0 Likes
664

Hi All,

Found the reason.

Though we pass proper date(12/31/9999) and set the respective flag to X in i_logondatax while calling FM BAPI_USER_CHANGE, the flags defined in table(USRFLDSEL) will prevent the values be propagated to the FM SUSR_BAPI_USER_CHANGE.

The flags are read using the FM SUSR_ZBV_FILTERS_GET

Regards

Raj