cancel
Showing results for 
Search instead for 
Did you mean: 

In 'BAPI_USER_CHANGE' country is not updating

Former Member
0 Kudos

Hi All,

I am using 'BAPI_USER_CHANGE' to change user data. Everything gets change accept country in Maintain telephone numbers. Following is my code

WA_ADDRESS-COUNTRY = 'ZW'  .
WA_ADDRESS-TEL1_NUMBR = '8888'.
WA_ADDRESS-TEL1_EXT = '88'  .

WA_ADDRESSX-COUNTRY = 'X' .
WA_ADDRESSX-TEL1_NUMBR = 'X'.
WA_ADDRESSX-TEL1_EXT= 'X'.

CALL FUNCTION 'BAPI_USER_CHANGE'
  EXPORTING
    USERNAME              = W_USERNAME
    ADDRESS                = WA_ADDRESS
    ADDRESSX               = WA_ADDRESSX
 TABLES
    RETURN                  = IT_RETURN[]

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = '2'

Edited by: Swarup basagare on Sep 2, 2008 7:42 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member181995
Active Contributor
0 Kudos

Swarup,

In ADDRESS table you need to pass some more parameter like

PERS_NO
ADDR_NO
FIRSTNAME
LASTNAME

along with country.

more over You can use the function module BAPI_COMPANY_CLONE

Former Member
0 Kudos

I tried that one also still i is not updating.

former_member181995
Active Contributor
0 Kudos

Can you confirm one thing:

Spro>general settings>set counties>define country codes>here ZW is define?

Edited by: Amit Gujargoud on Sep 2, 2008 8:48 AM

former_member181995
Active Contributor
0 Kudos

Solved?

what was the problem?

vinod_vemuru2
Active Contributor
0 Kudos

Hi Swarup,

Are u getting any messages in Return table(Success/Failure)?

Probably u r passing wrong country code. Check this once.

Thanks,

Vinod.

Former Member
0 Kudos

It is showing 'success'.

S User <username> has changed.

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Are u passing Address number and person number. I think u have to pass these and COUNTRYISO field aswell.

Also which transaction u r using to view the user details?

Use BAPI BAPI_USER_GET_DETAIL for getting address and person numbers.

Thanks,

Vinod.

Former Member
0 Kudos

What do you really want to change ?

Former Member
0 Kudos

Country in Maintain Telephone numbers...

Edited by: Swarup basagare on Sep 2, 2008 7:57 AM

Former Member
0 Kudos

Use WA_ADDRESS-NAMCOUNTRY instead of WA_ADDRESS-COUNTRY as there are no COUNTRY field in structure ADDRESS.

and it should be like this :

WA_ADDRESS-NAMCOUNTRY = 'ZW'  .
WA_ADDRESS-TEL1_NUMBR = '8888'.
WA_ADDRESS-TEL1_EXT = '88'  .
 
WA_ADDRESSX-NAMCOUNTRY = 'X' .
WA_ADDRESSX-TEL1_NUMBR = 'X'.
WA_ADDRESSX-TEL1_EXT= 'X'.

Former Member
0 Kudos

I tried that one also but not able to change it .

And COUNTRY field is there .