Updating email address for the vendor

Hi All,
We are trying to update the email address of the vendor and for this we have written the following code... but somehow it's not working.. I went to FK03 but the email address is still the old one... can you please suggest if I am missing something:
DATA:  ls_adr6             TYPE  adr6,
      lt_adr6              TYPE TABLE OF adr6 WITH HEADER LINE,
       lv_returncode LIKE szad_field-returncode,
       it_error            TYPE TABLE OF addr_error WITH HEADER LINE,
       lt_adsuse LIKE adsuse OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: w_addr FOR ls_adr6-addrnumber.
lt_adr6-client = sy-mandt.
lt_adr6-addrnumber = w_addr-low.
lt_adr6-date_from  = '00010101'.
lt_adr6-consnumber = '001'.
lt_adr6-flgdefault = 'X'.
lt_adr6-home_flag = 'X'.
lt_adr6-smtp_addr = 'test.yahoo.com'.
lt_adr6-smtp_srch = 'TEST.YAHOO.COM'.
APPEND lt_adr6 TO lt_adr6.
*lt_adsuse-consnumber = '001'.
*lt_adsuse-comm_usage = 'AD_DEFAULT'.
*lt_adsuse-def_usage = 'X'.
*lt_adsuse-updateflag = 'U'.
*APPEND lt_adsuse.
CALL FUNCTION 'ADDR_COMM_MAINTAIN'
  EXPORTING
    address_number    = w_addr-low
    table_type        = 'ADSMTP'
  IMPORTING
    returncode        = lv_returncode
  TABLES
    comm_table        = lt_adr6                             "*660i
    error_table       = it_error
*    it_usage          = lt_adsuse                           "*981i
  EXCEPTIONS
    parameter_error   = 01
    address_not_exist = 02
    internal_error    = 03.
IF sy-subrc = 0.
   CALL FUNCTION 'ADDR_MEMORY_SAVE'
* EXPORTING
*   EXECUTE_IN_UPDATE_TASK       = ' '
   EXCEPTIONS
     address_number_missing       = 1
     person_number_missing        = 2
     internal_error               = 3
     database_error               = 4
     reference_missing            = 5
     OTHERS                       = 6
  IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'ADDR_MEMORY_CLEAR'
* EXPORTING
*   FORCE                    = ' '
   EXCEPTIONS
     unsaved_data_exist       = 1
     internal_error           = 2
     OTHERS                   = 3
  IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'ADDR_SINGLE_SAVE'
    EXPORTING
      address_number               = w_addr-low
*   ADDRESS_TYPE                 = 1
     execute_in_update_task       = 'X'
   EXCEPTIONS
     address_not_exist            = 1
     person_not_exist             = 2
     address_number_missing       = 3
     reference_missing            = 4
     internal_error               = 5
     database_error               = 6
     parameter_error              = 7
     OTHERS                       = 8.
  IF sy-subrc = 0.
    COMMIT WORK.
  ENDIF.
*IF sy-subrc <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks,
Raj
Edited by: rajatg on Sep 23, 2009 6:47 PM

Hi All, We are trying to update the email address of the vendor and for this we have written the following code... but somehow it's not working.. I went to FK03 but the email address is still the old one... can you please suggest if I am missing something:
DATA:  ls_adr6             TYPE  adr6,
      lt_adr6              TYPE TABLE OF adr6 WITH HEADER LINE,
       lv_returncode LIKE szad_field-returncode,
       it_error            TYPE TABLE OF addr_error WITH HEADER LINE,
       lt_adsuse LIKE adsuse OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS: w_addr FOR ls_adr6-addrnumber.
lt_adr6-client = sy-mandt.
lt_adr6-addrnumber = w_addr-low.
lt_adr6-date_from  = '00010101'.
lt_adr6-consnumber = '001'.
lt_adr6-flgdefault = 'X'.
lt_adr6-home_flag = 'X'.
lt_adr6-smtp_addr = 'test.yahoo.com'.
lt_adr6-smtp_srch = 'TEST.YAHOO.COM'.
APPEND lt_adr6 TO lt_adr6.
*lt_adsuse-consnumber = '001'.
*lt_adsuse-comm_usage = 'AD_DEFAULT'.
*lt_adsuse-def_usage = 'X'.
*lt_adsuse-updateflag = 'U'.
*APPEND lt_adsuse.
CALL FUNCTION 'ADDR_COMM_MAINTAIN'
  EXPORTING
    address_number    = w_addr-low
    table_type        = 'ADSMTP'
  IMPORTING
    returncode        = lv_returncode
  TABLES
    comm_table        = lt_adr6                             "*660i
    error_table       = it_error
*    it_usage          = lt_adsuse                           "*981i
  EXCEPTIONS
    parameter_error   = 01
    address_not_exist = 02
    internal_error    = 03.
IF sy-subrc = 0.
  WRITE: 'COMM_MAINTAIN successful?'.
   CALL FUNCTION 'ADDR_MEMORY_SAVE'
* EXPORTING
*   EXECUTE_IN_UPDATE_TASK       = ' '
   EXCEPTIONS
     address_number_missing       = 1
     person_number_missing        = 2
     internal_error               = 3
     database_error               = 4
     reference_missing            = 5
     OTHERS                       = 6
  IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'ADDR_MEMORY_CLEAR'
* EXPORTING
*   FORCE                    = ' '
   EXCEPTIONS
     unsaved_data_exist       = 1
     internal_error           = 2
     OTHERS                   = 3
  IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'ADDR_SINGLE_SAVE'
    EXPORTING
      address_number               = w_addr-low
*   PERSON_NUMBER                = '22280'
*   ADDRESS_TYPE                 = 1
     execute_in_update_task       = 'X'
   EXCEPTIONS
     address_not_exist            = 1
     person_not_exist             = 2
     address_number_missing       = 3
     reference_missing            = 4
     internal_error               = 5
     database_error               = 6
     parameter_error              = 7
     OTHERS                       = 8.
  IF sy-subrc = 0.
    COMMIT WORK.
  ENDIF.
*IF sy-subrc <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: rajatg on Sep 23, 2009 7:00 PM
Edited by: rajatg on Sep 23, 2009 7:01 PM

Similar Messages

  • HT5312 forgot answers for security questions, my apple account has updated email address but the rescue email address  for account is old and not accessible - do not know how to update that address so i can authorize new devices...

    forgot answers for security questions, my apple account has updated email address but the rescue email address  for account is old and not accessible - do not know how to update that address so i can authorize new devices...

    Welcome to the Apple Community.
    Start here (change country if necessary) and navigate to 'Password and Security', reset your security questions using the link provided, you will receive an email to your rescue address, use the link in the email and reset your security questions.
    If that doesn't help, you don't receive a reset email or you don't have a rescue address, you should contact AppleCare who will initially try to assist you with a reset email or if unsuccessful will pass you to the security team to reset your security questions for you.
    If you are in a region that doesn't have international telephone support try contacting Apple throughiTunes Store Support.

  • When i first typed my email address for the apple id i made a mistake

    When i first typed my email address for the apple id i made a mistake and now i can't update apps 'cause that wrong id appears, i can neither erase it,how can i solve it? Thanks

    Go here > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Manage your Apple ID. You will need to sign in with the typo email and then you can change it.
    If you don't know the typo email you can use the link to start over with a new Apple ID
    Hope that halps

  • Apple ID Email address, for the "up to date" request

    I entered my wrong Apple ID Email address, for the "up to date" request. How can I change that?

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > store, scroll down and tap your ID)

  • I recently had to change my email address for the Apple ID and now when the App store comes up it still asks has my old email address and no password will work.  What should I taccepts it all fine as does facetime.  Help?

    I recently changed my email address for the Apple Id and it was accepted but now when the App store comes up it still shows my old email address and no password will work.  iCloud and Facetime are fine.  Don't know why it stays there or how to alter it.

    1. Sign out of old ID
    2. Sign in with new ID
    Settings>AppStore>Apple ID

  • How can I get the last updated email address of the customer ??

    Dear All,
    Please let me know, How can I get the last updated email address of the customer ??
    Also, I am trying to read CDHDR table where OBJECTCLAS is ADRESSE, however what value should be passed into OBJECTID field, looks like it is ADRNR with a Suffix BP.
    Please confirm me what value should be passed into OBJECTID field.
    Thank you.
    Anitha

    Hi Anitha,
      Check if this is something that helps you:
    Change documents in BAS
    CDHDR
    address type 1
    objectclass = ADRESSE             
    objectid = addrgroup + addrnumber     (ADRC-ADDR_GROUP + ADDRNNUMBER) !!
                     'BP  000xxxxxx'
    private address (address type 2)
    objectclass = ADRESSE2
    objectid =  'BP  000xxxxxx000yyyyyyy'   
                            persnumber+adrnr private
    address type 3
    objectclass = ADRESSE3
    objectid =  'BP  000xxxxxx000zzzzzzz'
                              persnumber +comp.address
    The above details is from the link: http://wiki.sdn.sap.com/wiki/display/ERPLO/LO-MD-BP
    Regards,
    Swarna Munukoti

  • HT2486 How do I remove the grey "contact" selection highlight?  This contact always appears as the email address for the group I want to send to.

    How do I remove the grey "contact" selection highlight?  This contact always appears as the email address for the address book group I want to send to.

    The group is "undisclosed" there are 6 contacts in the group. The contacts are listed in 2nd column entitled "name", one of these contacts remains highlighted or selected in grey. I can't remove the grey selection of the contact.   When you select the "undisclosed" group as the "to" address the contact highlighted in grey appears in the email address box.  The group name should appear in the email box, but it doesn't.  This began to happen after I upgraded to IOS 10.6.8.  However I'm not sure that has anything to do with the problem?  I do not have "show all member addresses selected."  Your help is appreciated.

  • Hey People! My apple id has been hacked and there was changed an email address for the apple id! so now i don't know which email it is! Please help!

    My apple id has been hacked and there was changed an email address for the apple id! so now i don't know which email it is! Please help! There was bought for 50+ $ !

    just try to make a new apple id with the same name. because the hacker change the email, so your apple id before is not active or not use.

  • Need to update email address for icloud

    I cannot figure out how to update my email address for icloud

    If your phone is signed into an old iCloud ID and you are trying to change it to a newer version of the ID, do the following:
    If you are using iMessage and FaceTime, make sure you are signed into these services with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iPhone and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iPhone when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • If I create a new Apple ID, will my mail automatically change to the new email address For the new id?

    Also will the apps that I have not bought with my money from App Store but just downloaded, can I still upgrade them? And what about if I have some music  and apps which were not brought from my iPhone 5c which I am currently using, but from my old iPhone 3GS from another Apple ID , will they be transferred again like they did before onto my 5c?
    Thanks

    I set up FaceTime and Messages on four different devices with only one Apple ID. I used the exact method that is described in the video that AnaMusic has provided to you in the link in her response above.  That method worked fine for my family, but you can create new Apple ID's just to use for FaceTime and Messages if you like. Many users prefer doing that as opposed to adding new email addresses.
    IMO - using unique email addresses (like in the video) makes sense, because we (my family) all have different email addresses anyway, and it was very simple to add each family members email address to both apps and remove my Apple ID email address as the contact address on each device.
    BTW .... if you are using your Apple ID on both devices - your phone number should be the number that is showing in the settings - not you daughter's. Did you set up the Apps with your Apple ID?

  • Can i send to multiple email addresses for the same contact

    I coach a baseball team and I want to create contacts under the kids' names with email addresses for both parents listed.  Can I send email to multiple email addresses listed inside the same contact?  I hope this makes sense.
    Thanks!

    You can do it individually, but it can also be done with Groups in Contacts, but you will need to create two or more groups. Once you have created the Groups in Contacts, drag the contacts that have multiple email addresses into each group. Then, select Edit Distribution List… from the Edit menu in Contacts.
    For each group, select one address or the other for each contact. Do the same for the other group.
    When you address an email, add both Groups to the address field in Mail.

  • Managing multiple email addresses for the same contact

    Hi
    I have set up a group so I can email multiple people at once using the usual method. However, when I put the 'xx group' in the Bcc, it mails them fine, but where I have more than one address for the contact, it picks one without asking me.
    How do I set it so it always chooses a certain (main) address? For one, it sent it one of two addresses I had listed as 'home', on another it sent it to an address I had listed as 'work'.
    They also appeared in different positions on the card, e.g. it is not sending tit to the first one it sees on the card.
    Any thoughts?
    Thanks
    Mark

    found the answer somewhere else:
    When sending a message to a Group and a Group member (or members) has multiple email addresses, the following was copied from Address Book Help.
    Choose Edit > Edit Distribution List.
    Select the group whose addresses you want to manage.
    Click the pop-up menu (column header) to choose which type of information you want to manage—phone number, email address, or street address.
    Select the address or phone number you want to use for each member with multiple addresses or phone numbers.

  • Can I use a different email address for the forums than my Apple ID?

    Hi,
    I generally use a particular email address for all my computer/IT forum questions.  This email address is different than my Apple ID email address.
    Can I change my forum email address (doesn't look that way) without changing my Apple ID address?
    Thanks,
    Scott

    Fair warning... years ago I went with my work email address as my Apple ID. Now, with the advent of iCloud and all the other 'services' attached to your Apple ID, I find that half the time I cannot log into any one particular service. Apple's servers and ID system is getting way too messy. Keep it as simple as you can. If you add a different email address you are pretty much guaranteed that things will get more complicated.
    These days, to log into these forums I actually have to log into Apple Store first. The discussion log in page will not allow me to log in any longer.
    Keep it simple!
    Rick

  • I have an iPhone 4 and an iPod 4th gen linked to the same email address and apple ID. I am trying to set up a new email address for the iPod so a family member can use it but it doesn't want to recognize the new email account. Where am I going wrong?

    I have an iPhone 4 and a 4th gen iPod linked to the same email address and apple ID. I am trying to change the email address on the iPod so a family member can use it but when I do it says it doesn't recognize the email address. Where am I going wrong ? I just want them to be able to iMessage and email without having to use my email address.

    The procedure is Settings>Messages>Send & Receive at>You can be reached by iMessages at>Add another email address. The email address has to be a valid working email address, obviously. Apple should verify the email address and you have to go to the inbox of that email account, read the verification email from Apple and follow the inductions in the email in order to complete the verification. Then you go back to the settings, uncheck your email address and check the new email address to be used as the contact email address.

  • Somehow I have two sign-in email addresses for the same iTunes account. How can I fix?

    I believe it started with Mobile me, but not sure. I have apps that I've downloaded using an old sign-in email address and apps that I've downloaded (to the same Mac) using the newer sign-in email. I can access iTunes with the newer address. But I often get prompted to input my old sign-in email address (and old password) when upgrading certain apps. It's very annoying. And now I've moved all my files to a new computer and it won't allow my apps from the old sing-in to sync without authorizing the computer first  (which it already is, but isn't recognizing as much with the old email address...).
    Help.

    I suspect what you have ended up with is two AppleIDs/accounts.  You cannot merge content.  Decide which one you want to use and use that one for future purchases.  For previous purchases you will have to make sure the other one is kept updated in terms of contact information and you will have to use it to access its content.

Maybe you are looking for