Send the pdf document as attachment
Hi all,
I have requirement as send the archived IXOS image(Object type IMAGE ) as attachment to an email sent to outlook.
I used sendtaskdescription method to send email.
But attachments are type SOFM and my attachment of type IMAGE which is not supported to bind.
I am passing the IMAGE object to sendtaskdecription but attachment is not coming.
If there any way that i can convert the ixos image of type SOFM and send kindly advice.
Thanks inadvance.
Moderator message -
Total Posts: 172
Total Questions: 81 (78 unresolved)
If you assign po(i)nts and close your old posts, that will encourage people to respond to your new questions.
When closing old threads, there is no need to add a comment. Adding a answer like "solved" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.
Rob
Similar Messages
-
Can any one please send the pdf document TEP12
Hi Portal experts,
Can any one please send the pdf document TEP12?
Thanks,
Jitender>
jitender d wrote:
> Hi Portal experts,
> Can any one please send the pdf document TEP12?
>
> Thanks,
> Jitender
You are not allowed to ask for any Document like this
Reported......
Faisal -
Error opening the PDF file while sending the PDF as an attachment
Hi All,
I am sending a PDF as an attachment in the mail. I am using the code pasted on 'Jul 28, 2006 8:59 AM' subject OTF Format of Purchase Order in email unreadable.
My problem is when I open the attachment in SOST or in the mail, I get the error message "Adobe could not open *.PDF because it is either not a supported file type or because the file type has been corrupted."
Please let me know if anybody has faced such an issue.
The code is found below.
FORM MAIL_OBJECT *
This routine receives OTF data. OTF data is converted to PDF
format and send to the Partner's email address
FORM mail_object TABLES otf_data STRUCTURE itcoo .
DATA: pdf_size TYPE i, " PDF Size
pdf_itab_size TYPE i, " Attachment size
mailtxt_size TYPE i, " Text in mail size
l_vbeln LIKE vbdka-vbeln. " Order Doc
DATA:
it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, " Mail Text
it_pdf TYPE TABLE OF tline WITH HEADER LINE, " OTF output
it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
it_mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE," Header data
it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, " Rec List
it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE. " Attachment data
DATA: it_doc_att LIKE sodocchgi1. " Attri of new doc
DATA: BEGIN OF it_pdfout OCCURS 0, " PDF in 255 length
tline TYPE char255,
END OF it_pdfout.
Sales doc and Customer
DATA: BEGIN OF i_vbeln OCCURS 0,
vbeln LIKE vbpa-vbeln, " Sales Document
adrnr LIKE vbpa-adrnr, " Customer
END OF i_vbeln.
Sender Address no and SMTP address
DATA: BEGIN OF i_addrs OCCURS 0,
addrnumber LIKE adr6-smtp_addr,
smtp_addr LIKE adr6-smtp_addr,
END OF i_addrs.
Convert OTF to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = pdf_size
TABLES
otf = otf_data
lines = it_pdf.
Make each line 255 characters
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
TABLES
content_in = it_pdf
content_out = it_pdfout.
Create the PDF File
CLEAR it_pdfdata.
REFRESH it_pdfdata.
it_pdfdata[] = it_pdfout[].
LOOP AT it_pdfout.
MOVE it_pdfout-tline TO it_pdfdata-line.
APPEND it_pdfdata.
CLEAR it_pdfdata.
ENDLOOP.
DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
Text in the mail.
it_mailtxt-line = 'ORDER ACKNOWLEDGEMENT'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--1'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--2' &
' This is a test mail, Line Number--2'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5'.
APPEND it_mailtxt.
DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
Document Number for Output
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = vbdka-vbeln
IMPORTING
output = l_vbeln.
Attributes of new doc
CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
INTO it_doc_att-obj_descr SEPARATED BY space.
it_doc_att-sensitivty = 'F'.
it_doc_att-doc_size = mailtxt_size * 255.
Create Pack to text in mail body.
CLEAR it_mailpack-transf_bin.
it_mailpack-head_start = 1.
it_mailpack-head_num = 0.
it_mailpack-body_start = 1.
it_mailpack-body_num = mailtxt_size.
it_mailpack-doc_type = 'RAW'.
APPEND it_mailpack.
Create Pack to PDF Attach.
it_mailpack-transf_bin = 'X'.
it_mailpack-head_start = 1.
it_mailpack-head_num = 1.
it_mailpack-body_start = 1.
it_mailpack-body_num = pdf_itab_size.
it_mailpack-doc_type = 'PDF'.
CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
it_mailpack-doc_size = pdf_itab_size * 255.
APPEND it_mailpack.
*Get email addresses based on Sales document.
SELECT vbeln adrnr INTO TABLE i_vbeln
FROM vbpa
WHERE vbeln = vbdka-vbeln AND
parvw = nast-parvw.
IF NOT i_vbeln[] IS INITIAL.
SELECT addrnumber smtp_addr INTO TABLE i_addrs
FROM adr6 FOR ALL ENTRIES IN i_vbeln
WHERE addrnumber = i_vbeln-adrnr AND
smtp_addr NE space.
ENDIF.
IF i_addrs[] IS NOT INITIAL.
LOOP AT i_addrs.
it_reclist-receiver = i_addrs-smtp_addr.
it_reclist-express = 'X'.
it_reclist-rec_type = 'U'.
it_reclist-notif_del = 'X'. " request delivery notification
it_reclist-notif_ndel = 'X'. " request not delivered notification
APPEND it_reclist.
CLEAR: i_addrs.
ENDLOOP.
ENDIF.
Call FM to send email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = it_doc_att
put_in_outbox = 'X'
TABLES
packing_list = it_mailpack
object_header = it_mailhead
contents_txt = it_mailtxt
contents_hex = it_pdfdata
receivers = it_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorizationfiltered= 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.
ENDFORM. " MAIL_OBJECT
Regards,
AjithHi Ajith !!
Please refer this link :
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Here a spool output is converted into PDF and then sent as an email.
I think instead of using FM to change the width, try the logic mentioned in the link.
Also instead of FM CONVERT_TO_OTF use :
1. CONVERT_OTFSPOOLJOB_2_PDF
I hope this should solve the problem.
I had referred the same program from the link and it worked absolutely fine. Also check the adobe acrobat version, i guess old version doesnt support SAP, though not very sure.
Best regards,
Prashant -
Sending a PDF document to printer directly
Hi,
can any one help me in printing a PDF file stored in the system to be sent to printer from abap code.
thanks in advance.hi here is the program to print the pdf document directly..
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_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.
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.
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[] = it_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.
regards,
venkat -
Email sending with pdf document?
hi folks,iam using jdeveloper 11.1.2.3.0 my requirement as follows
Iam sending the mail with an attachment of pdf document..
i have two tables proforma invoice table(colums are ex:finalized date and chargepartycode) and chargepartymaster table(columns are ex:chargepartycode and email)..here when ever the proforma is finalized,i pick all the finalized records with respective chargepartycode,and pick email from chargepartymaster with respective chargepartycode ,now i need to send a mail for the respected email upto here fine.here is my requirement
single chargeparty has multiple invoice will so i need to generate single pdf for same chargepartycode and send it to the respected email ,here problem is generating the pdf for same chargeparty in one page and different chargeparties in different pages..howHi,
I think we need to split the question:
1. Create a PDF file and send a mail from ADF
Here ADF doesn't provide specific libraries and thus you want to Google for Java APIs to i) create PDF documents and ii) send a mail with attachment
2. Query invoices and associated details
This can easily be done in ADF by querying a View object for the invoice and then use its view link accessor to access detail rows. How to access a detail from a master row is explained in the Fusion Developer Guide on OTN
http://docs.oracle.com/cd/E37975_01/web.111240/e16182/toc.htm
Frank -
Emailing Generated PDF Document as Attachment - Error
Hi Forum,
A custom Print Form was developed using SFP Transaction and trying to send the Form to the vendors using an email attachment.
1. Used cl_bcs class for sending email. Attachment data(Generated PDF Output) was moved to solix_tab .
2. In the email attachment I see a PDF attachment with some funny characters and not the PDF Document I see in the print preview
Please advice me what I should do to the actual PDF document in the email attachment .
Thanks,
Vijay.Vijay,
Please try this solution.
Characters that are not included in the ASCII character set are not displayed correctly due to an incorrect encoding setting of the browser.
During the display of the overview in the PDF format, errors may occur in certain versions of the Adobe Acrobat Reader. In this case, a blank page is displayed.
The problem is caused by a program error.
Adobe, Acrobat, Reader, PDF
Reason and Prerequisites
The problem is caused by a program error.
SAP WebAs sends incorrect encoding information to the browser so that the latter does not switch to the correct encoding utf-8 automatically.
Some versions of the Adobe Acrobat Reader may have problems with that, for example version 6.0.
<b>Solution</b>
Import the corresponding Support Package.(presumably SP4)
Alternatively:
The revised version with various changes in the translation is provided by the attachment of this note.
Refer to the detailed description in Note 13719 on how to download and implement the corrections into your system.
Thanks,
Raj. -
Issue in sending the email with XL attachment in ECC version
Hi,
I have an issue with sending the email with XL attachment. My program is sending a mail to the receiver with XLS as attachment. Recently we have migrated from 4.6B to ECC version. Same code was worked in 4.6B.But it is not working in ECC version.When i try to open the attachment, i get a Dialog Box with the following message
"The file is not in a recognizable format.
1. if you know the file is from another program whih is incompatible with Microsoft excel,click cancel,then open this file in its original application
2.If you suspect the file is damaged, click help for more information about solving theproblem.
3.if you still want to see what text is contained in the file, click OK.Then click the text import wizard. "
when i click OK, the excel sheet is opening with all required data.
Can anyone kindly tell me why this is happening.
I am also attaching part of the coding related to this requirement.
*& Form BUILD_XLS_DATA_TABLE
text
--> p1 text
<-- p2 text
FORM build_xls_data_table.
DATA: w_total(13),
w_clabs(13),
w_cinsm(13),
w_ceinm(13),
w_cretm(13),
w_cspem(13),
w_cumlm(13),
w_exp_date(8),
w_v_totalp(13),
w_min_rem(8),
w_ersda(10),
w_hsdat(10),
w_vfdat(10),
w_ship_date(10),
w_plnmg(13),
w_mhdrz(4).
CLEAR: w_total, w_clabs, w_cinsm, w_ceinm, w_cspem, w_exp_date,
w_v_totalp, w_min_rem, w_ersda, w_hsdat, w_vfdat, w_ship_date,
w_plnmg, w_mhdrz.
w_total = it_batch1-total.
w_clabs = it_batch1-clabs.
w_cinsm = it_batch1-cinsm.
w_ceinm = it_batch1-ceinm.
w_cspem = it_batch1-cspem.
w_cumlm = it_batch1-cumlm.
w_cretm = it_batch1-cretm.
w_exp_date = it_batch1-exp_date.
w_v_totalp = it_batch1-v_totalp.
w_min_rem = it_batch1-min_rem.
w_plnmg = it_batch1-plnmg.
w_mhdrz = it_batch1-mhdrz.
CONCATENATE it_batch1-ersda6(2) it_batch1-ersda4(2)
it_batch1-ersda+0(4) INTO w_ersda SEPARATED BY '.'.
CONCATENATE it_batch1-hsdat6(2) it_batch1-hsdat4(2)
it_batch1-hsdat+0(4) INTO w_hsdat SEPARATED BY '.'.
CONCATENATE it_batch1-vfdat6(2) it_batch1-vfdat4(2)
it_batch1-vfdat+0(4) INTO w_vfdat SEPARATED BY '.'.
CONCATENATE it_batch1-ship_date6(2) it_batch1-ship_date4(2)
it_batch1-ship_date+0(4) INTO w_ship_date SEPARATED BY '.'
CONCATENATE
it_batch1-werks it_batch1-mtart it_batch1-matnr it_batch1-maktg
it_batch1-prdha it_batch1-prctr it_batch1-ktext it_batch1-dispo
it_batch1-charg it_batch1-lgort it_batch1-herkl w_clabs
w_cinsm w_ceinm w_cretm w_cspem
w_cumlm w_total it_batch1-meins it_batch1-v_spr_unit
w_v_totalp it_batch1-waers w_plnmg it_batch1-meins
w_ersda w_hsdat w_vfdat w_exp_date
w_ship_date w_mhdrz w_min_rem it_batch1-zlifer
it_batch1-doknr it_batch1-dokar it_batch1-doktl it_batch1-dokvr
INTO L_STRING SEPARATED BY CON_TAB.
INTO l_string SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
WHILE l_string <> space.
CALL FUNCTION 'TEXT_SPLIT'
EXPORTING
length = 255
text = l_string
as_character = 'X'
IMPORTING
line = it_attach
rest = l_string.
IF l_string = space.
CONCATENATE IT_ATTACH CON_CRET INTO IT_ATTACH.
CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
APPEND it_attach.
CLEAR it_attach.
ELSE.
APPEND it_attach.
CLEAR it_attach.
ENDIF.
ENDWHILE.
move l_string to it_attach .
CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
APPEND it_attach.
CLEAR it_attach.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
text
--> p1 text
<-- p2 text
FORM send_file_as_email_attachment.
DATA:w_length TYPE i.
DATA: 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,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
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 = text-034 .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
DESCRIBE TABLE it_attach LINES w_cnt.
DESCRIBE TABLE it_message LINES w_cnt.
READ TABLE it_message INDEX w_cnt.
w_length = STRLEN( it_attach ).
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_message ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = text-034.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_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.
***Start of changes by 501507008 on 29.01.2009
t_packing_list-obj_descr = 'MAIL BODY'.
***End of changes by 501507008 on 29.01.2009
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 = 'XLS'.
t_packing_list-obj_descr = text-034.
t_packing_list-obj_name = 'filename'.
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.
LOOP AT it_adr6.
t_receivers-receiver = it_adr6-smtp_addr.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
ENDLOOP.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ' '
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.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
commit_work = ' '
IMPORTING
sent_to_all =
new_object_id =
tables
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
contents_hex =
object_para =
object_parb =
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.
ENDIF.
ENDFORM. " SEND_FILE_AS_EMAIL_ATTACHMENTHi,
could you tell me which opeion should i select in SCOT under INT node. I have tried with diffrent options. but no luck.
SAPscript/Smart Forms - No Conversion
ABAP List - No Conversion
Business Object/Link - No Conversion
RAW Text - No Conversion -
Issue with getting the entire spooled job into the pdf document
Hi All,
My scheduled job runs fine and completes successfully but it appears to have some issues with getting the entire spooled job into the pdf document which it sends to a an end user.Has anyone encountered it before.Your kind assistance would be appreciated.
Thank you.
Regards,
JohnHi,
Please read below link for your query:-
http://help.sap.com/saphelp_nw04/helpdata/EN/85/54c73cee4fb55be10000000a114084/content.htm
Regards,
Anil -
Submitting a PDF form --- save and send completed PDF document?
A small government site has a number of 'submittable' PDF
form documents
that they'd like me to include on the website. I am not very
familiar
with PDF forms in this way, and hope someone here can help
sort out a
few things...
Can a PDF form be submitted so that
a) the completed PDF doc is saved on the server (and renamed)
b) a printable , completed PDF (looks just like the one they
filled out,
with all their values saved in the input boxes) is emailed to
specific
address
c) the raw user data is saved to database (maybe a list of
fields in one
column of a db table, and a matching list of values in
another? this
would just be for backup in case the completed PDF did not
save
correctly to the server, or for later reference)
We've looked at the standard Acrobat 'submit via email' and
that won't
cut it... that method appears to simply trigger a 'mailto'
popup, with
the pdf as an attachment. Our system needs to be automated
via CFmail.
None of these would handle any 'sensitive' information, the
main
concern, from their part, is people being able to submit the
form and
have both the city office and the recipient get a copy that
prints just
as if they had hit 'print' when filling out the actual PDF.
Is all of this possible ??
if so... any tips appreciated!
Michael Evangelista, Evangelista Design
Web : www.mredesign.com Blog : www.miuaiga.com
Developer Newsgroups: news://forums.mredesign.comnobody?
seems i can do some of this with 'cfpdfform'... looking into
it but also
seeking live examples/experience.
Michael Evangelista, Evangelista Design
Web : www.mredesign.com Blog : www.miuaiga.com
Developer Newsgroups: news://forums.mredesign.com -
How to get the PDF Document version when using Digital Signature
Hi,
I have a form which contains two signature fields.
When i sign the form the pdf document is saved as a version which can be seen by clicking the Signature Panel.
I need to get the binary of the versions stored in the form.
Please suggest me the how to get the version data from the form.
Regards,
S.V.atish KumarHi Mithun:
I think I have run into a similar issue and have not been able to find a resolution.
I have been trying to place three groupings of data and limit them to 15 rows; additional rows would print on a void check on a next page using the rtf template.
Earnings .............. Pre-Tax Deductions .........Taxes
<line 1 earnings> <line 1 pre-tax deductions> <line 1 tax dedcutions>
<line 2 earnings> <line 2 pre-tax deductions> <line 2 tax dedcutions>
<line 3 earnings> <line 3 pre-tax deductions>
<line 4 earnings> <line 4 pre-tax deductions>
<line 5 earnings>
<line 6 earnings>
The template works fine with these lists as nested tables until I add in the restriction and filler for the 15 rows for the first table. The data in the 2nd two lists does not appear once the limitation is added.
Check Writer (XML) - Issues with payroll check stub in rtf
As an alternative, I have been thinking adding the remaining line totals (over 15 rows) and adding a 16th row. However I have been running into an error when trying to use the code for-each-group.
*** XML-22056: exactly one of four group attributes must be present in xsl:for-each-group
Can you send me your template to review? My email is: Karen.Lacey(AT)paetec(DOT)com
Thanks!
Edited by: RedLacey on Dec 17, 2009 11:48 AM -
Issue while Signing and Encrypting the PDF Document.
Hello,
I am developing one component in VC++(MFC) which signs and encrypts the pdf documents.
When i sign and encrypt pdf document using my component, I am getting following error while opening the document in Adobe Acrobat
Error during signature verification
Unexpected byte range values defining scope of signed data.
Details: The signature byte range is invalid
But if i open that document in binary mode and calculate the byte range its looking correct.
The Process for signing and encrypting the PDF document is as follows :
1)Prepare the PDF document for signing (Add Annotation objects,n0,n2
layers,create blank signature field,new xref section etc.)
2)Encrypt the whole document(Password based encryption).
3)Put the ByteRange values.
4)Write the signature in blank signature field.
If i just perform encryption(128 bit RC4 Algorithm) on the pdf document its working fine.Only after adding the signature objects i am getting above error.I think it means something is wrong in signature related objects,but i am not able to recognize the exact problem.
So what can be the issue?
Please Help
Thanks in Advance
PriyankaI am sending the Sample Files
blank.pdf file is a original file
http://www.2shared.com/file/4677649/3f341d92/blank.html
step 1: I am adding Signing object(without data in Contents<> key) in
blank.pdf file.
Output File is Prepared-blank.pdf
http://www.2shared.com/file/4677648/48332d04/Prepared-blank.html
step 2: Sending Prepared-blank.pdf file for encryption.
Output File is SignednEncrypted-blank.pdf which is Encrypted and Signed.
http://www.2shared.com/file/4677647/d88c3095/SignednEncrypted-blank.html
Password for opening SignednEncrypted-blank.pdf is : "a".
Please help.
Thanks. -
R12 : System Failed to generate the PDF Document.
I am trying to create a PO thru auto create but I hit inquire > View Document , I encountered an error: System Failed to generate the PDF Document. Please contact your system administrator. We just updgrade our instance from 11.5.2.10 to r12.1.2. Any thoughts?
Thanks,
LeoPlease see if these docs help.
System Fails To Generate PDF Document After Clicking "PDF Document" On Supplier Notification When Different Languages Are Used [ID 1078546.1]
PO Email From Tools>Communicate At Same Time of Approval Corrupts PDF File Transmits As .HTML & System Failed to Generate PDF [ID 1287488.1]
Thanks,
Hussein -
I have received a PDF which prints fine in Windows 7 but with Windows XP I get "Acrobat Reader An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." and a blank piece of paper passes through the printer. I appreciate that Windows XP is no longer supported but I would like to think that the solution to this problem is not too difficult!
I have tried Acrobat 9, 10 and 11.
Any advice (apart from use Windows 7! ) would be most welcome.
Many thanks.If you use the same Adobe Reader versions with the same PDF on Windows 7 and XP, then I would expect the outcome to be the same.
Is this a local or online PDF?
If local, is the file really exactly the same?
If online, in what browser? -
I'm using Acrobat XI on Windows. I want to add my company's logotype as a watermark to a PDF document. How can I do this? When I add it as a file (jpeg), the logotype is printed on a white square background. It will be positioned on the PDF document on a light, uniform yellowing color. I want this to show through, as if the logotype was stamped directly on the document. Thanks.age to be completely transparent
The above was truncated and garbled a bit and I can't figure out how to edit it. So just to repeat the question a bit more clearly: "I'm using Acrobat XI on Windows. I want to add my company's logotype as a watermark to a PDF document. When I add it as a file (jpeg), the logotype is printed on a white square background (because the jpeg is square with a white background of course). It will be positioned on the PDF document on a light, uniform yellowish color, which I want to show through. I want it to look as thought the logotype was stamped directly on the document. Thanks.
-
How to send a PDF document to a FAX Server in SAP ? - Urgent
Dear All
Can you please provide inputs as to how one can send a PDF document to a FAX server . In my SCOT i have config done for FAX . I am able to send PDF document via e-mail . Wonder how to use FM 'CONVERT_OTF_AND_FAX' for sending fax ? There is a parameter called FAXOPTIONS in export parameter which we need to pass . What all we need to pass in here ? any idea or some other way here?
Best Regards
Shovitcheck this sample program
BCS_EXAMPLE_2
Regards
Raja
Maybe you are looking for
-
My 4s will not back up to the cloud
I am unable to back up my 4s to the Cloud. The storage on my phone is full, but the iCloud storage 13.2 GB of available storage. My phone has not back up is 6 weeks and I would like to be sure to do so before purchasing a new phone. When I choose
-
HT1719 how do i connect the fourth generation iPod shuffle to the computer?
I was given an ipod shuffle 4th generation and see only a headphone plug. How do I download music to it?
-
Hi All, How can I find the average daily growth of a database for the last one year? Database version:11.2.0.2 OS:HP-UX
-
Hi All , I have a field Airticket , so i need to allow the user Yes or No for that field so using redio button i placed , but how to display both side by side (Yes Rediobutton No Rediobutton) instead of diplying in 2 lines (Yes Rediobutton No Rediobu
-
Hello, I have two questions/problems. The attachment is a very simple and limited version of the program I'm making. So removing or changing functionality is not possible or should take weeks. The program is based on FSM with Enum as Strict type cont