‎2010 Feb 05 10:27 AM
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
‎2010 Feb 08 8:57 AM
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