Records Management - Email (Attachment & Text) - GroupWise
I have a requirement to store an email (its attachment and text) into UCM as a single instance. The text can't be copied/pasted into an index field upon import. The attachment and text should be merged together and committed as a PDF file (read only). Novell GroupWise is the email client. Can this requirement be satisfied by utilizing Records Managment? Could anyone provide a suggested approach to this requirement?
Thank you.
Off hand, this does not seem like a simple task.
Let's start with the merging business. You state the email and the attachement must be merged together as a PDF. This is not covered in any way with out-of-the-box functionality. You'll need SOMETHING that sends the attachements to inbound refinery to convert them to PDF, then merge them together (as you'll support multiple attachements one one email right?) then you'll need to do some work on the PDF to add the original email text/graphics (some email is html based with embedded graphics right?).
THEN, you can finally put this all in UCM.
And the pdf must be indexable so you can search for the content in it.
This is a heavy duty customization.
Similar Messages
-
TREX on Portal-Server also used for search/index for SAP Records Management
Hi all,
can a installation of the TREX on the Portal-Server (or as separate Server) used for Portal Index/search and also in parallel for searching of Content in an SAP Records Management (means full text research of records/ dossier in the SAP RM) ? Some ideas, tips or settings to keep in mind ?
THX
marioHi Neil,
We have exactly the same problem. We installed a new SAP E-Commerce system on Microsoft Windws 2008 R2 with TREX Version 7.10.43.00. The TREX connection is okay. Also the catalogue replication works without any problems. The SAP support means it is a permission problem on the IIS. The problem isnu2019t solved yet and the message to the SAP support is in process.
What is your effect with this link?
http://localhost:<TREXNAMESERVER>/TREXHttpServer/
Default:
http://localhost:<30305>/TREXHttpServer/
Kind regards,
Roland -
Nokia e63 save email attachment as text file
When I receive email with text document attached and select save, it is always saved in office notes. While this is probably a reasonable thing to do, the problem is that I cannot find the saved file using file manager. So this text document becomes unavailable for other installed programs. Answers to following questions would help mightily:
1. How to save email attachment to specified folder (any attachment)?
2. How to save note from Menu->Office->Notes to some specified folder?
3. Where Menu->Office->Notes stores the notes? (Active Notes stores them in folder called ActiveNotes in root folder)
4. Is it possible to remove this program, since its features are completely covered by Active notes?The email client saves attachments to the folder Others if you choose 'save' from the menu. Notes cannot be individually accessed, they're a some kind of database hidden deep into your phone. To save your note to some folder the only thing you can do is copy and paste it to Quick Office and save it from there.
You can't remove the Notes program. I've moved all my notes to Active Notes and use the memory card to store them. As you said, Active Notes does all that Notes does, and more. Notes just starts up a few milliseconds faster
Message Edited by kvirtanen on 13-Mar-2009 01:57 PM
kvirtanen.deviantart.com -
Email with text attachment with line width 1250
Dear all,
I want to send the email with text attachment whose line width in text file is 1250. Kindly let me know how to send email attachment with more than 255 line width.
Regards,
Manoj
Moderator Message: Frequently Asked Question. Please search for available information before posting.
Edited by: kishan P on Apr 29, 2011 2:48 PMHi,
What ever text you are sending in the email, create a standard text for it using tcode SO10. In the program use the FM READ_TEXT to get the data into internal table which will be of length 132 char. If you want line widht of 255 chars convert using FM SX_TABLE_LINE_WIDTH_CHANGE as below,
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = it_data
content_out = it_mess_att
EXCEPTIONS
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
OTHERS = 4.
Use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
Hope this will help you.
regards,
Tulasi. -
Why can't I "Save as Text" a pdf file received as an email attachment?
I can "Save as text" a pdf file which I have created in my own computer (that is, it goes into MS notebook that I then can Copy and Save as an MS Word file) but not when I receive a pdf as an email attachment. (The file is saved, but it is empty.) Why would I want to convert my own pdf back to text? Well, in case I no longer have the original Word document I suppose, but the thing is "Save as text" works with my pdf, but not with those I recieve from others. How come? Thanks!
Is this a scanned PDF? If so, it must first be OCR'd.
-
Removing extra spaces from email attachment of text file
Hi All,
I am having a question in opening email attachment file in text mode.
Whenever I am trying to open a CSV file in text mode after each row it adds blank spaces. These blank spaces are to complete the 255 characters on each row I guess.
My client doesn't want these space. So can anybody tell how to remove those spaces?
<removed by moderator> response would be helpful.
Thanks and Regards
Nishad
Edited by: Thomas Zloch on Apr 28, 2011 4:02 PM - priority normalizedHi,
There is no solution for this as u know that the data which you r sending in csv its actually getting populated from an internal table.
You cannot make your internel table dynamic for this requirment.
It should have a fixed length. Now if the data is less then also the length.
So u have identified correct that because of 255 the blank space is population, nothing is in your hand.
U have to convince the client, to make them understand where is the limitation.
Thanks & Regards
Prasenjit -
Can desktop manager be configured to view email attachment?
Hi,
I have posted this question few times before and still have not gotten a definite answer. Can someone confirm if I can configure the desktop manager to view email attachment? If so, how do I achieve it? I am not one BES or BIS.
I have looked at the below KB and tried using the application launcher to install the attachmen service, however, it was not available in the application loader wizard.
http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB04279&sliceId=SAL_Pub...
configuration
Blackberry 8300
Desktop Manager 4.3
Thanks
Solved!
Go to Solution.First of all if you are nither BES nor BIS then there is no question of integrating email IDs in your device. Meaning no possibility of viewing email attachment in your device. For using any BlackBerry features you have to have a BlackBerry data plan. Please clarify this point.
Now regarding attachment viewing through Desktop Manager configuration is not possible. There is no such option in BlackBerry.
tanzim
If your query is resolved then please click on “Accept as Solution”
Click on the LIKE on the bottom right if the post deserves credit -
Disable Full Text Search in Records Management
Hi Everyone,
This is Shiva, we implemented SAP Records management & i am came in middle of this project. Right now client want to do some customizations in Records.
Actually i need to disable Full Text Search under Records. Under Cross Query i disabled the Full text by the following process
(Two sample element types are delivered with the service provider
SRM_SP_QUERY:
SRM_SPS_QUERY
Search for records, documents, cases, record models and file plans
SRM_SPS_QUERY_REC_DOC)
Under(SPRO) Cross SP search based on Property Unification; you can able to disable the FullText search field(this will be effects only for Cross Query), but under Records, when you right click there will be one option called FIND in which i am unable to disable the FULL TEXT search.
I used DMWB T-code under LOIO, i search for Standard/free/instance attributes, but i didn't find any Full Text Search Field in that one.
Can anyone please help me in this. I really appreciate your inputs & help.
Thanks,
Shiva.
Edited by: Shivasap on Aug 2, 2010 6:01 PM
Edited by: Shivasap on Aug 3, 2010 4:01 PMDear Shiva,
Full text search needs to be deactivated at content model level for attributes. You will find a document class in the element type of the record. In transaction DMWB, you will find LOIO & PHIO classes for the document class. For each attribute, you will find a checkbox "index-relevant" which needs to be unticked if you dont want to use TREX. For deactivating full-text search for which a field is given in the FIND popup, TREX needs to be deactivated. There is no option to deactivate just for a record element type in RM. Unfortunately, the field itself cannot be hidden. This is programmed in the logic.
Best Regards,
Pragya -
Can not attach vcard into email or text
I have a Q10 and was able to attach a contact vcard to an email or text in the past. Now I get "invalid and not attached". When in contacts and try to share contact from there, I get "contact data can not be shared". I can attach pictures and files, just not contacts. Didn't work in 10.3.1.15.. Just downloaded update 10.3.1.1865 and have same issue.
OS 10.3.1
BlackBerry has verified that this is a known issue: KB36670-Unable to share contacts on the BlackBerry 10 smartphone .
Hopefully a fix comes soon. -
I have deleted hundreds of pictures, I've deleted apps, deleted emails and texts, and I've turned off and deleted backups of apps on icloud and it is still telling me that there is not enough icloud storage available for my phone to be backed up. I am supposed to do this before I go to the Apple store today to get my phone fixed. Can someone please help me? I have done almost everything.
This article explains ways to reduce your iCloud storage: Managing your iCloud storage. In addition to what's mentioned in the article, if you have lots of photos and videos attached to your text messages, these are all included in your iCloud backup and deleting them can sometimes significantly reduce the size of your backup.
If worse comes to worse, back up your phone to your computer rather than iCloud. To do this, connect it to your computer, open iTunes and go to File>Devices>Back Up and to File>Devices>Transfer Purchases. This can be used to restore your data when you get your phone back. (In fact, it's faster because you don't have to download the data from iCloud.) -
Sending an email with text Content using SMTP Adapter.
I am trying to send an email Message with the .txt attachment using SMTP adapter. I am getting an XML input and I am mapping the input Schema to Flat File Schema. I am trying to Send this Flat File(.txt attachment) in the Email. But I am receiving it as
HTML format only.
The Expression in the Message Transform is,
SMTPUtils.Part.SetContentType(OutgoingFlatFile_Msg.BodyFlatFile,"text");
OutgoingFlatFile_Msg(SMTP.EmailBodyTextCharset)="UTF-8";
DynamicEmailPort(Microsoft.XLANGs.BaseTypes.Address) = "mailto:[email protected]";
OutgoingFlatFile_Msg(SMTP.CC) = "[email protected]";
OutgoingFlatFile_Msg(SMTP.Subject) = "TESTMAIL";
OutgoingFlatFile_Msg(SMTP.From) = "[email protected]";
OutgoingFlatFile_Msg(SMTP.SMTPHost) = "smtp.org";
OutgoingFlatFile_Msg(SMTP.SMTPAuthenticate) = 0;
The Email attachment is HTML format,
<?xml version="1.0" encoding="utf-8"?><ns0:Root xmlns:ns0="http://SampleSMTPEmail.OutgoingFlatFile"><Record><CustomerID>Cus001</CustomerID><OrderID>Ord001</OrderID></Record></ns0:Root>
How to attach the .txt file to the email.Have you tried the following steps:
Create the message (“msgEnvelope”) as a Multi-Part message, with the required message in the Message Body Part (“Attachment”)
Set the following properties of the Envelope Message:
msgEnvelope(SMTP.Subject) = <Email Subject>;
msgEnvelope(SMTP.From) = <Sender Email>;
msgEnvelope(SMTP.SMTPHost) = <Email Host name>";
// This is the default value
msgEnvelope(SMTP.SMTPAuthenticate) = 0;
// Set the message text included in the email
msgEnvelope(SMTP.EmailBodyText) = <Text in body of email>;
// Important - This is required if the EmailBodyText is set
msgEnvelope(SMTP.EmailBodyTextCharset) = "utf-8";
// A value of '1' means include Message Body Part as email attachment
msgEnvelope(SMTP.MessagePartsAttachments) = 1;
Set the following properties of the Message Body Part (“Attachment”):
// Important - Change this MIME type if not sending a Text file
msgEnvelope.Attachment(Microsoft.XLANGs.BaseTypes.ContentType) = "text/plain";
// Set the Filename of the attachment
msgEnvelope.Attachment(MIME.FileName) = <Physical name of the attachment>;
Set the following property on the Dynamic Send Port:
// We set the Email Address on the Port itself
Dynamic_Send_Port(Microsoft.XLANGs.BaseTypes.Address) = <recipient email address>;
http://biztalktalk.wordpress.com/2008/08/28/sending-attachments-through-a-dynamic-send-port/
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Email attachment with .txt file (first line blank in the file)
Hi all ,
Iam trying attach .txt file to email , the file that iam accessing from server . But first line blank (extra) even though i dont have blank line in original file .Can any help me out to resolve this issue?
<u>Example</u> original file
12345 aa pq
<u>Email attachment file</u>
-> This line
12345 aa pq
This is my code:
REPORT ZTEST_FILE .
DATA:BEGIN OF t_upload occurs 0,
matnr LIKE zwplcsmev-matnr,
zwgehrrg LIKE zwplcsmev-zwgehrrg,
zwgehrct LIKE zwplcsmev-zwgehrct,
zwgbev LIKE zwplcsmev-zwgbev,
zwpldt LIKE zwplcsmev-zwpldt,
zwacdt LIKE zwplcsmev-zwacdt,
END OF t_upload.
*DATA: maildata type sodocchgi1.
*DATA: mailtxt type table of solisti1 with header line.
*DATA: mailrec type table of somlrec90 with header line.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA:REC(80) TYPE C.
DATA g_mask(20) TYPE c VALUE ',., ..'.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA:P_ERROR(3).
DATA:P_REFO(3).
DATA: gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1.
selection-screen begin of block b1 with frame title text-001.
parameters:p_file type localfile.
parameter:p_email type ad_smtpadr.
selection-screen end of block b1.
--At Selection-Screen- -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'TB_LIMIT_WS_FILENAME_GET'
EXPORTING
def_filename = p_file
mask = g_mask
mode = 'S'
title = 'INPUT FILE'
IMPORTING
filename = p_file
EXCEPTIONS
selection_cancel = 1
selection_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.
START-OF-SELECTION.
PERFORM process_file.
if p_error = 'X' AND P_REFO <> 'X'.
PERFORM populate_message_body.
ENDIF.
IF P_REFO = 'X' AND P_ERROR <> 'X'.
it_message = 'Please find Attached file'.
APPEND it_message.
PERFORM send_attachment tables it_message
it_attach
using p_email
'Crest to Plc Data'
'TXT'
p_file
changing gd_error
gd_reciever.
ENDIF.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
END-OF-SELECTION.
*& Form process_file
text
FORM process_file.
*CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
DATA :l_path TYPE string.
l_path = p_file.
CONSTANTS: con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB
con_cret type c value cl_abap_char_utilities=>newline.
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE encoding default.
if sy-subrc = 0.
do.
read dataset p_file into IT_ATTACH.
IF SY-SUBRC NE 0 .
EXIT.
ELSE.
T_UPLOAD = IT_ATTACH.
CONCATENATE con_cret it_attach INTO it_attach .
append it_attach.
clear it_attach.
P_REFO = 'X'.
APPEND T_UPLOAD .
clear t_upload.
ENDIF.
ENDDO.
else.
p_error = 'X'.
ENDIF.
ENDFORM. "process_file
*& Form populate_message_body
text
FORM populate_message_body.
w_doc_data-obj_name = 'TEST'.
w_doc_data-obj_descr = 'Crest to Plc Data'.
w_doc_data-obj_langu = sy-langu.
it_message = 'File Not Found'.
APPEND it_message.
t_receivers-receiver = p_email.
t_receivers-rec_type = 'U'.
append t_receivers.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = w_doc_data
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = it_message
object_content = it_message
receivers = t_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.
if sy-subrc = 0.
commit work.
SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
else.
MESSAGE s027(vv) WITH 'E-mail not sent'.
endif.
ENDFORM. "populate_message_body
*& Form send_attachment
text
FORM send_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
w_doc_data-doc_size = 1.
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
clear t_attachment.
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_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.
if sy-subrc = 0.
commit work.
SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
else.
MESSAGE s027(vv) WITH 'E-mail not sent'.
endif.
Populate error return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "send_attachmentJust copy the code below and execute . I just checked and found the exact values on attachment with no blank lines. This is more simple than the one u have written , just include ur data upload logic . For ITAB values to be attached i have written a simple logic to retrive from EKPO. Just copy this code and execute. u will understand then.
I understand that ur initial requirement was to attach the file directly and not to upload and attach. If u still want to go for the old requirement then check out the code(2nd program of the two that i have sent) that i have sent u on ur previous post.
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_TXT_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .TXT speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .TXT documnet attachment'
'TXT'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_TXT_DATA_TABLE
Build data table for .txt document
FORM build_txt_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY SPACE . "con_tab.
CONCATENATE con_cret it_attach INTO it_attach." Use this if req.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY SPACE ."con_tab.
CONCATENATE con_cret it_attach INTO it_attach." Use this if req.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_txt_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
execute this code and i hope that will help u.
regards,
Barath. -
hi frn's ,
i am sending an email with text attachment ....but not getting in desired format in text attachment....
please help
Itab value:
abcdefdfldjfñlkdsjfñldsjfdsñljñla
fdsljfñldskjfldsñkjfñldsjfñldsajñld
vcxusfcxusfcusafcxusafcusafcdsauc
Actual result currently coming in text file:
abcdefdfldjfñlkdsjfñldsjfdsñljñlafdsljfñldskjfldsñkjfñldsjfñldsajñldvcxusfcxusfcusafcxusafcusafcdsauc
Desired format should be
abcdefdfldjfñlkdsjfñldsjfdsñljñla
fdsljfñldskjfldsñkjfñldsjfñldsajñld
vcxusfcxusfcusafcxusafcusafcdsauc
Thanks and Regards
Priyanki give some coding below
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
data :con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab ,
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
LOOP AT i_mail_sent.
CONCATENATE
i_mail_sent-prueflos
i_mail_sent-lifnr
i_mail_sent-werk
i_mail_sent-lagortchrg
i_mail_sent-matnr
i_mail_sent-ebeln
i_mail_sent-ebelp
i_mail_sent-mblnr
i_mail_sent-losmenge
i_mail_sent-mengeneinh
i_mail_sent-vname
i_mail_sent-vdatum
i_mail_sent-dec INTO it_attach SEPARATED BY con_tab
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
CLEAR : it_attach.
ENDLOOP.
FORM sendmail TABLES p_it_message
p_it_attach
USING p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type.
REFRESH : docdata,docdata[].
docdata-doc_size = 1.
docdata-obj_langu = sy-langu.
docdata-obj_name = 'SAPRPT'.
docdata-obj_descr = p_mtitle.
docdata-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR docdata.
READ TABLE it_attach INDEX tab_lines.
docdata-doc_size =
( tab_lines - 1 ) * 255 + STRLEN( it_attach ).
docdata-obj_langu = sy-langu.
docdata-obj_name = 'SAPRPT'.
docdata-obj_descr = p_mtitle.
'Pending Call List.xls Format'.
docdata-sensitivty = 'F'.
t_attachment[] = p_it_attach[].
REFRESH : objpack,objpack[].
CLEAR objpack.
REFRESH objpack.
objpack-transf_bin = space.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
DESCRIBE TABLE it_message LINES objpack-body_num.
objpack-doc_type = 'RAW'.
APPEND objpack.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
DESCRIBE TABLE t_attachment LINES objpack-body_num.
objpack-doc_type = p_format." 'XLS'. "ld_format.
objpack-obj_descr = 'Lot Details.'.
objpack-obj_descr = p_attdescription. "'Pending Call List.'.
"ld_attdescription.
objpack-obj_name = 'Lot Details' ." p_filename.
"'filename'."ld_attfilename.
objpack-doc_size = objpack-body_num * 255.
APPEND objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
OBJECT_HEADER =
contents_bin = t_attachment
contents_txt = it_message
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = reclist
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.
ELSE.
MESSAGE ' Records Successfully Send' TYPE 'I'.
ENDIF. -
Receiving error message using current Maverick version: "Adobe Reader could not open '***.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).". Is fix the same as on previous OS versions?
Back up all data before making any changes. Please take each of the following steps until the problem is resolved.
Step 1
If Adobe Reader or Acrobat is installed, and the problem is just that you can't print or save PDF's displayed in Safari, you may be able to do so by moving the cursor to the the bottom edge of the page, somewhere near the middle. A black toolbar should appear under the cursor. Click the printer or disk icon.
Step 2
There should be a setting in its preferences of the Adobe application such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected.
Step 3
If you get a message such as ""Adobe Reader blocked for this website," then from the Safari menu bar, select
Safari ▹ Preferences... ▹ Security
and check the box marked
Allow Plug-ins
Then click
Manage Website Settings...
and make any required changes to the security settings for the Adobe PDF plugin.
Step 4
Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard by pressing the key combination command-C:
/Library/Internet Plug-ins
In the Finder, select
Go ▹ Go to Folder
from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens by pressing command-V, then press return.
From the folder that opens, move to the Trash any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
Step 5
The "Silverlight" web plugin distributed by Microsoft can interfere with PDF display in Safari, so you may need to remove it, if it's present. The same goes for a plugin called "iGetter," and perhaps others—I don't have a complete list. Don't remove Silverlight if you use the "Netflix" video-streaming service.
Step 6
Do as in Step 4 with this line:
~/Library/Internet Plug-ins
If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari. -
Issue facing background email attachment.
Actually I have a problem when I tried to send an email to user from program. This is urgent one. Can I have any suggestions or solutions for this problem from you guys? plz . I welcome to get it as soon as possible. Also I tried to explain as better as I am. If you have any questions or I am not clear , I will explain you for your questions.
Let me explain the problem fully.
1) I need to create a selection screen field for user to enter the email id. - This is done
2)If the user enter the email id and execute the report then I have to email the current output of the report to entered( from selection screen) email id as a text. - This is done
3) Now the user needs the some choice to see the output in email. So he wants to add a check box in selection screen just below the "Email id" field in selection screen. So If the user enter the email id and execute the report without choosing the check box then he would able to see the report's output in the email as text. otherwise the user tick the check box and enter the email id and execute the report then we need to send the report's output as a attachment in the email. So when the person( selection screen email id's owner) opens his email he would like to see the attachemnt then If he opens the attachement he would see the report's output now.
This is the purpose the user needs the check box. - This is done
4) I use FM 'SO_NEW_DOCUMENT_ ATT_SEND_ API1' to send the email as a text to selection screen's email id. - This is done
5) Also I use FM 'SO_NEW_DOCUMENT_ ATT_SEND_ API1' to send the email as a attachment to selection screen's email id. - This is done
6) If the user wants to run this in background and send the email to selection screen's email id(without attachment), then I have to send the report's output to email id as a text. - This is done
7) If the user wants to run this in background and send the email to selection screen's email id(with attachment), then I have to send the report's output to email id as a attachment. - This is not done still. This is partially done. I can able to see the attachment . But If I open the attachment I am seeing only last page of the report's output. I didn't see any other previous pages. If it only one page report then it is ok. But my requirement is more than one page. So I need to send all pages to email as a attachment. I tried it many way. But I could not able to find the solution yet. But If I execute the report in foreground for attachment then I would able to see all the pages in attachment. But I have only problem in BACKGROUND.
I added 2 attachments here. 1) the codes which send the email to email id as a text. 2) the codes which send the email to email id as a attachment.
After look at the below attachment codes plz read this following line.
Also when I used to send the email as a attachment, I used the "SAVE_LIST" FM to catch the current list from memory and compress it through the FM "COMPRESSED_ LIST" and send these internal table records to the EMAIL FM "'SO_NEW_DOCUMENT_ ATT_SEND_ API1". I have read the "SAVE_LIST" FMs documentation too. I have seen that this is not suitable for background emailing. So I think I need any other FMs used here instead of this particular FM or else I would expect any other solutions for this problem.
1) *
DATA: DOC_DATA LIKE SODOCCHGI1,
RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
PACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
TXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
CNT TYPE I,
TEXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
TAB_LINES LIKE SY-TABIX.
Add all email id's from selection screen in the mailing list one by
one
LOOP AT M_EMAIL.
RECEIVERS-RECEIVER = M_EMAIL-LOW.
RECEIVERS-REC_TYPE = 'U'.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
there is no entry in the input then don't call the FM
CHECK NOT RECEIVERS[] IS INITIAL.
DO.
CNT = SY-INDEX.
READ LINE SY-INDEX.
IF SY-SUBRC <> 0. EXIT. ENDIF.
TEXT-LINE = SY-LISEL.
APPEND TEXT.
IF CNT > 5500.
REFRESH TEXT.
CLEAR TEXT.
TEXT-LINE = 'Report too large for SAP.'.
APPEND TEXT.
EXIT.
ENDIF.
ENDDO.
DOC_DATA-OBJ_DESCR = 'Report as a text'.
DESCRIBE TABLE TEXT LINES TAB_LINES.
DOC_DATA-DOC_SIZE = TAB_LINES * 255.
Creation of the entry for the compressed document
CLEAR PACK-TRANSF_BIN.
PACK-HEAD_START = 1.
PACK-HEAD_NUM = 0.
PACK-BODY_START = 1.
PACK-BODY_NUM = TAB_LINES.
PACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
CLEAR OBJPACK.
object for showing the report's text
OBJTXT = ' Report as a text'.
APPEND TXT.
CLEAR TXT.
New FM to mail the user & directly to email id
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = PACK
OBJECT_HEADER = TXT
CONTENTS_TXT = TEXT
RECEIVERS = RECEIVERS.
COMMIT WORK.
2)
Structures for recipient addresses
Structures and internal tables for the send data
DATA: pack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: head LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: bin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: txt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA: user_address LIKE sousradri1 OCCURS 1 WITH HEADER LINE.
DATA: sent_to_all LIKE sonv-flag.
clear listobject[].
clear compress_list[].
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = sy-lsind
TABLES
listobject = listobject
EXCEPTIONS
list_index_invalid = 1.
IF sy-subrc = 1.
WRITE: 'Error in save_list.'.
ENDIF.
It's always necessary to compress the list
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
in = listobject
out = compress_list
EXCEPTIONS
compress_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: 'Error in table_compress.'.
ENDIF.
*move list to office table objbin
MOVE compress_list[] TO bin[].
Create the document which is to be sent
doc_chng-obj_name = 'List'.
doc_chng-obj_descr = 'Report list'.
DESCRIBE TABLE txt LINES tab_lines.
READ TABLE txt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( txt ).
Fill the fields of the packing_list for the main document:
CLEAR pack-transf_bin.
pack-head_start = 1.
pack-head_num = 0.
pack-body_start = 1.
pack-body_num = tab_lines.
pack-doc_type = 'TXT'.
APPEND pack.
Create the attachment (the list itself)
DESCRIBE TABLE bin LINES tab_lines.
It is binary document
MOVE compressed_list[] to bin[].
pack-transf_bin = 'X'.
pack-head_start = 1.
pack-head_num = 0.
pack-body_start = 1.
pack-body_num = tab_lines.
pack-doc_type = 'ALI'
pack-obj_name = 'Attachment'.
pack-obj_descr = 'Report for email attachment'.
pack-doc_size = tab_lines * 255.
APPEND pack.
Add all email id's in the mailing list one by one
LOOP AT M_EMAIL.
RECLIST-RECEIVER = M_EMAIL-LOW.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
CLEAR RECLIST.
ENDLOOP.
CHECK sy-subrc = 0.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = sent_to_all
TABLES
packing_list = pack
object_header = head
contents_bin = bin
contents_txt = txt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.Hi,
If you are running thru background change the code like this way
submit yXXXXXXXX exporting list to memory
with p_docno = xdocno
and return.
call function 'LIST_FROM_MEMORY'
tables
listobject = report_list
exceptions
not_found = 1
others = 2.
loop at report_list.
move report_;list to objtxt.
append objtxt.
endloop.
objpack-doc_type = 'TXT'.
describe table objtxt lines tab_lines.
objpack-body_start = v_lines.
objpack-body_num = tab_lines.
objpack-doc_size = tab_lines * 255.
objpack-obj_descr = w_docno_temp.
append objpack.
clear objpack.
doc_chng-obj_name = w_docno.
doc_chng-obj_descr = w_subject.
reclist-receiver = to_smtp_addr.
reclist-rec_type = 'U'.
reclist-express = 'X'.
append reclist.
aRs
Maybe you are looking for
-
HI All, This is Pavani...Iam goin to attend interview this week...I hav no R/3 system installed in my PC...This is my first interview....Iam very nervy. I need ur help regarding tables n fields involved in the following reports. 1. Report to
-
while i was studying about cursor for loop i found this statement in the web "A cursor FOR loop implicitly declares its loop index as a %ROWTYPE record" for example an emp table contain following columns empno,ename,sal,hiredate,deptno and let us con
-
How to setup Datasource to use data triggers in Data Template
hi all, Pls. let me know the process how to setup dataSourceRef that has to be mentioned in the data template tag for making use of various data triggers? I have packaged function which will create a temporary table that I am using in my main query.
-
BPEL implementation design suggestions
Hi all, Being new to SOA, I'm not really sure whats best practice regarding BPEL and certain problems. I just think that the way I have implemented a BPEL solution is "ugly" and was hoping there was a better solution. So I hope some of you may have s
-
Preview mode function in Illustrator CS3
Hey peepz, Just wondering if there is a preview mode like the one in InDesign, where you can block everything (shortcut = W) around the artboard with a gray color to see your work as if it were cropped. It's a really great feature in InDesign and I w