Email to all vendors

Hi All,
May you please help me on this one i'm trying to write a report that sends e-mail to all vendors each statement separately.
Thanks,
Fred.

Hi
For getting a line feed in the xls attachment we have to concatenate a Hexadecimal charecter say '09' for each line.
so that the sap system will find that the line will end at that point.
check the following code.
vrifier qu'une adresse a t rentre
CHECK NOT s_execut IS INITIAL.
Zone objet du mail
CLEAR str_docdata.
str_docdata-obj_name = text-m01.
str_docdata-obj_descr = text-m03.
Alim table des destinataires
LOOP AT s_execut.
tbl_dest-rec_type = 'U'.
tbl_dest-receiver = s_execut-low.
APPEND tbl_dest.
CLEAR tbl_dest.
ENDLOOP.
Alim tbl_text pour corps du mail
"ne pas rpondre"
CLEAR tbl_text.
REFRESH tbl_text.
tbl_text-line = text-m02.
APPEND tbl_text.
CLEAR tbl_text.
saut de ligne
APPEND tbl_text.
BEG OF DEL <D10K990893>
nb de lignes lues / en anomalie / qui seront dans le corps du texte
WRITE p_filpar TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE p_filali TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE p_recycl TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr2 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE w_enr_10 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr3 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE w_enr_20 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr4 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
BEG OF DEL <D10K990893>
BEG OF INS <D10K990893>
WRITE w_enr_10 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr3 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE w_enr_30 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr4 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
IF NOT tbl_mat_creat[] IS INITIAL.
MOVE text-cr6 TO tbl_text-line.
APPEND tbl_text.
CLEAR tbl_text.
LOOP AT tbl_mat_creat.
MOVE tbl_mat_creat TO tbl_text-line.
APPEND tbl_text.
CLEAR tbl_text.
ENDLOOP.
ENDIF.
WRITE w_enr_40 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr7 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
IF NOT tbl_mat_modif[] IS INITIAL.
MOVE text-cr8 TO tbl_text-line.
APPEND tbl_text.
CLEAR tbl_text.
LOOP AT tbl_mat_modif.
MOVE tbl_mat_modif TO tbl_text-line.
APPEND tbl_text.
CLEAR tbl_text.
ENDLOOP.
ENDIF.
WRITE w_enr_20 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr9 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
WRITE w_enr_50 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
IF tbl_text-line IS INITIAL.
tbl_text-line = '0'.
ENDIF.
CONCATENATE text-cr1 tbl_text-line INTO tbl_text-line
SEPARATED BY space.
APPEND tbl_text.
CLEAR tbl_text.
END OF INS <D10K990893>
APPEND tbl_text.
WRITE text-cr5 TO tbl_text-line NO-ZERO LEFT-JUSTIFIED.
APPEND tbl_text.
CLEAR tbl_text.
CLEAR w_lines.
DESCRIBE TABLE tbl_text LINES w_lines.
CLEAR tbl_pack.
REFRESH tbl_pack.
tbl_pack-head_start = 1.
tbl_pack-head_num = 0.
tbl_pack-body_start = 1.
tbl_pack-body_num = w_lines.
tbl_pack-doc_type = 'RAW'.
tbl_pack-obj_name = text-m01. "Program name
tbl_pack-doc_size = ( w_lines - 1 ) * 255 + STRLEN( tbl_text-line ).
APPEND tbl_pack.
Alim tbl_text pour pice jointe
- en-tte des colonnes
CLEAR tbl_text.
CONCATENATE text-ti1 text-ti2
text-ti3 text-ti5
text-ti4 kst_retours
INTO tbl_text-line SEPARATED BY ';'.
APPEND tbl_text.
contenu des colonnes
LOOP AT tbl_compte_rendu.
CLEAR tbl_text.
CONDENSE tbl_compte_rendu-text1.
CONCATENATE tbl_compte_rendu-text1
tbl_compte_rendu-text2
tbl_compte_rendu-text3
tbl_compte_rendu-text4
tbl_compte_rendu-text5
tbl_compte_rendu-text6
kst_retours
INTO tbl_text-line SEPARATED BY ';'.
CONDENSE tbl_text.
APPEND tbl_text.
ENDLOOP.
DESCRIBE TABLE tbl_text LINES w_lines2.
CLEAR tbl_pack.
tbl_pack-head_start = 1.
tbl_pack-head_num = 0.
tbl_pack-body_start = w_lines + 1.
tbl_pack-body_num = w_lines + w_lines2.
tbl_pack-doc_type = 'CSV'.
tbl_pack-obj_name = text-m07.
tbl_pack-obj_descr = text-m08.
tbl_pack-doc_size = ( w_lines2 - 1 ) * 255
+ STRLEN( tbl_text-line ).
APPEND tbl_pack.
Envoi du mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = str_docdata
put_in_outbox = space
commit_work = 'X'
TABLES
packing_list = tbl_pack
contents_txt = tbl_text
receivers = tbl_dest
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm

Similar Messages

  • Email upload in vendor master change

    Hi all,
    I have to do emails upload in vendor master change but when i do through shdb recording i am not able to see the communication screen to enter the values. Can any one of you please guide me step by step.
    Thanks & regards,
    Kumar

    Hi,
    you have to use table BAPICOMREM. Just go to one testing customer and add email address with note to this customer. Then go to SE37 and call BAPI BAPI_ADDRESSORG_GETDETAIL. This BAPI has same structure as BAPI_ADDRESSORG_CHANGE. Hence you will see how you have to fill all structures to change email address and also note.
    Cheers

  • How to add email option for vendor.

    Hello all,
    I looked for adding an email to the vendor in xk01, but there was no option of email field. I want to post FCEM output to test whther the output working fine thorugh email.
    Plz advice.

    Hi,
    If you are using sap delivered vendor account group, system defualt shows email address in vendor master data.
    In address tab, communication segment you can see the vendor email address.
    Or Goto OMSG t.code choose vendor account group, double click on general data.
    double click on communication, check the Internet mail address field and save.
    Regards,
    Chandra

  • Mass update of email in the vendor master record

    Hello to you all,
    Does anyone know how can I run mass update of email in the vendor master record for a big No. of entities?
    XK99 won't help since you can't find the email,
    Batch input recording won't help as well since the email can't be found.
    I will appreciate your help,
    Amir

    Hello Amir,
    You can use LSMW for update operation. You should create a batch input recording for transaction FK02. But you must tick "Use central address management" checkbox on FK02 screen while recording batch input. After that you will see E-mail field on screen.
    Regards,
    Burak

  • Email alert to Vendors

    Hi All,
    I have a situation where I would like to send email alert to vendors everytime a liability entry is posted to the vendor account - email ID would be maintained in the vendor master.
    Wanted to know if this is possible in standard SAP - if yes, what are the pre-requisites?
    It would be nice if someone can share documentation / knowhow regarding this.
    Thanks in advance.
    Pinaki

    Hi,
    The setting which is required by you is not part of standard SAP.
    For doing this you will have to write a ABAP programme.
    You can use corrospondance function but in that manual work is more.
    Thanks & Regards,
    Abhijit Sonar

  • Vendor report that shows all vendors missing tax id information

    I would like to create a report that shows all vendors that are missing the tax id information.  Please direct me on where to go.
    thx
    Trace

    Dear,
    Enter T-code MASS.
    Select Object Type LFA1 and click on execute button.
    Than click on Fields tab, Find your required field and click on execute button.
    Than enter vendor list for which you want to find out the list.
    And click on execute button.
    Regards,
    Mahesh Wagh.

  • Vendor Aging Report to show zero balance does not show all vendors

    Hi all,
    I would like to see a list of all my vendors in the Vendor Aging Report. I clicked on show vendors with zero balance, however, I still only get a partial list of the vendors. Is there a setting I need to set to show all the vendors? Any advice would be appreciated.
    Thank you!
    Jane

    Hi,
    I think your requirement is you want all vendors displayed irrespective of the transactions entered for that Business Partner.
    The Aging Report will display only those BPs which have transactions posted to them.
    The function of 'Display Vendors with zero balance' checkbox is that it behaves like a selection creteria and leads to inclusion
    of all those Business Partners who do not have a balance as of the current date but had a balance on the selected backdate.
    example :
    If a vendor has a balance as on 01.08.08 and is paid on 10.08.08, then the vendor will not be included in aging report (when run on 01.08.08) unless "Include Vendors with zero balance" is checked.
    This checkbox does not allow you to display all the vendors created in the database.
    Regards,
    Jitin
    SAP Business One Forum Team

  • Assigning custom,stamp duty,custom clearing agent conditions by all Vendor

    well i have create above condition i want to assing all this with the all vendor. ie custom duty must go to commissioner vendor, custom clearing charges must go to C & F agent.
    example
    particular            condition type vendor
    basic duty           xxxx                 123
    2%                      xxx1                 123
    1%                      xxx2                 123
    C & F                  vvvv                 324
    Regard
    nabil

    hI,
    You can assign this in PO, when u give the condition type say customs, there you can mention the vendor to which charges refer to.
    Path: Me21ncondition-condition detail---vendor in changeable mode, keep the customs vendor thre...
    Thanks
    Abdul Raheem

  • Dunning Letter Email for all customers

    Hi All, I need your help in my requirement, which goes like this :- In F150 tcode(ecc 6.0), which internally uses RFMAHN20 program to display all customer accounts, we can select a customer and see the dunning letter(It's a sapscript) and also take a printout. I made some changes accordingly to add the email functionality so when user checks the print preview then a pop up promts for email address( which has default value of email address assoicated with that particular customer) and send pdf letter accordingly. But my requirement is to send email to all customers who may be selected via RFMAHN20( they may be all customers who belong to the same account type). How can we achieve this in the most easy way? I already copied standard FM's associated. So can I do something in them to resolve this or any separate program is needed( if so, how?)? Please respond asap. Thank you so much...in advance

    Hi Husain...Thanks for immediate response. There is already data being pulled by standard function modules like PRINT_DUNNING_NOTICE(copied into Z). Can we use that in simpler way(without the need of any new driver program with all the data population again)? And your answer is correct which I already thought earlier and kept it as a last resort, because I need to populate all the data again, convert spool to pdf and send pdf's to all selected customers And one more thing is that the requirement is to schedule a background job which takes care of sending all the emails . So any more ideas?

  • How can I sync my various email accounts into an iCloud account.  Example.  I have an embarqmail.account.  How can I get it to sync with iPhone, iPad, iMac so that I don't have to read or review eMails on all 3 devices.  Thanks

    How can I sync my various email accounts into an iCloud account.  Example.  I have an embarqmail.account.  How can I get it to sync with iPhone, iPad, iMac so that I don't have to read or review eMails on all 3 devices.  Thanks

    You need OSX 10.7.2 or higher in order to access icloud.  The mobile me account is now defunct (it closed down more than a year ago).

  • I have an ipad 2 and I noticed I have over 3000 emails in All Mail. I want to know how can I delete these emails. It looks like you can only do it one at a time. It will take me forever. Please help me.

    I have an ipad 2 and I noticed I have over 3000 emails in All Mail. I want to know how can I delete these emails. It looks like you can only do it one at a time. It will take me forever. Please help me.

    You can only delete them one at a time on the iPad. If you have an IMAP email account, go to your email in on the server using a web browser and select as many as you can at a time and delete them that way. That action will be reflected on the iPad. In IMAP - whatever you do on one device syncs across all devices. If you have POP email - start deleting one at a time.

  • How do i send emails to all email accounts in a group?

    I have multiple email addresses for contacts that are in a group.  It seems I can only select one of the emails to use per distribution.  I want to send the email to all accounts listed for the contact.  Is this possible?  I dont want to have to go and create multiple contacts for each individual. 

    Hi, have you tried dragging the Group to the BCC: field?
    Many mail servers have a limit though, like 50 or so.

  • Can no longer access .me email on all devices. What did I do wrong?

    I can no longer receive an email on my iphone if the message has been received by outlook on my PC. The message finds outlook and is no longer pushing to my iphone and iCloud online email.
    I cannot figure out what I did to disrupt this behavior as this is the way it's always worked.
    Using outlook 2007 on PC
    Apple iCloud
    @me.com email account
    iPhone
    (before this started happening, I did delete this account in Outlook and reinstalled)
    This has caused many other problems that annoy me but this is a deal breaker.  I need to have all email across all devices.
    I've searched high and low for server / message behavior in all settings of all devices.
    Please help.
    Thanks,
    AJM

    You need to save to the camera roll of the iPad, not the Movies app.
    So you will need to save the videos to the iPad via the Photos Tab.
    If you can see the video in the photos app then iMovie can see them.
    If you can see the videos in the movies app then iMovie cannot (Movies is for copyright movies so iMovie does not look there).
    There are a few threadson here that have the same question as yours.
    You can have a look at them.

  • I am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unable to do so with my iMac. This problem started suddenly and the error message i get is error 5.7.8. Please Help

    I  am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unablesend any email with my iMac ( i can recieve email) . This problem started suddenly and the error message i get is error 5.7.8. I have read the threads on line and went into settings, even created a new profile, nothing helps...Please advice..is this something to do with my keychain Access?

    As Outlook is not an Apple product, you will find more helpers familiar with Outlook here:
    Office for Mac forums

  • In need of a report that will list all vendors for all parts in our plant.

    Can anyone tell me if there is a report in SAP that we can use to list all suppliers for a given material? We are operating in SAP ECC6.0 and need a report that will list all vendors that the company has used for a given part. Is there a standard report in SAP that pulls information from purchasing info records?  Woud this be  a custom report?     I have tried using MCE3. 
    Also does anybody know of any SAP consultants that can help us create custom reports

    For the list of vendors for the material - Me03 if source list is maintained
    For list of vendors with info record - Me1m
    For list of vendors with PO - Me2l
    If you can give the correct requirements then your Technical consultant will develop a report in the required format.

Maybe you are looking for

  • How do I retrieve temporary internet files?

    I am having a problem finding and retrieving the temporary internet files that are stored. I went to about:cache and found the file I need, but when I click on it, it isn't retrieved. Rather, it opens what looks like the hex source for the file. How

  • Smartform print out orginal and duplicate

    Hi, Can any one tell how to obtain orginal and duplicate copy in smartform for the single invoice ie 2 copies one original and duplicate. And in printout it has to print orignal and in another  copy

  • Pro 7.2.3 crashes with korg microkontrol

    Please excuse newbie gaffs... But Logic Pro 7.2.3 crashes when I try to use some factory modes with my Korg microkontrol. >Pots>Instrument Edit, Plug-In Edit, and Plug-In Setting all send it off the rails, other modes work fine. I've installed Pro Ap

  • New MBP... won't accept CD-RW (high speed 24x)

    Can anyone advise why my new MBP won't accept Memorex high speed CD-RWs... (24x) in fact, it's not the high speed issue bcuz I've tried a regular 4x CD-RW and it won't accept it either... The error message is simply, your drive can not red this disk

  • What exactly is "flash" on Droid X ?

    Hello, While I am familiar with flash cards, SD cards, CF cards, I am not sure I understand what "Flash" is (the thing that Apple Steve Jobs insisted that they would not use on their products, a war with Adobe or something), and what it does on the D