SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_USER_CHANGE



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
crxcrvs
Участник
Участник



Joined: 10 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 3:34 pm    Post subject: BAPI_USER_CHANGE Reply with quote

Привет всем!
У меня следующая проблема
есть код
DATA : ls_address TYPE bapiaddr3,
lv_user TYPE sy-datum,
ls_addressx TYPE bapiaddr3x,
lt_return TYPE STANDARD TABLE OF bapiret2.
ls_address-e_mail = 'qqq@www'.
ls_addressx-e_mail = 'X'.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = lv_user
address = ls_address
addressx = ls_addressx
TABLES
return = lt_return.

он как видно вставляет электронный адрес
в учетную запись - проблема в следующем как я ни крутил этот ФМ
два емейла вставить не получается.
Может кто нибудь борол это?
Заранее спасибо.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Thu Apr 10, 2008 5:02 pm    Post subject: Reply with quote

Code:
DATA :
lv_user TYPE BAPIBNAME-BAPIBNAME,
ls_address TYPE bapiaddr3,
ls_addressx TYPE bapiaddr3x,
lt_return TYPE STANDARD TABLE OF bapiret2,
ls_addsmtp TYPE BAPIADSMTP,
lt_addsmtp TYPE STANDARD TABLE OF BAPIADSMTP.

lv_user = sy-uname.

ls_addsmtp-STD_NO     = 'X'.
ls_addsmtp-HOME_FLAG  = 'X'.
ls_addsmtp-CONSNUMBER = '001'.
ls_addsmtp-E_MAIL = '[email protected]'.
APPEND ls_addsmtp TO lt_addsmtp.

CLEAR ls_addsmtp-STD_NO.
CLEAR ls_addsmtp-HOME_FLAG.
ls_addsmtp-CONSNUMBER = '002'.
ls_addsmtp-E_MAIL = '[email protected]'.
APPEND ls_addsmtp TO lt_addsmtp.

*ls_address-e_mail = '[email protected]'.
*ls_addressx-e_mail = 'X'.
CALL FUNCTION 'BAPI_USER_CHANGE'
  EXPORTING
    username = lv_user
    address  = ls_address
    addressx = ls_addressx
  TABLES
    addsmtp = lt_addsmtp
    return   = lt_return.

COMMIT WORK AND WAIT.
Back to top
View user's profile Send private message Blog Visit poster's website
crxcrvs
Участник
Участник



Joined: 10 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 6:29 pm    Post subject: Reply with quote

Хм и у вас это отрабатывает? Удивительное явление.
У меня как вы понимаете нет возвращет в таблице lt_addsmtp уже существующие адресса да и все. Ну и в lt_return пишет как обычно пользователь изменился. Да и номера я вот эти тоже менял ls_addsmtp-CONSNUMBER . Не хочет работать . Придется видимо через USR21->ADR6 руками править.
Back to top
View user's profile Send private message
crxcrvs
Участник
Участник



Joined: 10 Apr 2008
Posts: 4

PostPosted: Thu Apr 10, 2008 6:38 pm    Post subject: Reply with quote

Хотя правда ваша - работает только галочку надо воткнуть
DATA :
lv_user TYPE BAPIBNAME-BAPIBNAME,
ls_address TYPE bapiaddr3,
ls_addressx TYPE bapiaddr3x,
lt_return TYPE STANDARD TABLE OF bapiret2,
ls_addsmtp TYPE BAPIADSMTP,
lt_addsmtp TYPE STANDARD TABLE OF BAPIADSMTP,
ls_ADDCOMX TYPE BAPIADCOMX .

lv_user = sy-uname.

ls_addsmtp-STD_NO = 'X'.
ls_addsmtp-HOME_FLAG = 'X'.
ls_addsmtp-CONSNUMBER = '001'.
ls_addsmtp-E_MAIL = '[email protected]'.
APPEND ls_addsmtp TO lt_addsmtp.

CLEAR ls_addsmtp-STD_NO.
CLEAR ls_addsmtp-HOME_FLAG.
ls_addsmtp-CONSNUMBER = '002'.
ls_addsmtp-E_MAIL = '[email protected]'.
APPEND ls_addsmtp TO lt_addsmtp.
ls_ADDCOMX-ADSMTP ='X'.
*ls_address-e_mail = '[email protected]'.
*ls_addressx-e_mail = 'X'.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = lv_user
ADDCOMX = ls_ADDCOMX
TABLES
addsmtp = lt_addsmtp
return = lt_return.

COMMIT WORK AND WAIT.
Спасибо за помощь!
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Thu Apr 10, 2008 6:41 pm    Post subject: Reply with quote

У меня код без галки отработал. Система 4.7
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.