Regarding EMAIL in inbox using SO_NEW_DOCUMENT_ATT_SEND_API1
HI all,
I am using SO_NEW_DOCUMENT_ATT_SEND_API1 module to sent emails on external email IDs.Can anyone guide me if this function module also sends email to SAP inbox correspoding to email addrees on which email is sent?
Also guide me how to send doc to sap inbox of these email adrees using SO_NEW_DOCUMENT_ATT_SEND_API1.
Thanks.
Hi,
Yes you can even send mails to the SAp inbox, by simply setting the receiver type as B in the RECEIVERS tables parameter.
Regards
Pavan
Similar Messages
-
Hi,
Actually i want to send a mail ( to a yahoo mail address ) using a report, as i came to know that one has to use the above Function Module i started using it. But i am unable to send an e-mail. the report is getting executed and the return code i am getting is zero and i am getting an object i.d. too. But the recipient is not receiving the mail.
I am attaching my code here. Please help.
Any help in this regard is highly appreciated.
DATA : tab_lines TYPE i.
DATA : var_receiver LIKE sadrud.
EXPORT TO FM
DATA : wa_docu_data LIKE sodocchgi1.
IMPORT FROM FM
DATA : flag_sent_to_all LIKE sonv-flag.
DATA : obj_id LIKE sofolenti1-object_id.
TABLES TO FM
DATA : obj_header LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
DATA : rec_list LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
DATA : obj_txt LIKE solisti1 OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
var_receiver-address = '[email protected]'.
obj_txt-line = 'This is the sent Document'.
APPEND obj_txt.
CLEAR obj_txt.
DESCRIBE TABLE obj_txt LINES tab_lines.
READ TABLE obj_txt INDEX tab_lines.
BREAK-POINT.
wa_docu_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( obj_txt ).
wa_docu_data-obj_name = 'TESTING'.
wa_docu_data-obj_descr = 'This is Test Mail'.
wa_docu_data-proc_type = 'R'.
wa_docu_data-proc_name = 'Z34_MAIL_TEST'.
wa_docu_data-proc_syst = '*'.
wa_docu_data-proc_clint = '*'.
wa_docu_data-to_do_out = 'X'.
wa_docu_data-sensitivity = 'O'.
obj_header-transf_bin = ' '.
obj_header-head_start = 1.
obj_header-head_num = 0.
obj_header-body_start = 1.
obj_header-body_num = tab_lines.
obj_header-doc_type = 'RAW'.
APPEND obj_header.
CLEAR obj_header.
BREAK-POINT.
rec_list-receiver = var_receiver-address.
rec_list-rec_type = 'U'.
rec_list-express = 'X'.
rec_list-com_type = 'INT'.
rec_list-notif_del = 'X'.
APPEND rec_list.
CLEAR rec_list.
BREAK-POINT.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docu_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = flag_sent_to_all
new_object_id = obj_id
TABLES
packing_list = obj_header
OBJECT_HEADER =
CONTENTS_BIN =
contents_txt = obj_txt
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = rec_list
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
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
BREAK-POINT.
WRITE : / , 'Object Created' , obj_id,50 'SENT TO ALL' , flag_sent_to_all.
LOOP AT rec_list.
WRITE :/ , 'status' , rec_list-retrn_code,
/ , 'Sent to' , rec_list-receiver.
ENDLOOP.
Thanks and Regards,
Goutham.Hi,
Thanks for the early Reply.
After executing the program i am getting the output
object created : a number
send to all = 'X'.
status is 0.
After this i am going to transaction : SCOT, where i have given my name in MAIL, and executing the document. after execution the document is placed under error heading.
Now i went to Transaction : SOST, here i see my document with the Message Status :
DEFINITELY cannot transfer message to node EMAIL due to connection error.
What Exactly does this message mean.
Any help in this regard is highly appreciated. -
How to send BULK email into INBOX using ASP
Dear Gurus,
I am using GOMAIL to send newsletter to 2000 of my subscribed
users. but no
one is getting their emai intheir inbox
Only users other than yahoo,hotmail,rediff,gmail are getting
in their inbox
I want to know how can I make sure that users who has hotmail
and yahoo
accounts also get my newsletter into their inbox cos
currently it goes to
their JUNK email or bulk email folder.
I know lots of companies who send newsletter to my HOTMAIL
inbox.
Please suggest as this is very importantYou can send email from javascript in an content editor web part or HTML Form webpart (if someone is doing this interactively in the browser AND they have an email client installed) by changing the current page ref to a mailto: reference.
location.href="mailto:"+emailTo+emailSub+emailBody;
var emailSub = "?subject=xxxxx";
var emailBody = "&body=xxxxx";
That will pop up an email window. Build up the emailTo by using Javascript/JQuery to pick up selected people on the page, or all rows on the page, or use something like SPServices or web service calls to pick up all items in a specific view. Depends totally
on how you want the UI to work. Not sure I'd do this on an external facing SP site since you wouldn't want any emails addresses in the clear to harvest, but inside a company intranet should be fine.
For example, you could read all records in the Supervisors view, build up the emailTo var with the correct addresses or names that your email client needs, then set location.href to the correct mailto: link.
Robin -
Extra emails using SO_NEW_DOCUMENT_ATT_SEND_API1.
Hello,
I have a requirement to send Purchase order email to a group of people besides the vendor.
I set the configuration to send the first email to the vendor and it is working fine.
I would like to use SO_NEW_DOCUMENT_ATT_SEND_API1 to send the SAME EMAIL to a group of persons but I am not sure where to read the information of the already generated email to populate the FM.
I saw some code in the forum to read the form and send it with SO_NEW_DOCUMENT_ATT_SEND_API1, but I could not find where you enter the Purchase Order number to generate the form in base of it.
Could anybody help me to understand how to populate SO_NEW_DOCUMENT_ATT_SEND_API1 with the information of the already generated email?
Thank you.
Monica.Hi Chandra,
Thank you for your answer.
I did a little more research and realized that the email sent is not stored. This takes me to the option of emailing a SAPscript form with my PO.
I found some code in the forum to email a SAPscript but I do see where you enter the PO number or the reference to it.
Do you know?
Monica. -
I created a Message Filter to move email from Inbox to a Local Folder based on Date. The email headers were moved, but not the contents. Since I'm using IMAP, all the emails were deleted from the server.
I searched for similar problems and I followed one suggestion to "repair" one of the target Local Folders, but that made things worse. Now the header information (Subject, From, Date (now set to the date the transfer was done, not the email received date) is all blank.
The Local Folder properties indicate the email is contained in
mailbox:///C:/Users/Ted/AppData/Roaming/Thunderbird/Profiles/c65xcqqf.default/Mail/Local Folders/Archives.sbd/2010
I can see the messages from other Local Folders here, but the ones "moved" are empty.
Should this location be changed?
Is there some way to recover the email contents?
The info below is from the troubleshooting information tool:
Application Basics
Name: Thunderbird
Version: 31.5.0
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
Profile Folder: Show Folder
(Local drive)
Application Build ID: 20150222233048
Enabled Plugins: about:plugins
Build Configuration: about:buildconfig
Memory Use: about:memory
Mail and News Accounts
account2:
INCOMING: account2, , (none) Local Folders, plain, passwordCleartext
account5:
INCOMING: account5, , (imap) imap.googlemail.com:993, SSL, passwordCleartext
OUTGOING: smtp.googlemail.com:465, SSL, passwordCleartext, true
account6:
INCOMING: account6, , (imap) imap-mail.outlook.com:993, SSL, passwordCleartext
OUTGOING: smtp-mail.outlook.com:587, alwaysSTARTTLS, passwordCleartext, true
account7:
INCOMING: account7, , (imap) imap.comcast.net:993, SSL, passwordCleartext
OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
account8:
INCOMING: account8, , (imap) imap.comcast.net:993, SSL, passwordCleartext
OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
account9:
INCOMING: account9, , (imap) imap.comcast.net:993, SSL, passwordCleartext
OUTGOING: smtp.comcast.net:465, SSL, passwordCleartext, true
Crash Reports
Extensions
Lightning, 3.3.3, true, {e2fda1a4-762b-4020-b5ad-a41df1933103}
Manually sort folders, 1.1, true, [email protected]
Important Modified Preferences
Name: Value
browser.cache.disk.capacity: 358400
browser.cache.disk.smart_size_cached_value: 358400
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
extensions.lastAppVersion: 31.5.0
font.internaluseonly.changed: true
font.minimum-size.x-western: 10
font.name.monospace.el: Consolas
font.name.monospace.tr: Consolas
font.name.monospace.x-baltic: Consolas
font.name.monospace.x-central-euro: Consolas
font.name.monospace.x-cyrillic: Consolas
font.name.monospace.x-unicode: Consolas
font.name.monospace.x-western: Consolas
font.name.sans-serif.el: Calibri
font.name.sans-serif.tr: Calibri
font.name.sans-serif.x-baltic: Calibri
font.name.sans-serif.x-central-euro: Calibri
font.name.sans-serif.x-cyrillic: Calibri
font.name.sans-serif.x-unicode: Calibri
font.name.sans-serif.x-western: Calibri
font.name.serif.el: Cambria
font.name.serif.tr: Cambria
font.name.serif.x-baltic: Cambria
font.name.serif.x-central-euro: Cambria
font.name.serif.x-cyrillic: Cambria
font.name.serif.x-unicode: Cambria
font.name.serif.x-western: Cambria
font.size.fixed.el: 14
font.size.fixed.tr: 14
font.size.fixed.x-baltic: 14
font.size.fixed.x-central-euro: 14
font.size.fixed.x-cyrillic: 14
font.size.fixed.x-unicode: 14
font.size.fixed.x-western: 14
font.size.variable.el: 17
font.size.variable.tr: 17
font.size.variable.x-baltic: 17
font.size.variable.x-central-euro: 17
font.size.variable.x-cyrillic: 17
font.size.variable.x-unicode: 17
gfx.direct3d.last_used_feature_level_idx: 0
mail.openMessageBehavior.version: 1
mail.winsearch.enable: true
mail.winsearch.firstRunDone: true
mail.winsearch.global_reindex_time: 1387144538
mailnews.database.global.datastore.id: 11ee7f66-9920-4f7d-9c5e-a83d079bc6e
mailnews.database.global.views.conversation.columns: {"threadCol":{"visible":true,"ordinal":"1"},"flaggedCol":{"visible":true,"ordinal":"3"},"attachmentCol":{"visible":false…
mailnews.database.global.views.global.columns: {"threadCol":{"visible":true,"ordinal":"1"},"flaggedCol":{"visible":true,"ordinal":"3"},"attachmentCol":{"visible":false…
network.cookie.prefsMigrated: true
places.database.lastMaintenance: 1424815462
places.history.expiration.transient_current_max_pages: 104858
plugin.importedState: true
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_bgcolor: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_bgimages: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_colorspace:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_command:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_downloadfonts: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_duplex: 1515870810
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_bottom: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_left: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_right: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_edge_top: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_evenpages: true
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footercenter:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footerleft: &PT
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_footerright: &D
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headercenter:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headerleft: &T
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_headerright: &U
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_in_color: true
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_bottom: 0.5
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_left: 0.5
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_right: 0.5
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_margin_top: 0.5
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_oddpages: true
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_orientation: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_page_delay: 50
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_data: 1
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_height: 11.00
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_name:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_size_type: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_size_unit: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_paper_width: 8.50
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_plex_name:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_resolution: 1515870810
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_resolution_name:
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_reversed: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_scaling: 1.00
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_shrink_to_fit: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_to_file: false
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_bottom: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_left: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_right: 0
print.printer_\\TED-PC\EPSON_Stylus_Photo_RX595_Series.print_unwriteable_margin_top: 0
security.disable_button.openCertManager: false
Graphics
Adapter Description: Intel(R) HD Graphics 4600
Vendor ID: 0x8086
Device ID: 0x0416
Adapter RAM: Unknown
Adapter Drivers: igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32
Driver Version: 10.18.10.3379
Driver Date: 12-18-2013
Direct2D Enabled: true
DirectWrite Enabled: true (6.3.9600.17111)
ClearType Parameters: ClearType parameters not found
WebGL Renderer: false
GPU Accelerated Windows: 2/2 Direct3D 10
AzureCanvasBackend: direct2d
AzureSkiaAccelerated: 0
AzureFallbackCanvasBackend: cairo
AzureContentBackend: direct2d
JavaScript
Incremental GC: 1
Accessibility
Activated: 0
Prevent Accessibility: 0
Library Versions
Expected minimum version
Version in use
NSPR
4.10.6
4.10.6
NSS
3.16.2.3 Basic ECC
3.16.2.3 Basic ECC
NSS Util
3.16.2.3
3.16.2.3
NSS SSL
3.16.2.3 Basic ECC
3.16.2.3 Basic ECC
NSS S/MIME
3.16.2.3 Basic ECC
3.16.2.3 Basic ECCFixed the Trouble Shooting information in previous post.
-
I cannot send emails with pics using the stock email app on my new Droid Turbo, it holds them in the Outbox and won't send even if I move to Inbox and resend
First check to make sure you have data turned on and not just Wi-Fi. From reading your question you seem to be saying e mail is working just not attached photos. What size are the photos as some HD photos can't be sent. Your camera may be set at a very high picture size and you can go to settings and lower the size and that may solve your mailing problem.
-
Regarding Email alerts Using BPM
Hi All,
i need to send an Email Alert through using BPM here is the scenario where customer is entering some data which is coming thru Web Service to XI,
1) so here i have to validate the customer using SQL Database if customer exists then it should proceed further or else it should raise an alert.
2)Once its validated it should go thru another division check from SQL database, Based on the division if we have it as 00 then order should be created in R3 server or if is 10 the it should be created in SQL Server.
3)If no division exists an alert should be raised.
i just need to know the that for this above scenarios how many Alert category should i have to make
or
is it possible to create only one alert category to raise this two Email Alerts pls suggest ...............
Thnks you
Azeez khan.Hi All,
Thanks for the quick responces,
I have created all the steps required to send an Alert using the given Above blogs here i am facing some issues like
1) in properties tab of the BPM were we have a options like Alert Category
Alert Desception
here my doubt is can i give the same Alert category to the Above two conditions as per my Scenario ABove ie
For Validation Alert & Division Check .
And also here we are using BPM so is it necessary for me to write An java codes for the Above Requriments
Kindly guide me if i am mistaken .
Regards,
Azeez khan . -
Hi all,
is it possible to view mails send using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to UWL?
I am receving emails in my SAP Inbox.
Please guide.
thanks.Hi,
You can only get the SAP mails into UWL notification tab with the Sonic connector (well of course with some custom development everything is possible).
One trick to get the workflow for sending "mails" to UWL is to NOT use email sending step, but instead use a decision step in the workflow and send this work item to the user. The decision step can include the same message as the email, and have onl one option "Confirm" (or whatever). These you can easily display in UWL since they are normal work items.
Regards,
Karri -
Mails in UWL using SO_NEW_DOCUMENT_ATT_SEND_API1
Hi all,
is it possible to view mails send using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to UWL?
I am receving emails in my SAP Inbox.
Please guide.
thanks.I believe you can use SONiC. You might want to do some research on that.
-
Exchange generates failure report emails for Inbox items which haven't attempted to be synced
Hello,Our ActiveSync client is reporting errors to the user when the user is sent certain types of recurrence invites. If an invite to a meeting is sent from the Outlook Web App to the user, and the user then syncs their Inbox (using our ActiveSync client and the Sync command), instead of receiving the correct email, they will get an email indicating an error:
From: Microsoft Exchange on Behalf of *user’s name*
Subject: Synchronization with your WinRT failed for 1 items.
Body:
Synchronization with your Winrt failed for 1 items.
The following items couldn’t be sent to your mobile phone. They haven’t been deleted …
Item Folder: Inbox
Item Type: IPM.Schedule.Meeting.Request
Item Created: *date*
Item Subject: *subject of missing email*
(WinRT is the name of our client currently.)
This occurs consistently when the invite is for a recurring meeting, which occurs on the last day of a month, yearly. (Yearly on the nth day of the month)
It also seems that after one of these error emails appears, other items start to be added in with it, although this could just be the result on my side from a lot of testing side effects.
There’s two strange things to note about this error.
The Exchange server never attempts to even send the items via ActiveSync to our client, so the error does not seem to be caused by our Sync request. I’ve used Fiddler to examine the calls, and we never receive the original message in any form.
The Windows Mail client (in Windows 8.1), which uses ActiveSync, has no problem Syncing the very same items that are causing the errors to appear. This gives the impression that something can be done to remedy the problem, but I have no idea what.Thanks
ArchieCoderHello ArchieCoder,
This is certainly not what I would expect to see. However, I can't say with certainty that it's related to the syncing issue.
I went back and looked at the Fiddler trace you took from the Windows Mail client. It gets the same FolderSync response. The first three folders in the response look like I expect--Calendar has ServerId 1, Contacts has ServerId 2, and Deleted Items has ServerId
3. After that, the ServerId value jumps to 11 for the Drafts folder, so it and all of the subsequent folders have a ServerId value that is 7 higher than what I would expect to see.
What seems especially weird to me is that the Windows Mail client proceeds to issue a Sync request for the list of CollectionIds I reported earlier, despite several of them being absent from the FolderSync response. Furthermore, it looks like the Windows
Mail client is getting Inbox items that are identified as being in CollectionId 5:
<?xml version="1.0" encoding="utf-8"?>
<airsync:Sync xmlns:airsync="AirSync">
<airsync:Collections>
<airsync:Collection>
<airsync:SyncKey>933450273</airsync:SyncKey>
<airsync:CollectionId>5</airsync:CollectionId>
<airsync:Status>1</airsync:Status>
<airsync:Commands>
<airsync:Add>
<airsync:ServerId>5:391</airsync:ServerId>
<airsync:ApplicationData>
<email:Subject>Canceled: Last day of december</email:Subject>
I'm really at a loss for what is going on with this. How difficult would it be for you to test this with your client assuming that Inbox is CollectionId 5 instead of the 12 that is returned from the FolderSync? I am afraid we might be focusing too closely
on this particular aspect of the issue without being sure it could be causing the real problem, so I think it would be good if you can either reproduce the failure syncing CollectionId 5 instead of 12, or show that your client fails in some other way if it
tries to sync CollectionId 5. A Fiddler trace of the outcome of that test including both the FolderSync response and Sync request/response would be the next logical step here, I think, assuming that that is doable. Please let me know what you think.
Best regards,
Matt Weber | Microsoft Open Specifications Team -
Hi experts,
I m using SO_NEW_DOCUMENT_ATT_SEND_API1 function moduel for sending mails to dealers. That is, whenver i execute a Z transaction, the customer invoice details are getting displayed in report output. At the same time, the same output data is sent as mail to the respective dealers.
Now teh user is asking whether there is any possiblity for the end users to have a proof of the mail which is being sent from the Z transaction. If the mail is sent, the end user who executes the Z transaction (mail sending transaction) should have that mail in his/her SENT ITEMS. If the mail not reaches the dealer, then the user must identify the mail bounce identification.
Pls tell me how to achve the same..
Regards,
ShanthiHi,
Yes it is possible..
Just pass 'X' to the exporting parameter 'put_in_outbox'. The user can check the send mail in 'sost'. All the details of the mail will be there. This will be the proof that the mail was sent.
Reg the 2nd part of your query, if the mail is not delivered to any reciepent or to particular recipient, the details will be there in the SAP outbox, that also you can see through transaction 'sost'.
Thanks & Regards
Rocky -
E-mail functionality using so_new_document_att_send_api1
Hi
We Implemented E-mail functionality in our tool useing "so_new_document_att_send_api1" standard FM but here im unable to attach excel document .How to attach a excel document in this standard FM plz help.
Asifhi try this code
*& Report ZTEST_2 *
*& Report ZTEST_2 *
REPORT ztest_2 .
TYPES : BEGIN OF t_email_update_iw32,
aufnr LIKE viaufks-aufnr,
vornr LIKE afvc-vornr,
text(220),
END OF t_email_update_iw32.
DATA : gt_email_update_iw32 TYPE STANDARD TABLE OF t_email_update_iw32,
gw_email_update_iw32 TYPE t_email_update_iw32.
TYPES : BEGIN OF t_email_date_error,
aufnr LIKE viaufks-aufnr,
prueflos LIKE qamr-prueflos,
merknr LIKE qamr-merknr,
text(220),
END OF t_email_date_error.
DATA : gt_email_date_error TYPE STANDARD TABLE OF t_email_date_error,
gw_email_date_error TYPE t_email_date_error.
TYPES : BEGIN OF t_email_conf_doc_error,
aufnr LIKE viaufks-aufnr,
vornr LIKE afvc-vornr,
text(220),
END OF t_email_conf_doc_error.
DATA : gt_email_conf_doc_error TYPE STANDARD TABLE OF
t_email_conf_doc_error,
gw_email_conf_doc_error TYPE t_email_conf_doc_error.
SELECTION-SCREEN : BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
PARAMETERS : cb_email AS CHECKBOX DEFAULT 'X'.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT (16) text-007 FOR FIELD p_email1.
PARAMETERS : p_email LIKE somlreci1-receiver,
p_email1 LIKE adr6-smtp_addr.
PARAMETERS : p_table1 AS CHECKBOX,
p_table2 AS CHECKBOX,
p_table3 AS CHECKBOX.
SELECTION-SCREEN : END OF BLOCK b4.
CLEAR gw_email_update_iw32.
REFRESH gt_email_update_iw32.
gw_email_update_iw32-aufnr = '1234567'.
gw_email_update_iw32-vornr = '0010'.
gw_email_update_iw32-text = 'This is table1'.
APPEND gw_email_update_iw32 TO gt_email_update_iw32.
CLEAR gw_email_update_iw32.
gw_email_update_iw32-aufnr = '4564578'.
gw_email_update_iw32-vornr = '0020'.
gw_email_update_iw32-text = 'This is table1'.
APPEND gw_email_update_iw32 TO gt_email_update_iw32.
gw_email_date_error-aufnr = '222615'.
gw_email_date_error-prueflos = '1111'.
gw_email_date_error-merknr = '2222'.
gw_email_date_error-text = 'This is table2'.
APPEND gw_email_date_error TO gt_email_date_error.
gw_email_date_error-aufnr = '222615'.
gw_email_date_error-prueflos = '3333'.
gw_email_date_error-merknr = '4444'.
gw_email_date_error-text = 'This is table2'.
APPEND gw_email_date_error TO gt_email_date_error.
gw_email_conf_doc_error-aufnr = '9900107987'.
gw_email_conf_doc_error-vornr = '999999'.
gw_email_conf_doc_error-text = 'This is table3'.
APPEND gw_email_conf_doc_error TO gt_email_conf_doc_error.
gw_email_conf_doc_error-aufnr = '9900107987'.
gw_email_conf_doc_error-vornr = '999999'.
gw_email_conf_doc_error-text = 'This is table3'.
APPEND gw_email_conf_doc_error TO gt_email_conf_doc_error.
DATA : lw_space VALUE ''.
SET PARAMETER ID 'ZPDF' FIELD lw_space.
DATA : pripar LIKE pri_params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_parameters = pripar
line_size = 255
layout = 'X_65_132'
no_dialog = 'X'
IMPORTING
out_parameters = pripar
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
NEW-PAGE PRINT ON PARAMETERS pripar NO DIALOG .
RESERVE 5 LINES.
DATA : text1(10) TYPE c VALUE 'AUFNR',
text2(10) TYPE c VALUE 'VORNR',
text3(50) TYPE c VALUE 'TEXT'.
IF p_table1 = 'X'.
WRITE AT 10 text1. WRITE AT 30 text2 . WRITE AT 30 text3.
LOOP AT gt_email_update_iw32 INTO gw_email_update_iw32.
WRITE : / gw_email_update_iw32-aufnr , gw_email_update_iw32-vornr ,
gw_email_update_iw32-text.
ENDLOOP.
ENDIF.
WRITE : / sy-uline .
IF p_table2 = 'X'.
WRITE : / 'AUFNR' , 'PRUEFLOS' , 'MERKNR', 'TEXT' .
LOOP AT gt_email_date_error INTO gw_email_date_error.
WRITE : / gw_email_date_error-aufnr, gw_email_date_error-prueflos,
gw_email_date_error-merknr,gw_email_date_error-text.
ENDLOOP.
ENDIF.
WRITE : / sy-uline .
IF p_table3 = 'X'.
WRITE : / 'AUFNR' , 'VORNR' , 'TEXT' .
LOOP AT gt_email_conf_doc_error INTO gw_email_conf_doc_error.
WRITE : / gw_email_conf_doc_error-aufnr,
gw_email_conf_doc_error-vornr, gw_email_conf_doc_error-text.
ENDLOOP.
ENDIF.
NEW-PAGE PRINT OFF.
DATA : mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : rqident LIKE tsp01-rqident ,
rqcretime LIKE tsp01-rqcretime .
SELECT rqident rqcretime FROM tsp01
INTO (rqident,rqcretime)
WHERE rqowner = sy-uname
ORDER BY rqcretime DESCENDING.
EXIT.
ENDSELECT.
DATA: spool_id LIKE tsp01-rqident.
MOVE rqident TO spool_id.
DATA : p_file LIKE rlgrap-filename VALUE 'C:\file.pdf' ,
numbytes TYPE i,
cancel.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spool_id
NO_DIALOG =
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
pdf_bytecount = numbytes
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
pdf = mtab_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
end
DATA : w_buffer TYPE string. "To convert from 132 to 255
DATA : i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
LOOP AT mtab_pdf.
Replacing space by ~
TRANSLATE mtab_pdf USING ' ~'.
CONCATENATE w_buffer mtab_pdf INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~ ' .
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
*start try
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA : tab_lines TYPE c.
doc_chng-obj_name = 'TEST'.
doc_chng-obj_descr = 'Mail came successfully'.
objtxt = 'Regards'.
APPEND objtxt.
objtxt = 'Nitin'.
APPEND objtxt.
objtxt = 'hahaha'.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
* ERSTELLEN DES EINTRAGS ZUM KOMPRIMIERTEN DOKUMENT
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
* ERSTELLEN DER ANLAGE FUR DAS DOKUMENT
**OBJBIN = '\O/ '. APPEND OBJBIN.
**OBJBIN = ' '. APPEND OBJBIN.
**OBJBIN = ' / \ '. APPEND OBJBIN.
LOOP AT i_record.
objbin[] = i_record[].
ENDLOOP.
DESCRIBE TABLE objbin LINES tab_lines.
*objhead = 'picasso.txt'. APPEND objhead.
* Erstellen des Eintrags zur komprimierten Anlage
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'PDF'.
objpack-obj_name = 'PDF File received '.
objpack-obj_descr = 'PDF File received '.
*objpack-doc_size = ( tab_lines ) * 255 .
APPEND objpack.
* Fullen der Empfangerliste
refresh reclist.
reclist-rec_type = 'U'.
reclist-receiver = p_email1.
APPEND reclist.
reclist-rec_type = 'B'.
reclist-receiver = sy-uname.
APPEND reclist.
reclist-rec_type = 'U'.
reclist-receiver = p_email.
APPEND reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99. -
Sending Carbon Copy using SO_NEW_DOCUMENT_ATT_SEND_API1
Hello,
I am using SO_NEW_DOCUMENT_ATT_SEND_API1' to send out email letting people know a direct deposit has been posted to their bank. My problem is that the Acct department wants a carbon copy sent to their email address for each email that is sent. Looking at this function, there is a line called
RECEIVERS = IT_RECLIST. When I take this thru debug, I see IT_RECLIST defined as TYPE TABLE OF SOMLRECI1. When I see the fields in IT_RECLIST, there is a field called copy, I assume I set this flag = 'X' to let the function know I want a carbon copy, correct? Also, I am confused as to where the carbon copy email address would go, because all I see is a field called RECEIVER that is holding the recipients email. Can you guys set me straight here?u can't send a carbon copy...instead while sending the email, the same can be sent to 2 or more people at a time. Add the email address to the existing list and it will trigger same email to the department.
-
On my iPad I have a working icloud that I have complete access to, but on my iPhone it keeps asking me for the password for it, but I do not know it! And the email that I used is not activated anymore! How do I delete the icloud account on my phone?
Hi Aurion23,
If you intend to keep using iCloud on your iPad, your best course of action would be to update your Apple ID/iCloud information so that you have a known password and it is associated with an active email address. You may find the following articles helpful:
iCloud: Change your iCloud password
http://support.apple.com/kb/ph2617
Apple ID: Changing your Apple ID
http://support.apple.com/kb/ht5621
Regards,
- Brenden -
How to Send an Email to Outlook using process type in RSPC?
Hi,
How to Send an Email to Outlook using process type in RSPC?
We created lot of process variants, actually we want to send an mail to users if the DP Background job was succesfully finished.
Actually i tried with create message its not happening...
Plz let me know .. its urgent ...
Regards,
SatishHello Satish,
If you want to send a friendly message to your users, then you can do this by building an ABAP program that calls function module SO_NEW_DOCUMENT_SEND_API1 . You can then insert this ABAP program in your process chain (using the ABAP program process type) or as a second step in your background job. With this technique, you can send an email to SAP users, or to external users (e..g Outlook email addresses)
Here's a sample ABAP code:
data: ls_docdata type SODOCCHGI1,
lt_objcont type table of solisti1,
lt_receivers type table of somlreci1,
ls_objcont type solisti1,
ls_receivers type somlreci1,
ls_user type syuname.
* Fill these variables with subject and msg lines that you need.
data: MAIL_SUBJECT TYPE STRING,
MSG_LINE1 TYPE STRING,
MSG_LINE2 TYPE STRING,
MSG_LINE3 TYPE STRING,
MSG_LINE4 TYPE STRING,
MSG_LINE5 TYPE STRING.
ls_docdata-obj_descr = mail_subject.
ls_objcont-line = msg_line1.
append ls_objcont to lt_objcont.
ls_objcont-line = msg_line2.
append ls_objcont to lt_objcont.
ls_objcont-line = msg_line3.
append ls_objcont to lt_objcont.
ls_objcont-line = msg_line4.
append ls_objcont to lt_objcont.
ls_objcont-line = msg_line5.
append ls_objcont to lt_objcont.
* t_userlist contains the list of users to whom th email will be sent.
loop at t_userlist into ls_user.
ls_receivers-receiver = ls_user.
"Change the type here if email is for outlook users, See documentation
" of function module in SE37
ls_receivers-rec_type = 'B'.
ls_receivers-express = 'X'.
append ls_receivers to lt_receivers.
endloop.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = ls_docdata
tables
OBJECT_CONTENT = lt_objcont
receivers = lt_receivers
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
You can test out the function module first in SE37 (just put the name of the FM and click execute). Testing it in SE37 will help you get your parameters right.
Hope this helps.
Maybe you are looking for
-
Problems after upgrading to iOS 5.0...
Hi, maybe it's been said and maybe it's a matter of the iPad 1, but after upgrading to ios 5.0 all my apps started to reset when used. Is there something I can do to avoid this? I tried resetting the iPad and nothing.... Kind Regards
-
File Content Conversion in Receiver File Adapter
Hi Experts, I got a requirement like "I have to read the below XML and convert into text file with '|' seperator". Below is the XML structure.<Header> is 1..1 cardinality and <Item> is 0..n cardinality and <Response> is 0..1 cardinality. <?xml versio
-
Sunray not connecting to VDI server externel DHCP server
Dear all, my VDI server is ready. and having ip address as 172.25.40.39/24. my sun ray client is in the network having ip 172.25.30.83/24. as you can see both these ip address are in different networks. i mean it is not the same subnet. both the syst
-
N7000 : details of packets dropped by COPP policy (class-default) ?
Hi, On one of our N7K, we have some packets dropped by the COPP policy in the class-default class-map. : Partial results of "show policy-map interface control-plane" not so long after clearing the counters : class-map class-default (match-any)
-
I keep getting the same error message: "Runtime Error" for adobe reader
Hi, I keep getting a 'Runtime Error' message stating the following: "This application has requested the runtime to terminate it in an unusual way. Please contact the applications server team for more information". It then closes the attachment and