Send Archived BOR Object as an Email Attachment
Hi,
I am sending an email with Attachments. There are some archived documents which are scanned and stored as pdf files.
I need to send these documents attached together with the email as attachment.
*I have retrieved the BOR keys of the files to be sent. However, I am unable to physically attach these to the email. *
I have written the following code.
* Get attached BOR objects
call method gr_case->bor_objects_get
receiving
re_bor_objects = lt_attachmnt
exceptions
failed = 1
others = 2.
* Build list of attachments
loop at lt_attachmnt into ls_attachmnt.
lv_object-describe = c_object_desc.
lv_object-objtype = ls_attachmnt-bor_type.
lv_object-objkey = ls_attachmnt-bor_key.
* Write Packing List (Attachments)
ls_objpack-head_start = 1.
ls_objpack-head_num = 1.
ls_objpack-body_start = 0.
ls_objpack-body_num = 0.
ls_objpack-doc_type = 'OBJ'.
ls_objpack-obj_name = ls_attachmnt-bor_type.
ls_objpack-obj_descr = ls_attachmnt-bor_key.
append ls_objpack to lt_objpack.
endloop.
* send mail
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = ls_doc_change
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = lt_objpack " 1. row for document, following rows for each attachment
object_header = lt_objheader " e.g. for the filename
contents_txt = gt_text_tab " content of ASCII data
receivers = lt_receiver " recipient
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.
This code sends some text files as attachments with the description of the BOR objects.
Can someone please help?
Best regards,
Abhinava
Is there a technical name? Something like BUS1234.
Any way, from the code snippet you show above, I think there might be some confusion. The way I understand it is that you attach BOR objects to Cases (whatever case means). This is where the method BOR_OBJECTS_GET comes. If you want to attach PDF files, then, you will need a means to extract these files as binary internal tables. Your code below does not seem to do that. So, the BOR object attached to the case is different than the actual attached PDF file.
If your BOR object provides a method to display a PDF file, then, you might want to look into that method's code and see how the PDF is extracted.
Similar Messages
-
I'm trying to send a pages document as an email attachment to pc users. They can't access the document. When I try go to the "file" menu, there is no "save as" option.
Hi Shelly,
Command-P (Print)
In the Print dialogue, click the PDF button at lower left, choose Mail PDF
The result should be a new email document with the pdf file attached.
Address and send.
The procedure applies to any document which may be printed, not just Pages documents.
Regards,
Barry -
How at send a Word document as an email attachment from an ABAP program?
Hi all,
i got request to develop background run program which check which staff is due CONFIRM and able to attach confirmation form (Microsoft Word file) to HR and CC staff manager as recipients.
I try almost all relevant FM but still face problem below, please assist.
1) FM SO_DOCUMENT_REPOSITORY_MANAGER
- A window pops up requesting Recipient email ids. I couldn't get the window suppressed.
2) FM SO_NEW_DOCUMENT_ATT_SEND_API1
- Since the attachment is a pre-formatted Word Document and not an Excel or Text document, couldn't process the contents into the internal table (most sample in forum is Excel not word)
Appreciate ABAP folks who have sample code attach a word file will help on this.
Thanks and regards,
FelicekHi ,
sorry for my request but I have to send an e-mail with word attachment and I would appreciate if someone could give the code for
the first part of this link: http://www.divulgesap.com/blog.php?p=ODI=
(I mean 'ZDIV_SEND_EMAIL' ) . The problem is that I have to load in an internal table the file word (by using "open dataset in binary
mode" I suppose ) and then pass this table to a FM or a method for sending e-mail with this file WORD but I 'm facing some
problems.... any suggestion would be very appreciated ... I'm in a "impasse" ! It's seems there is no way out !!!
Thanks in advance
Andrew -
How can send Interactive PDF form as an Email attachment?
Hi Experts,
I am generating Interactive form with one SUBMIT button. User will edit form data and clicks on SUBMIT button.
There I need to send an email notification to user with PDF attachment. How can do this? Where Can I capture binary format of the data.
Thanks,
Naveen Inuganti.Hi Aravind,
Thanks for your input.
I am facing following issues with that option.
1. How can I pass email ID from my program?
2. How about the other functionality that my original button does? Like updating tables etc., Do I need to have separate button for this?
3. Now I am receiving email with XML format! I need it in PDF format.
Thanks,
Naveen.I -
Send reports as email attachment
Hi,
In the APEX application, I have a page that has filters on top and few reports generated based on the given filter values. I have a email button that when pressed, send the whole page as an email attachment. I cannot use PDF. Is it possible to send the page with few reports as email attachment?
Thanks
saruWhen you send as an e-mail, do you mean the html produced report or some sort output file? You could send it as an excel produced output.
Why can't you use a PDF option in this case?
Thank you,
Tony Miller
Webster, TX -
Send current displayed browserpage/iview via link as email-attachment
Hello,
I´m new in this forum and have a question concerning an iView / page which is displayed in the browser. Can I set a link in the iView (JSP) which sends the current displayed browserpage as email-attachment? I know how to do "normal" e-mail-links in HTML:
Link
How can I attach the current iView/page using JavaScript?
Would be very thankful for any help here!
HeinzHi Heinz,
first, welcome on SDN!
Abut your question:
No, it is not possible to attach something to a mail constructed via JavaScript. And you won't be able to pass the page content.
What you could do is to pass the NavigationTarget as subject or body of the mail to be constructed. The Navigation Target has to be rendered on server side, for the JS see http://www.ianr.unl.edu/internet/mailto.html
Hope it helps
Detlev
PS: Please consider to reward points on SDN for helpful answers. Thanks in advance! -
How to send InfoPath attachment as email attachment?
Hi All,
In InfoPath form, I have attached an attachment. And want to send to a person as an email attachment. How to achieve this? Thanks in advance!Hi Greetings.
pls check this
http://support.microsoft.com/kb/2517906/en-us
http://www.bizsupportonline.net/blog/2009/06/use-custom-sharepoint-designer-action-extract-attachment-infopath-form-add-sharepoint-document-library/
Please remember to click 'Mark as Answer' on the answer if it helps you -
Gurus,
Can any body logic for the below requirement for my Report. Report is also pasted. Thanks!
Create a table as given in the requirement
Table:
Cleint Jobname Email ID Active Subject Text Body Text
SO10 SO10
· The email part should contain the entire log and spool if available.
· Once you have the job list, loop on the list and check if the job is defined in your custom table
o If you find an entry then
§ Read the Job Log and convert it to HTML
§ Read the spool if available and convert it to pdf
§ Create an email with
· To: Mail id from your custom table
· Subject [ below: ]
o Then write the entire job log.
o Give one blank line
o If spool list is available the write else write
o Give one blank line
o Write
· Attachment should contain the PDF attachment of the spool.
o If the email fails then Write (donu2019t give message) the Job name and message that email failed.
o If you donu2019t find a mail ID for the job Write (donu2019t give message) the Job name and message that email not found.
· Continue to the next Job in your list.
REPORT ZJOB_MONITORING.
T A B L E S
TABLES: tbtco.
T Y P E - S P O O L S
TYPE-POOLS: slis.
T Y P E D E C L A R A T I O N S
*TYPES: BEGIN OF type_tbtco,
include TYPE tbtco,
END OF type_tbtco.
TYPES: BEGIN OF type_output,
STRTTIME TYPE tbtco-STRTTIME,
strtdate TYPE tbtco-strtdate,
jobname TYPE tbtco-jobname,
line TYPE string,
END OF type_output.
S T R U C T U R E S
DATA: s_tbtco TYPE tbtco,
s_joblog TYPE zsbb_uc4_joblog,
s_output TYPE type_output.
I N T E R N A L T A B L E S
DATA: i_tbtco TYPE STANDARD TABLE OF tbtco,
i_joblog TYPE STANDARD TABLE OF zsbb_uc4_joblog,
i_output TYPE STANDARD TABLE OF type_output.
DATA: Begin of itab_jobname OCCURS 0,
jobname type tbtco-jobname,
end of itab_jobname.
DATA: Begin of itab_user OCCURS 0,
jobname type tbtco-sdluname,
end of itab_user.
DATA: Begin of itab_stat OCCURS 0,
jobname type tbtco-status,
end of itab_stat.
DATA: Begin of itab_uzeit occurs 0,
uzeit type sy-uzeit,
end of itab_uzeit.
Heading of the report.
DATA: t_heading TYPE slis_t_listheader.
DATA : t_fieldcat TYPE slis_t_fieldcat_alv.
S E L E C T I O N S C R E E N
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_strtda FOR sy-datum,
s_lstrun FOR sy-uzeit OBLIGATORY,
s_jobnam FOR tbtco-jobname,
s_user FOR tbtco-sdluname,
s_status FOR tbtco-status.
PARAMETERS: p_email AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK bl1.
" AT SELECTION-SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_JOBNAM-LOW.
PERFORM f4_JOBNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_JOBNAM-HIGH.
PERFORM f4_JOBNAM-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_user-low.
PERFORM f4_USER-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_user-high.
PERFORM f4_USER-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_status-low.
PERFORM f4_STATUS-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_status-high.
PERFORM f4_STATUS-HIGH.
S T A R T O F S E L E C T I O N
START-OF-SELECTION.
PERFORM select_data.
If email is checked.
Send the output table as an email attachment to the distribution list.
Get the email list from the config table. " ask from where to get it
IF p_email = 'X'.
Call FM 'SO_OBJECT_SEND'.
Fill the fields which are not commented accordingly.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = 'RAW'
OWNER = SY-UNAME
TABLES
OBJCONT = TEXT
OBJPARA = OBJPARA
RECEIVERS = RECEIVERS
EXCEPTIONS
OTHERS = 01.
IF SY-SUBRC NE 0.
RAISE ERROR.
ENDIF.
ENDIF.
Prepare the ALV Report.
PERFORM alv_grid_display.
*& Form alv_grid_display
text
FORM alv_grid_display .
alv required data objects.
DATA: w_repid TYPE syrepid,
x_layout TYPE slis_layout_alv,
t_event TYPE slis_t_event,
t_fieldcat TYPE slis_t_fieldcat_alv,
w_title TYPE lvc_title,
w_print TYPE slis_print_alv,
w_comm TYPE slis_formname,
flag TYPE c VALUE 'N'.
REFRESH t_fieldcat.
REFRESH t_event.
CLEAR x_layout.
CLEAR w_title.
Field Catalog
PERFORM set_fieldcat2 USING:
1 'strttime' 'BTCXTIME' space t_fieldcat ,
2 'jobname' 'BTCJOB' space t_fieldcat ,
3 'line' space 'Job Log' t_fieldcat .
*PERFORM set_fieldcat2 USING:
1 'strttime' 'BTCXTIME' space 'I_OUTPUT' t_fieldcat ,
2 'jobname' 'BTCJOB' space 'I_OUTPUT' t_fieldcat ,
3 'line' space 'Job Log' 'I_OUTPUT' t_fieldcat .
PERFORM set_fieldcat.
Layout
x_layout-zebra = 'X'.
x_layout-colwidth_optimize = 'X'.
GUI Status
w_repid = sy-repid .
Top of page heading
PERFORM set_top_page_heading USING t_heading t_event flag.
call the FM 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
is_layout = x_layout
it_fieldcat = t_fieldcat
IT_SORT =
i_save = 'X'
it_events = t_event
TABLES
t_outtab = i_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " alv_grid_display
*& Form set_top_page_heading
text
FORM set_top_page_heading USING
t_heading TYPE slis_t_listheader
t_events TYPE slis_t_event
flag TYPE c.
DATA: x_heading TYPE slis_listheader,
x_event TYPE LINE OF slis_t_event.
Report title
CLEAR t_heading[].
CLEAR x_heading.
x_heading-typ = 'H'.
x_heading-info = 'Job Details'(002).
APPEND x_heading TO t_heading.
Name of the report program
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-key = 'Report ID:'.
x_heading-info = sy-repid.
APPEND x_heading TO t_heading.
User who is running the report
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-key = 'User: '.
x_heading-info = sy-uname.
APPEND x_heading TO t_heading.
Date of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-key = 'Date: '.
WRITE sy-datum TO x_heading-info.
APPEND x_heading TO t_heading.
Time of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-key = 'Time: '.
WRITE sy-uzeit TO x_heading-info.
APPEND x_heading TO t_heading.
Top of page event
x_event-name = slis_ev_top_of_page.
x_event-form = 'TOP_OF_PAGE'.
APPEND x_event TO t_events.
ENDFORM. " set_top_page_heading
*& Form set_fieldcat2
text
FORM set_fieldcat2 USING
p_colpos p_fieldname p_ref_fieldname
p_seltext_m
p_tabname
t_fieldcat TYPE slis_t_fieldcat_alv.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CLEAR wa_fieldcat.
General settings
wa_fieldcat-fieldname = p_fieldname.
wa_fieldcat-col_pos = p_colpos.
the ref_fieldname given is a data element.
IF NOT p_ref_fieldname IS INITIAL.
wa_fieldcat-rollname = p_ref_fieldname.
ENDIF.
Set text headers.
IF NOT p_seltext_m IS INITIAL.
wa_fieldcat-seltext_m = p_seltext_m.
ENDIF.
wa_fieldcat-tabname = 'I_OUTPUT'.
APPEND wa_fieldcat TO t_fieldcat.
ENDFORM. " set_fieldcat2
*& Form F4_JOBNAM-LOW
text
--> p1 text
<-- p2 text
FORM F4_JOBNAM-LOW .
SELECT jobname FROM tbtco
INTO TABLE itab_jobname.
DELETE ADJACENT DUPLICATES FROM itab_jobname.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'jobname'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_jobnam-low'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_jobname
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_JOBNAM-LOW
*& Form F4_JOBNAM-HIGH
text
--> p1 text
<-- p2 text
FORM F4_JOBNAM-HIGH .
SELECT jobname FROM tbtco
INTO TABLE itab_jobname.
DELETE ADJACENT DUPLICATES FROM itab_jobname.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'jobname'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_jobnam-high'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_jobname
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_JOBNAM-HIGH
*& Form F4_USER-LOW
text
--> p1 text
<-- p2 text
FORM F4_USER-LOW .
SELECT sdluname FROM tbtco
INTO TABLE itab_user.
DELETE ADJACENT DUPLICATES FROM itab_user.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'user'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_user-low'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_user
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_USER-LOW
*& Form F4_USER-HIGH
text
--> p1 text
<-- p2 text
FORM F4_USER-HIGH .
SELECT sdluname FROM tbtco
INTO TABLE itab_user.
DELETE ADJACENT DUPLICATES FROM itab_user.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'user'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_user-high'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_user
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_USER-HIGH
*& Form F4_STATUS-LOW
text
--> p1 text
<-- p2 text
FORM F4_STATUS-LOW .
SELECT status FROM tbtco
INTO TABLE itab_stat.
DELETE ADJACENT DUPLICATES FROM itab_stat.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'status'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_status-low'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_stat
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_STATUS-LOW
*& Form F4_STATUS-HIGH
text
--> p1 text
<-- p2 text
FORM F4_STATUS-HIGH .
SELECT status FROM tbtco
INTO TABLE itab_stat.
DELETE ADJACENT DUPLICATES FROM itab_stat.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
DDIC_STRUCTURE = ' '
retfield = 'status'
PVALKEY = ' '
DYNPPROG = 'sy-repid'
DYNPNR = '1000'
DYNPROFIELD = 's_status-high'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = itab_stat
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDFORM. " F4_STATUS-HIGH
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM SELECT_DATA .
select the entries from the table TBTCO
as per the selection screen
SELECT * FROM tbtco
INTO TABLE i_tbtco
WHERE STRTTIME IN s_lstrun AND
strtdate IN s_strtda AND
jobname IN s_jobnam AND
sdluname IN s_user AND
status IN s_status.
Get the job details for the above jobs.
LOOP AT i_tbtco INTO s_tbtco.
CALL FUNCTION 'ZSBB_UC4_JOB_READ_LOG'
EXPORTING
client = sy-mandt
jobcount = s_tbtco-jobcount
joblog = s_tbtco-joblog
jobname = s_tbtco-jobname
TABLES
joblog_tab = i_joblog
EXCEPTIONS
cant_read_joblog = 1
jobcount_missing = 2
joblog_does_not_exist = 3
joblog_is_empty = 4
joblog_name_missing = 5
jobname_missing = 6
job_does_not_exist = 7
OTHERS = 8.
Write the Error handling as needed.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
Append entries to main table.
s_output-STRTTIME = s_tbtco-STRTTIME.
s_output-jobname = s_tbtco-jobname.
LOOP AT i_joblog INTO s_joblog.
s_output-line = s_joblog-text.
APPEND s_output TO i_output.
CLEAR s_output.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDFORM. " SELECT_DATA
*& Form SET_FIELDCAT
text
--> p1 text
<-- p2 text
form SET_FIELDCAT .
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'STRTTIME'.
wa_fieldcat-seltext_m = 'Start Time'.
wa_fieldcat-tabname = 'I_OUTPUT'.
wa_fieldcat-reptext = p_reptext.
APPEND wa_fieldcat to t_fieldcat.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'JOBNAME'.
wa_fieldcat-seltext_m = 'Job Name'.
wa_fieldcat-tabname = 'I_OUTPUT'.
wa_fieldcat-reptext = p_reptext.
APPEND wa_fieldcat to t_fieldcat.
wa_fieldcat-col_pos = 3.
wa_fieldcat-fieldname = 'LINE'.
wa_fieldcat-seltext_m = 'Job Log'.
wa_fieldcat-tabname = 'I_OUTPUT'.
APPEND wa_fieldcat to t_fieldcat.
endform. " SET_FIELDCAT
Edited by: venkata on Aug 12, 2008 4:13 PMsolved
-
Report output getting truncated in email attachment
Hello Gurus,
My requirement is to send a report output as an email attachment.
I have done the coding for this but have a small problem. In the attachment the report is getting truncated after certain length.
Can you advise wats the problem ?
Regards,
SuhasHello Guys,
I too was contemplating on those lines. But actually i was calculating the File Size incorrectly.
Changed the code & now it working !!!!!!!
BR,
Suhas -
Send report output(alv display) as email to end user
I have developed a report the output of which has to be sent to the end user if he enters his email id in selection screen. The out put is in alv form. Pls can anyone tell me how to send this displayed output as an email attachment using function module SO_NEW_DOCUMENT_ATT_SEND_API1 . I am wondering How this displayed output can be passed as a parameter to this function module.
Thanks Sham..
I am able to send HTML email following above link.
The problem i am facing is,When i am deploying the code through crxde.Code is working fine.
But using maven deploy..Bundle get activated ..But at line:
messageGateway = this.messageGatewayService.getGateway(HtmlEmail.class);
,it gives null Pointer exception.
Any pointer,why its not working from maven deployment.
Regards
Deepika -
Classic report as email attachment
Hi,
Is there any way to send the classic report as an email attachment in xls format.
Regards,
SasiHi,
No, you cant to it for classical report. Convert it as an interactive report and check the email option under download section.
Regards,
Natarajan -
I just sent an email to someone - it was a brand new email not a reply. It had four attachments (screenshots) which I dragged into the mail from the desktop, When I looked at what I'd sent I saw that it had a second mail attached to the bottom of it, one that I had sent to someone else months ago. Why has this happened? Could be very awkward Now I'm worried that whatever I send will have some random second email attached...
I'm using 10.8.3 and Mail 6.3From your further explanations it sounds like your system sent two separate emails. This is what I think you have said:
You sent one email that you meant to send and it had an attachment you meant to attach.
An additional email got sent. We don't know why. It is a random email from December that got forwarded to the same recipient as the email you meant to send. And it is being arranged or colored in the list of emails as if it is related to the one you meant to send.
Is that correct?
I can't think of a way this could have happened. I'm just trying to nail down the problem so that when someone else comes around they'll know what the problem was. -
How to create an inbox item with attached BOR object?
Dear Colleagues,
Does anyone of you know a simple way to create inbox items for a user?
I would like to use the inbox for notifying users and attach a BOR object to the message as attachment. Is there a good and plain way to do that?
It would also be good, to be able to do the determination of the receiver by a customizable responsibility or something similar, so that it is not hard-linked to SAP user accounts.
Does anyone of you know a solution for this, that is not too complicated?
Also I read that in the future notifications should be usable in the UWL (Universal Work List).
I did not find anything but marketing material on UWL and I would not be terribly happy to set up a portal just for sending simple notifications/work items to people. Does anyone have a clue on how to accomplish this?
That would be wonderful, thank you.
Regards
ChristianDear Scott,
Thank you for this hint, the function looks promising.
Is there a way to specify a receiver group and a text for the text part of the message?
There is a Parameter called RECTYPE, which is expected to contain a "task id". The text seems to be derived in some way from the object type. Do you know any documentation or sample where this is used?
How do I specify the recipient and the message subject and text?
Concerning a single-step workflow: I don't know what the advantages/disadvantages are. The system receives a message or discovers a problem and wants to inform the related user.
A simple workflow should be possible, but I have no idea what that means in terms of complexity for implementation and customizing.
Sorry for so many questions and thank you.
Christian -
Send an SAP object (BUS****) as attachment with SAP Mail
Hi all,
I'd like to send a internal SAP(express)-mail
with a purchase order as business object (BO) attached. (here BO = BUS2012).
It's the same thing you can do with generic object services, GOS, to send a SAP business object as mail notification
attachment.
Can I use the function 'SO_DOCUMENT_SEND_API1' or
do I have to use the BCS-functions?
All the reports BCS_EXAMPLE* don't send a
business object.
Thanks in advance,
MarkusHi Markus,
Seems as if FM 'SO_DYNP_DOCUMENT_TRANSFER_API1' may popup a window. Below is a working program. Have fun!!
Cheers,
Ramki.
REPORT zramki_send_mail_bor .
*& Report ZRAMKI_SEND_MAIL_BOR
*& Send document with BOR Object as attachment
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 10 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
objdes(100).
* For the BOR attachment
CONSTANTS:
c_object_describe LIKE swotobjid-describe VALUE '*<OBJECT>*'.
DATA:
l_object TYPE swotobjid,
l_objheader LIKE soxobj.
PARAMETERS:
p_objtyp TYPE swo_objtyp OBLIGATORY,
p_objkey TYPE swo_typeid OBLIGATORY.
* Create Message Body
* Main Text
objtxt = 'Test Document.'.
APPEND objtxt.
objtxt = 'You will find a BOR object attachment in message.'.
APPEND objtxt.
objtxt = 'Have a nice day.'.
APPEND objtxt.
* Title and Description
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
docdata-obj_name = 'BOR Object'.
Concatenate p_objtyp '-' p_objkey into objdes.
Concatenate 'BOR Object' objdes 'as Attachment'
into docdata-obj_descr separated by space.
condense docdata-obj_descr.
* Write Packing List (Main)
CLEAR objpack-transf_bin.
objpack-head_start = 0.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
* Create OBJ attachment
l_object-describe = c_object_describe.
l_object-objtype = p_objtyp.
l_object-objkey = p_objkey.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = l_object-logsys
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e398(00) WITH 'No Log Sys Found'.
ENDIF.
MOVE-CORRESPONDING l_object TO l_objheader.
APPEND l_objheader TO objhead.
* Write Packing List (Attachment)
CLEAR objpack.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 0.
objpack-body_num = 0.
objpack-doc_type = 'OBJ'.
objpack-obj_name = p_objtyp.
objpack-obj_descr = Objdes.
APPEND objpack.
* Create receiver list
reclist-receiver = sy-uname.
reclist-rec_type = 'B'.
APPEND reclist.
* Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = '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
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 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
WRITE: / 'End of Program'. -
Forward PO as pdf attachment from Services for Object to external emails.
Hi, I am trying to forward PO to external email address from PO services for objects. I could not send as pdf document to external email address. SAP users are receving as SAP object in inbox. I can achieve this trough Message Determination for vendors. However my requirement is to forward to muliple external parties and internal users who do not have SAP access. Please advise any configuration or development need to be carried out to forward PO as pdf attachment. Advance thanks for your valuable inputs.
check answer given by Soumyaprakash in below thread:
http://forums.sdn.sap.com/thread.jspa?threadID=2111142 and
also have a look at below thread
http://forums.sdn.sap.com/thread.jspa?threadID=1324971
but i would like to know why you need to send PO to anybody but supplier?
yogesh
Edited by: Yogesh Lohiya on Feb 8, 2012 7:25 PM
Maybe you are looking for
-
Need help to trace the place where error occuring in Web UI of type System
Hi All, Need help to trace the place where error occurring in Web UI of type System error, this error coming while saving the corporate account creation, error message description : - System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR
-
As the title topic says, I am somehow having to buy 130 bucks worth of ink but I only get 11 or 12 actually viable print outs!!! Specifically, I am printing custom DVD case art/covers for my video game library. Yet the only way to actually get the pr
-
Issue with Clipping Mask when scrubbing timeline
Has anyone encountered an issue with editing a clipping mask or repositioning it on the timeline only to see that nothing moves on the timeline when scrubbing the playhead? This has occurred multiple times on different Edge Animate projects. So far t
-
Thinking of getting a iPad mini; does keynote app support Siri and vice-versa? Would like to open app and speak text into slides, video, etc.. Thanks
-
Batch status update through DI
Can I update batch status for an item through DI while creating a document from some Add-on? Is the batch status field exposed in DI? I am currently on SAP B1 2007A. If it is not possible on 2007A, is it possible on later versions of SBO like 8.8 fam