‎2008 Sep 02 10:13 AM
Hi Friends,
I have to change User's License Data in SU01 transaction. I am using BAPI_USER_CHANGE and after that BAPI_TRANSACTION_COMMIT.
I have tried commit work and wait also.
The problem is bapi_user_change says the user has been changed. But when i see it in SU01 there is no change.
What is the problem, I am not able to understand?
Kindly help.
‎2008 Sep 02 10:29 AM
‎2008 Sep 02 11:00 AM
Hi all,
see the code below and then reply :
UCLASS-LIC_TYPE = '55'.
UCLASS-COUNTRY_SURCHARGE = '100'.
UCLASS-SUBSTITUTE_FROM = sy-datum.
UCLASS-SUBSTITUTE_UNTIL = '99991231'.
UCLASS-SYSID = 'DS1'.
UCLASS-CLIENT = '600'.
UCLASSX-UCLASS = 'X'.
UCLASSX-UCLASSSYS = 'X'.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = 'BCZRIM'
UCLASS = UCLASS
UCLASSX = uclassx
tables
return = RETURN
UCLASSSYS = UCLASSSYS
.
IF SY-SUBRC EQ 0.
data : wa_return type BAPIRET2.
clear wa_return.
*
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = wa_return
.
endif.
‎2008 Sep 02 11:26 AM
Hi Pradeep,
sy-subrc is not checked in BAPI.
Use this.
if RETURN is not initial.
bapi call_transaction_commit.
endif.
It will work provided all the data that you are passing is correct.
Regards,
Shree Tejus C.
‎2008 Sep 02 11:35 AM
Hi,
Error : Change indicator X is not supported
It's giving me an error on passing the change flag structure uclassx.
thanks,
pradeep
‎2008 Sep 02 11:42 AM
Pradeep,
UCLASSX-UCLASSSYS = 'X'"is wrong which you passed
The following values are permitted for the field UCLASSX-UCLASSSYS:
'R' The system-specific user classifications are deleted, and replaced with current values from the table.
'S' Only the user classifications for the listed systems are replaced. If the user classifications for a system are to be deleted, the user type must be initial.
Space The table is not used.
‎2008 Sep 02 11:59 AM
Hi,
Even I have tried with R & S also, then also it is not working.
DATA : uclass TYPE bapiuclass,
uclassx TYPE bapiuclassx,
return TYPE STANDARD TABLE OF bapiret2 INITIAL SIZE 0,
uclasssys TYPE STANDARD TABLE OF bapiuclasssys INITIAL SIZE 0.
DATA : wa_uclasssys TYPE bapiuclasssys.
uclass-lic_type = '55'.
uclass-country_surcharge = '100'.
uclass-substitute_from = sy-datum.
uclass-substitute_until = '99991231'.
uclass-sysid = 'DS1'.
uclass-client = '600'.
*UCLASSX-UCLASS = 'X'.
uclassx-uclasssys = 'R'.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = 'AJVHBI'
uclass = uclass
uclassx = uclassx
TABLES
return = return.
IF return IS NOT INITIAL.
DATA : wa_return TYPE bapiret2.
CLEAR wa_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = wa_return.
ENDIF.
‎2008 Sep 02 12:33 PM
‎2009 Aug 24 7:22 AM
Hi Pradeep,
pass the parameter you want to change and then raise the flag as 'X' after the parameter...like below
If we want to change address then...provide the address details:
wa_address-FIRSTNAME = 'TEST'.
wa_address-LASTNAME = 'USER'.
then raise the change flag against each field we changed...
wa_addressx-FIRSTNAME = 'X'.
wa_addressx-LASTNAME = 'X'.
try wth this it works in my case..
‎2013 Dec 17 3:53 PM