Change of email in customer master

I want to make all the email address for customer in customer master as blank.I am using an bapi sd_customer_maintain_all to make email blank.While running the report it returns with error message for sy-subrc as 22 for camerror any idea what exactly it all about.
REPORT  zvr000_stlcustomer_emailchange.
TABLES: kna1,adr6.
TYPES: BEGIN OF addr,
      addrnumber TYPE adr6-addrnumber,
      smtp_addr  TYPE adr6-smtp_addr,
      persnumber TYPE adr6-persnumber,
      END OF addr,
      BEGIN OF cust,
          kunnr TYPE kna1-kunnr,
          land1 TYPE land1_gp,
          adrnr  TYPE kna1-adrnr,
          smtp_addr TYPE adr6-smtp_addr,
      END OF cust.
data lv_charr type c value 50.
data lv_kna1 type kna1.
data lv_kna2 type kna1-kunnr.
DATA:  git_adr11 TYPE STANDARD TABLE OF addr,
       gwa_addrr2 LIKE LINE OF git_adr11.
DATA: git_kna11 TYPE STANDARD TABLE OF cust,
gwa_addondata     type          cust_add_on_data,
      gwa_kna1  LIKE LINE OF git_kna11.
         data gwa_addr          type          bapiaddr1.
         data gwa_addr2         type          bapiaddr2.
select-OPTIONS: s_kunnr FOR kna1-kunnr.
Select the customers and address# from kna1
SELECT kunnr land1 adrnr FROM kna1 INTO TABLE git_kna11
  WHERE kunnr IN s_kunnr.
IF git_kna11 IS NOT INITIAL.
LOOP AT git_kna11 INTO gwa_kna1.
lv_kna1-kunnr = gwa_kna1-kunnr.
gwa_addr-e_mail = ''.
gwa_addr2-e_mail = ''.
    gwa_addondata-changed = 'X'.
    gwa_addondata-kunnr = gwa_kna1-kunnr.
    gwa_addr-addr_no = gwa_kna1-adrnr.
gwa_addr2-addr_no = gwa_kna1-adrnr.
    lv_kna1-land1 = gwa_kna1-land1.
    lv_kna1-adrnr = gwa_kna1-adrnr.
  CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
        EXPORTING
          i_kna1                  = lv_kna1
          i_bapiaddr1             = gwa_addr
          i_bapiaddr2             = gwa_addr2
        i_customer_is_consumer  = 'X'
        pi_postflag             = 'X'
        pi_cam_changed          = 'X'
        pi_add_on_data          = gwa_addondata
        IMPORTING
          e_kunnr                 = lv_kna2
         o_kna1                  = kna1
    TABLES
        EXCEPTIONS
          client_error            = 1
          kna1_incomplete         = 2
          knb1_incomplete         = 3
          knb5_incomplete         = 4
          knvv_incomplete         = 5
          kunnr_not_unique        = 6
          sales_area_not_unique   = 7
          sales_area_not_valid    = 8
          insert_update_conflict  = 9
          number_assignment_error = 10
          number_not_in_range     = 11
          number_range_not_extern = 12
          number_range_not_intern = 13
          account_group_not_valid = 14
          parnr_invalid           = 15
          bank_address_invalid    = 16
          tax_data_not_valid      = 17
          no_authority            = 18
          company_code_not_unique = 19
          dunning_data_not_valid  = 20
          knb1_reference_invalid  = 21
          cam_error               = 22
          OTHERS                  = 23.
if sy-subrc = 0.
          concatenate 'Following' gwa_kna1-kunnr 'have been changed to blank'  into  lv_charr separated by space.
          write :/ lv_charr.
      endif.
ENDLOOP.
ENDIF.

Check if this OSS Note number 725938 makes any difference.
[Sd_customer_maintain_all|http://www.mundosap.com/foro/showthread.php?t=15410]

Similar Messages

  • F.27(Statement should be emailed if customer master contains email address)

    Hi All,
    I am working for the tcode f.27. A standard form F140_ACC_STAT_01 is assigned to tcode. Here my requirement is i need to do some changes in the form and output should be in pdf format and statement should be emailed if customer master contains email address.
    Can any body please help me how to send the email if the customer master contains email address.
    Please reply.
    Thanks,
    Nagendra

    Hi Nagendra
    change the customer email address on home and bussiness email field first and then make following changes to function module 'Z_CORR_PROCESS_00002310' or whatever name you  have got , this is working for us, let me know if y ou have any problem, You might have to tweak a code a bit , here we are decide whether to send customer statements to two email or not based on customer group selection
    data: w_output_type(10).  "Output type
       data: w_kunnr like i_kna1-kunnr.
       data: w_ktokd like i_kna1-ktokd.
       data: l_addressdtls type zaddressdtls.
       data: l_atype(1).  " Address type
    DATA: w_mailtxt TYPE finaa-namep VALUE 'ZCITY_STATEMENT_MAIL_BODY'.
    * Variables are imported - set in ZFKORD10_STUD
    * Import variable w_output_type from memory
       clear: w_output_type.
       IMPORT w_output_type FROM MEMORY ID 'ZOUTPUT_TYPE'.
       move 'B' to  l_atype.      "Business e-mail
       if w_output_type = 'EMAIL'. "Email option chosen
         c_finaa-nacha = 'I'.
         c_finaa-tdfaxuser = sy-uname.
          c_finaa-namep = w_mailtxt.
    * Get the Relevant e-mail address
         move I_KNA1-KUNNR to w_kunnr.
         clear: l_addressdtls, c_finaa-intad.
         call function 'Z_GET_CUSTOMER_ADDRESS'
              EXPORTING
                   kunnr                   = w_kunnr
                   atype                   = l_atype  "B Business H Home
              IMPORTING
                   addressdtls             = l_addressdtls
              EXCEPTIONS
                   invalid_customer_number = 1
                   no_customer_partner     = 2
                   invalid_address_type    = 3
                   others                  = 4.
         if sy-subrc eq 0.
           if l_atype = 'H'.  "Home e-mail address
             c_finaa-namep = w_mailtxt.
             c_finaa-intad = l_addressdtls-home_email.
           else.
             c_finaa-namep = w_mailtxt.
             c_finaa-intad = l_addressdtls-business_email.
           endif.
         endif.
         concatenate i_kna1-kunnr
                     'Account statement from City University'
                      into c_itcpo-tdtitle separated by space.
         c_itcpo-tdfaxuser = sy-uname.
         if ( c_finaa-intad is initial            " No email address
              and c_itcpo-tdpreview is initial ). " and not print preview
           c_finaa-nacha = '1'.        "Print output type
           c_itcpo-tdgetotf = 'X'.     "Do not print
           c_itcpo-tdpreview = space.  "No print preview
           c_itcpo-tdnoprev = 'X'.     "No print preview
         endif.
       endif.
    if w_ktokd = 'stud'.
        move 'H' to  l_atype.      "Business e-mail
       if w_output_type = 'EMAIL'. "Email option chosen
         c_finaa-nacha = 'I'.
         c_finaa-tdfaxuser = sy-uname.
         c_finaa-namep = w_mailtxt.
      "Get the Relevant e-mail address
         move I_KNA1-KUNNR to w_kunnr.
         clear: l_addressdtls, c_finaa-intad.
         call function 'Z_GET_CUSTOMER_ADDRESS'
              EXPORTING
                   kunnr                   = w_kunnr
                   atype                   = l_atype  "B Business H Home
              IMPORTING
                   addressdtls             = l_addressdtls
              EXCEPTIONS
                   invalid_customer_number = 1
                   no_customer_partner     = 2
                   invalid_address_type    = 3
                   others                  = 4.
         if sy-subrc eq 0.
           if l_atype = 'H'.  "Home e-mail address
             c_finaa-namep = w_mailtxt.
             c_finaa-intad = l_addressdtls-home_email.
           else.
             c_finaa-namep = w_mailtxt.
             c_finaa-intad = l_addressdtls-business_email.
           endif.
         endif.
         concatenate i_kna1-kunnr
                     'Account statement from City University'
                      into c_itcpo-tdtitle separated by space.
         c_itcpo-tdfaxuser = sy-uname.
         if ( c_finaa-intad is initial            " No email address
              and c_itcpo-tdpreview is initial ). " and not print preview
           c_finaa-nacha = '1'.        "Print output type
           c_itcpo-tdgetotf = 'X'.     "Do not print
           c_itcpo-tdpreview = space.  "No print preview
           c_itcpo-tdnoprev = 'X'.     "No print preview
         endif.
    endif.
    endif.

  • Report for abserving changes made to the customer master and moniter

    Report for abserving changes made to the customer master and moniter and detail
    Please send with t. code.

    Hi Dhari,
    Well the requirement seems very simple but its not as simple as it looks.
    i have an idea not sure whether it gonna work or not. you need to build a history cube as if i understand your requirement then for any selected period you wanna see the change in wage type or pay rate for each employee if any.
    1. pick up an cube that builds on emp transaction data.
    2. add the 0empoyee Md, wage type and pay rate from MD to the cube and fill the cube
    3.so now every day or in scheduled time interval the MD will load and the corresponding the TD will be loaded to the cube.
    4. create a info object say indicator and add it to the cube
    5.while loading the data to the cube everyday in tranformation check if for same employee there is a change or not in the wage type and pay rate. If so set the indicator to 1.
    4.now build one more cube for holding the changed records from this cube and call it say zhrchange
    5. now pull the date, year and related emplyee information for the emplyee to the zhrchange for those with indicator 1.
    6. before the next load happen, rememrbe to set the indicator to 0 before checking the conditoin in the transformation routine , so that only if the conditoin satisfy then only it will be 1 else it will be 0.
    now the cube zhrchange has all the changed records with time stamp and you can base your query on that to get the changed values in specific time period
    hope this helps.

  • Change Message Control for Customer Master data

    Hi Friends,
    I have to choose/populate a message when the user is about to create an already existing customer.
    In SPRO --> Financial Accounting --> Accounts Receivable and Accounts Payable --> Customer Accounts --> Master Data --> Preparations for creating customer master data --> "change message control for customer master data" ...
    OK...
    When u click this it goes into Change View "message control by User" Overview screen wherein u can insert new messages and texts and the type of message ....
    Now .....
    I want to display the 145th message (F4 help of the Message column) ..... it picks up the text "Customer found with same address;check"..... with Online mesasage type 'I' and batch type 'I' and with standard type '-' ..
    I want to have the same message with message types 'E','E', and 'I' respectively.......
    How is this possible (or) what should i do to meet my requirement :-|
    Expecting ur answers
    Thanks in advance ........
    Cheers,
    R.Kripa.

    Hey yes it is not possible (as of now
    I ve met the requirement by just using message statement in the program itself ............
    My requirement is met but still if anyone knows about this do answer / reply
    Thanks
    Cheers,
    R.Kripa.

  • Change history of the customer master

    Hi Gurus, need help.
    We have a customer requirement where a customer was assigned to multiple sales areas before, but the customer assignment to one of the sales areas is deleted.
    Where is the place where we can see the relavant change history for the customer master.
    regards,
    Krishna

    In customer master data, choose environment from Menu bar then select Fields Changes.
    There you will get info related to,
    -All Changes
    -Entries
    -Deletions
    -Field Names
    Similarly for Account Changes, choose environment from Menu bar and select Account changes. And correspondingly based requirement go for All Fields or Senesitive Fields.
    Hope it assist you.
    Thanks & Regards
    JP

  • Changing Reconciliation account in Customer master

    Dear Experts,
    I am trying to change the reconcilation account in a customer master and getting the following error while doing so,
    'Invalid Reconciliation Account, please use 0000140068 or 0000140060
    Message no. Z1013
    Diagnosis
    You have entered the wrong reconciliation account for the customer.
    System Response
    This is forbidden.
    Procedure
    For inter company vendors, use 140060.
    For domestic vendors, use 140000.'
    Any input on how to resolve it?
    Regards
    Paul

    Hi Paul,
    The error message is a customised one ('Z'), so it is due to a validation that has been set up in your system, probably via a user exit. Via SMOD, take a look in enhancement SAPMF02D (EXIT_SAPMF02D_001); that's possibly where the validation is happening. If the validation is incorrect it may need to be changed or disabled.
    On the other hand, maybe you should just follow the instructions in the error message and use one of the accounts suggested.
    Regards,
    Marc

  • How to change pricelist type in customer master

    hi gurus,
    plz tel me any bapi or function module is there to chnage new pricelist type in customer master for a perticular sales area.

    Hello Rudi,
    This issue happens usually when the 'Business Area Financial Statement' indicator has been enabled in customizing. Hence, in your case, for changing of business area > use ABUMN to transfer from existing asset to a new asset master with new business area.
    Kind regards,
    John Chin

  • Cannot change recon. account in customer master

    hi,
    after i create customer master, i want to change recon. account, but cannot , this field display only. Anything i missing? thanks

    Dear jo jo
    Just go to XD02, enter the customer code and choose "Company Code Data".  Now in "Account management" tab, you can change the said field as you wish.
    Incidentally, why are you changing this??  Normally, this is linked with customer account group like exports, domestic etc. and hence, b4 making any changes, check with your FI people.
    Thanks
    G. Lakshmipathi

  • Display changes for classification in customer master data

    Dear Experts,
    In Customer master data, FD03, we have additional classification (Extras - Classification).
    My question is, if we changed the classification in master data, how to know when the display changes of the classification?
    I have checked through tcode FD04 but no display changes found of classifications.
    Kindly advice.
    Thank you

    Hi Suhas,
    Thanks for your reply.
    I have checked but environment-doc changes is grey.
    I thougt its a authorization issue but after checked from /nsu53, my authorization is already completed.
    Kindly advice.
    Thank you

  • How to change the field sequence in Customer master record.

    Dear Friends,
    We are required to chage the sequence of customer master record fields that are available under different tabs of 'General Data', 'Company Code Data' and Sales Area Data.
    Our client requirement is to place all mandatory fields in the first screen of customer master record. Here the intention is to save the user time instead going and clicking multiple tabs/screens to fill information on only one or two tabs. Please suggest us the availabe solution in SAP for this requirement.
    Thank you
    Raghu Ram.

    Hi
    Step 1: Take help of a FI guy and:
    The fields can be suppressed by configuring through Financial accounting > Business Partners > Customers > Account groups.
    Step2 : The challenge inyou project is to have a single tab with the allowed fields
    A technical guy can only help you out on this . Again This would be a huge effort since first you need to change the code for customer master. As customer master is a source of data for various documents in SD , at each place you will have to do changes in th code...I don't think it is feasible.
    Instead of doing this , create an external interface for transferring the value to SAP through BAPI. this would involve integration and may be as per defined SAP standards you can use CSV files or XML files for the integration process.
    This would be a better option than fiddling with SAP system
    Regards
    Nikhil

  • Mass change in Vendor & Customer Master

    Hi All,
    Is there any Mass change available in Vendor & Customer Master?
    Thanks
    Pankaj Garg

    Hi,
    Enter t-code MASS.
    Enter object as per below mention detail
    KNA1: -Customers
    LFA1: - Vendors
    Then click on execute button, You can see the list of fields for vendor & customer master.
    Select field as per your requirement and click on execute button then change data as per your requirement.
    Regards,
    Mahesh Wagh

  • Address change in customer master

    Hi Experts,
    I have cretaed sales order and processed it with one customer.Created Delivery and posted goods issue.
    After that I have changed the address of the customer and noticed that the adress is changed in the processed order also.
    I would to like to know what is base intension of this.
    Please help me out
    Thank you
    Regards,
    Nagi Reddy

    Dear Nagi,
    All Customer Address are stored in a central table - ADRC.
    Infact this ADRC is the Master Table of all addresses in system (It is used for addresses of Customer, Vendors, other Business Partner, etc)
    So any change you make in Customer Master Record in XD02 / VD02 it would change the entry in the ADRC & would show this effect in all the past documents also (like Sales Orders / Deliveries, etc).
    This is SAP standard & you cannot change it.
    Address details are only exception here. Rest all other data like payment terms, Condition record data are document specific. Meaning once the Document is created & saved any change in the Master Record would not impact the aleready processed documents.
    Alternatively you can change the Customer Address while processing Sales Order:
    VA02 - Double Click on Customer code & you will go to Header - partner screen.
    Here once again click on required Partner code & you will go to Address screen. Here you can change the address (which is proposed from Customer Master record). This address change in Sales Order would be applicable only for the particular Sales Order & its subsequent documents. The Master Record would not be changed.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • Change in Sales Order/Service Order is updating customer master data

    Hello Experts,
    Here is the change happening in CUSTOMER MASTER RECORD for very few number of cases. This we are not able to replicate, since not able to find out, in which cases it is happening.
    Scenario:
    When the user tries to change address in customer screen (For eg., NAME2,NAME3 ,NAME4 etc.) of change transactions (VA02 OR IW32), the same change is being reflected or updated in the customer master record.
    Note : We tried again doing the change(For the already changed order) in change transactions (VA02 OR IW32) and found that the change was not updating customer master, this time.
    Hence, not able to replicate. Kindly suggest.
    Resolvable suggestion would be highly appreciable.
    Regards
    Mahesh

    I never heard of this before. Per standard, only when customer master address is changed (master data), the changes will reflect in the documents (transactional data). Your scenario reflects the other way round. Hence you may need to debug the program SAPMV45A and see any enhancement is causing this.
    Regards,

  • Change of recon acct for Customer master

    Hi,
    As per my information we can change recon acct for customer master.
    but what are the post change activity to not to affect any report (BS, P&L or Aging report)
    Regards,
    Pankaj

    Hi
    Please check the below link
    http://www.sap-img.com/zf015.htm
    Thanks & Regards
    Phaneendra

  • How to fill the KNBW Customer master record (withholding tax types) in IDOC

    Hi experts,
    The creation of a new customer (intern) with idoc has status 51 with error : No batch input data for screen SAPMF02D 0610. When à use the WE19 transaction, in background step by step, the batch-input stops in withholding tax types. But those informations aren't compulsory and not filled!
    1 - Why did the idoc stops in this step of the batch?
    2 - If i had to fill those informations, i don't find a segment in the DEBMAS01 or DEBMAS05 to fill the informations. Should i create an new segment?
    Thanks à lot for you responses.
    Wail

    Hi
    Step 1: Take help of a FI guy and:
    The fields can be suppressed by configuring through Financial accounting > Business Partners > Customers > Account groups.
    Step2 : The challenge inyou project is to have a single tab with the allowed fields
    A technical guy can only help you out on this . Again This would be a huge effort since first you need to change the code for customer master. As customer master is a source of data for various documents in SD , at each place you will have to do changes in th code...I don't think it is feasible.
    Instead of doing this , create an external interface for transferring the value to SAP through BAPI. this would involve integration and may be as per defined SAP standards you can use CSV files or XML files for the integration process.
    This would be a better option than fiddling with SAP system
    Regards
    Nikhil

Maybe you are looking for

  • Hp 9800 on win 7 network can't find driver on win xp

    I have an HP9800 connected on a  Win 7 network. I can see it from a Win XP machine (add new printer / networked) but when trying to install I'm asked for drivers from H:\WDM (H is the optical drive on the XP machine) I tried redirecting to both the i

  • How to restrict access of data in Infocube

    Hi BW Experts, We got HR project and we loaded the Data from Flat File. We developed reports as per their requirement. As per some condtions, we should not see the HR Data in Infocube as well as in Report. We are having only one role which has all au

  • ACL Best Practice - On the Internet interface

    I have a question relating to ACL's on a routers 'Internet' facing interface. Further to reading several whitepapers on the topic, a recommended ACL would typically contain the following statements. In addition, the Cisco SDM automatically generates

  • From MacBook to TV

    Hi all, I've seen at least ten different cables at the online Apple Store. And I don't want to buy the wrong one... I'd like to connect my MacBook to a TV to show my audience a Keynote. What do I have to buy? Thanks, Antonio

  • Installed 4 today, cannot copy and paste to MS Word

    I get an error message when I try to copy from another site and paste to ms word, then it closes word, I tried it several times with the same result. I never had this problem before installing 4 today.