Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3189

Re: How to update BP data

$
0
0

Hi Saket,

I am trying to update BP data.Now I have a question that I need to update tel and mob,but there only mob can update successfully.I don't know why.

I need your help.Part of my code as following.

 

........

IF iv_tel IS NOT INITIAL.
     IF lt_tel[] IS NOT INITIAL.
       "DELETE lt_tel WHERE r_3_user = '1' .
       lt_tel_x-updateflag = 'U'.
       lt_tel_x-telephone = 'X'.
       lt_tel_x-r_3_user = 'X'.
       APPEND lt_tel_x.
     ELSE.
       lt_tel_x-updateflag = 'I'.
       lt_tel_x-telephone = 'X'.
       lt_tel_x-r_3_user = 'X'.
       APPEND lt_tel_x.
     ENDIF.

      CLEAR lt_tel[].

     lt_tel-country = 'CN'.
     lt_tel-telephone = iv_tel.
     lt_tel-r_3_user = '1'.
     APPEND lt_tel.
   ENDIF.

   IF iv_mob IS NOT INITIAL.
     IF lt_tel[] IS NOT INITIAL.
       "DELETE lt_tel WHERE r_3_user = '3' .
       lt_tel_x-updateflag = 'U'.
       lt_tel_x-telephone = 'X'.
       lt_tel_x-r_3_user = 'X'.
       APPEND lt_tel_x.
     ELSE.
       lt_tel_x-updateflag = 'I'.
       lt_tel_x-telephone = 'X'.
       lt_tel_x-r_3_user = 'X'.
       APPEND lt_tel_x.
     ENDIF.

     CLEAR lt_tel[].

     lt_tel-country = 'CN'.
     lt_tel-telephone = iv_mob.
     lt_tel-r_3_user = '3'.
     APPEND lt_tel.
   ENDIF.

   CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'
     EXPORTING
       businesspartner = iv_customerno
       addressdata     = lt_addressdata
       addressdata_x   = lt_addressdata_x
     TABLES
       bapiadtel       = lt_tel
       bapiadsmtp      = lt_email
       bapiadtel_x     = lt_tel_x
       bapiadsmt_x     = lt_email_x
       return          = lt_return4.
 
   IF sy-subrc = 0.
     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
         wait = 'X'.
     ev_flag = 'Y'.
   ELSE.
     ev_flag = 'E'.
   ENDIF.


Viewing all articles
Browse latest Browse all 3189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>