Certificate outgoing invoice - pdf attachment
Dear people,
I would like to ask you for help. When we create invoice, it is sent via email as pdf file attachment. I need to certify this attachment. There are many materials how to do it, but I nowhere found any complex solution. Right now we are using sapscript forms (releale 4.7) and are going to upgrade to ECC6. Here can be used pdf forms. There are also some materials how to certify created pdf but nothing helped me entirely.
I would like to have it fully automatic, no interactive forms, without user's interaction (selection of right certificate). So it should work this way: user creates invoice > it generates pdf file > this pdf is signed using certificate located on server > pdf is send via email. Do you know any complex solution?
Thank you.
David
David
Not an expert on this, but take a look at this OSS note and those contained within.
700495 - Digital Signature implementation by using signature tool
Also this help link:
http://help.sap.com/erp2005_ehp_04/helpdata/EN/db/aafb211ead420faeeaa24e99eb5f41/frameset.htm
Hope this helps.
Similar Messages
-
Email Invoices to customer as a PDF attachment
Hi,
I have a requirement as follows:-
SAP will get multiple invoice numbers from an external system. I need to send all the invoices(for a given customer) in one pdf and email it to the customer as an attachment.
Please provide your expert and detailed advice.
Thanks,
AniHi Ani,
Go through this u definetly got ur solution.
Here is the code to send the Smartform to mail as PDF attachment.
*& Report ZTEST_NREDDY_PDF_MAIL
REPORT ZTEST_NREDDY_PDF_MAIL.
Internal Table declarations
DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
WA_OBJHEAD TYPE SOLI_TAB,
W_CTRLOP TYPE SSFCTRLOP,
W_COMPOP TYPE SSFCOMPOP,
W_RETURN TYPE SSFCRESCL,
WA_DOC_CHNG TYPE SODOCCHGI1,
W_DATA TYPE SODOCCHGI1,
WA_BUFFER TYPE STRING, "To convert from 132 to 255
Variables declarations
V_FORM_NAME TYPE RS38L_FNAM,
V_LEN_IN LIKE SOOD-OBJLEN,
V_LEN_OUT LIKE SOOD-OBJLEN,
V_LEN_OUTN TYPE I,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZTEST'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
W_COMPOP-TDNOPREV = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = W_CTRLOP
OUTPUT_OPTIONS = W_COMPOP
USER_SETTINGS = 'X'
IMPORTING
JOB_OUTPUT_INFO = W_RETURN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 255 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Attachment
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
Create Message Body Title and Description
I_OBJTXT = 'test with pdf-Attachment!'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
Attachment (pdf-Attachment)
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smart'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = '[email protected]'.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
If you want to send some text as Body of the Mail then follow this once
when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
I_OBJPACK-TRANSF_BIN = ' '.
I_OBJPACK-HEAD_START = 000000000000001.
I_OBJPACK-HEAD_NUM = 000000000000001.
I_OBJPACK-BODY_START = 000000000000002
I_OBJPACK-BODY_NUM = 000000000000010.
I_OBJPACK-DOC_TYPE = 'RAW'.
append I_OBJPACK-.
by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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.
Reward points if helpful.
Thanks
Naveen khan -
Send Invoice as PDF Attachment with variable Filename
Hello!
We got a requirement from one customer. We should send our invoices as PDF-Attachment via E-Mail but the attachment must have a variable filename. At the Moment we can send invoice as PDF-Attachment but only with a fix filename.
How can we change the filename in our Adobe Forms?
Best Regards
MarkusHi Florian!
Answer 1:
The original Name is Druckdaten.pdf
Answer 2:
Our entry in NAST-NACHA = 1
Answer 3:
I can implement some ABAP-Code
Here some Screenshots:
Configuration of printer E-MAIL:
Best regards
Markus -
Adding body of email when invoice sent as an PDF attachment
Hi All,
How to add standard text (constant for all invoices) to the body of the invoice email sent to the customer? I added text in the 'Mail title and text' section of transation NACE, but it is not working. I'm using 'External medium' in the output type to email the invoice. The invoice is sent as a pdf attachment, but the body of email is blank.
I am using custom print program and form. The same print program and form are used for printing invoice also.
Thank You in Advance.
Sonali.hi
good
Please refer the following SAP Note for more information:
SAP Note : 888304
pls reward point if helpful.
thanks
mrutyun^ -
Invoice output as PDF attachment via email.
Hi All,
I have a requirement wherein an invoice when saved should generate a mail output (external send) with the invoice as a PDF attachment. I have the system set up for external send & scot settings but am stuck up with the PDF attachment. I also have the same requirement for PO output (because I look into both SD and MM). Any help on either of them would be greatly appreciated.
Thanks & Regards,
Vidya SagarHi,
[External Send - Sending PO by email|http://www.sap-img.com/materials/external-send-sending-po-by-email.htm]:
In order to send PO, your Basis team must configure the system first so that external email can be send out from SAP. If it is not configured, no settings you do on MM will work.
1. You must maintain email address in vendor master data.
2. The same applies to your user master data. For the output type for default values, a communication strategy needs
to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the
Customizing via the following path:
(SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy).
As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
3. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
4. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
5. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
6. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
Regards,
Srilatha. -
Send Invoice email with pdf attachement through DI?
Hi all,
is it possible to send an Invoice email with pdf attachement through DI as it can be done through UI?
Best Regards,
VangelisHi Vangelis,
I Don't think that the DI API has that functionality (but I am not sure).
However with .Net's System.Net.Mail it should be quite easy to build.
Good luck,
Johan -
Where we do attach scanned invoices(PDF) in MIRO.
Hi,
Following is the requirement,
What we want is the ability to attach a scanned invoice (pdf) to the IR. Without this we would have two separate filing systems u2013 attached invoices in SAP for PO items and hard copy filed for non-po invoices.
Is there any option in MIRO to attach Scanned invoice( PDF). Please give your valuable thought on the same.
Thanks in Advance.Hi, I just found some hints about it:
- Please check this threat: Archivelink to archive an image and link it to a parked MM invoice via RFC
- If you introduce your paper invoice in an archiving system, you must assign the invoice document. For that, use the barcode.
You can assign a document type in paper to each document type from all societies.
In the customizing for entering barcodes, you can specify is entering barcodes is activated and if the system must check the entered barcode according to the document type and user.
- Check the SRM workflow, if appropiate, I mean, if you use it.
-In Invoice Verification, you can store inbound and outbound documents in external storage
systems using SAP ArchiveLink.
The scanned documents are stored in an external storage system and linked to the relevant R/3
documents. You can display the stored documents from the display of the R/3 documents. Check http://help.sap.com/saphelp_ish471/helpdata/EN/78/ee034b0eb811d3b6ee0000e82de955/frameset.htm
JFS
Edited by: Jose Fernando Sanchez Enciso on Apr 26, 2011 3:19 PM
Edited by: Jose Fernando Sanchez Enciso on Apr 26, 2011 3:27 PM
Edited by: Jose Fernando Sanchez Enciso on Apr 26, 2011 3:28 PM -
Edit invoice smartform to email with pdf attachment
Hi,
I need to send the invoice details by mail that are currently only printed through the edit function.
When i go to VF02 enter invoice number and then edit, is it possible to send this message through email with the invoice as pdf attachment?
Also it would be necessary to enter receivers email at that time.
Maybe there is an exit before the sending that could raise a popup...
Do you think this can be done this way?
Thanks,
Laurent.Hi Laurent
I have done this succesfully in a different way:
1) Create a Z Table for the email ID per Bill to party - this table accomodates up to 999 email ids per customer and also has a column for CC
2) Create a new output type for EMAIL purposes with the Transmission medium as 1 -
assign the output program and form to this.
In the program, add new code to refer to the new Z table for getting the email ids of respective Bill to parties
In the program add code to convert the form to PDF format and attach to the email craeted.
Your ABAPPER should be able to assist in this code writing - in my case it took some time to get the desired result but the customers are very happy with the end result -
best wishes
Nandu -
Hi All,
I am able to send the PDF file in mail attachment, but the problem is the logo is not getting displayed correctly. Pls find my code below
REPORT ztestmail.
DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 45 WITH HEADER LINE.
DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
DATA: doc_chng LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
DATA : it_lines TYPE STANDARD TABLE OF tline,
it_line TYPE tline.
Creating the document to be sent
doc_chng-obj_name = 'Invoice'.
doc_chng-obj_descr = 'Invoice'.
objtxt = 'Invoice as Attachment'.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
Creating the entry for the compressed document
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'U:\PDF\2.PDF'
filetype = 'BIN'
TABLES
data_tab = it_lines
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA : gd_buffer TYPE string.
LOOP AT it_lines INTO it_line.
TRANSLATE it_line USING ' ~'.
CONCATENATE gd_buffer it_line INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
objbin = gd_buffer.
APPEND objbin.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
objhead = 'Invoice.PDF'. APPEND objhead.
Creating the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = tab_lines * 255.
objpack-body_num = tab_lines.
objpack-doc_type = 'EXT'.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'Reproduction object 138'.
APPEND objpack..
Entering names in the distribution list
reclist-receiver = 'mail address'.
reclist-rec_type = 'U'.
APPEND reclist.
* sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
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
operation_no_authorization = 4
OTHERS = 99.
Thanks,
RajuHi Raj008,
When you create post or reply, on right hand side all the markups are given...how to format text and all,
for code to be seen in readable format,
simply type the lines between
<open brace bracket > <the word 'code'> <closing brace bracket>
program lines
<open brace bracket > <the word 'code'> <closing brace bracket>
hope that helps you
sorry cant actually type the bracket, as it shows in code format
Please try replying again to 1 of the replies and check on right hand side of the editor.
Regards,
Radhika -
Error when opening the PDF attachment
Hi,
We are able to successfully send the PDF attachment to external email id from SAP SCRIPT:
but when we are opening the PDF attachment we are getting the following error:
"Adobe Reader could not open because it is not either a supported file type or the file has been damaged ..etc.."
Is any logic need to write for the above or any parameters are missing .
Can any one help...
Thanks in advance.Hi Ramana,
Just try below given example code.....In which I have just different function Module to convert from OFT to PDF....
AT END OF VSTEL.
IF R_EMAIL = 'X'.
*--Opening Layout set for Printing
PERFORM CLOSE_FORM.
SELECT SINGLE SMTP_ADDR INTO V_EMAIL
FROM ADR6
WHERE ADDRNUMBER = T_ADRC-ADDRNUMBER.
CLEAR T_LIPS.
READ TABLE T_LIPS WITH KEY VBELN = T_LIKP-VBELN.
CLEAR T_VBAK.
READ TABLE T_VBAK WITH KEY VBELN = T_LIPS-VGBEL.
CLEAR V_ADRNR.
SELECT SINGLE ADRNR
INTO V_ADRNR
FROM T001
WHERE BUKRS = T_VBAK-BUKRS_VF.
REFRESH T_CC_EMAIL.
CLEAR T_CC_EMAIL.
SELECT SMTP_ADDR INTO TABLE T_CC_EMAIL
FROM ADR6
WHERE ADDRNUMBER = V_ADRNR.
SELECT SINGLE smtp_addr
INTO cc_email
FROM adr6
WHERE addrnumber = v_adrnr.
IF T_TO_EMAIL[] IS INITIAL.
CLEAR T_CC_EMAIL.
REFRESH T_CC_EMAIL.
ENDIF.
PERFORM BUILD_PDF_DATA_TABLE.
Populate message body text
PERFORM POPULATE_EMAIL_MESSAGE_BODY.
CONCATENATE T_LIKP-VSTEL '-' 'Warehouse Release' INTO V_SUBJECT SEPARATED BY SPACE.
Send file by email as .xls speadsheet
PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
TABLES IT_MESSAGE
PT_CONTENTS_BIN "LINES "it_attach
USING V_EMAIL
V_SUBJECT
'PDF'
'Delivery'
'Deliveries'
CHANGING GD_ERROR
GD_RECIEVER.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
ENDIF.
ENDAT.
***---/End by sagun
ENDLOOP. "loop at t_likp.
***---/added by sagun 25.05.2007
IF R_EMAIL = 'X'.
WRITE /01 SY-ULINE(180).
WRITE :/55 'End of Report'.
ENDIF.
***---/end by sagun
ENDFORM. " PRINT_DELIVERY
*& Form close_form
text
--> p1 text
<-- p2 text
FORM CLOSE_FORM .
IF R_PRINT = 'X'. " added by sagun 24.05.2007
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF. " added by sagun 24.05.2007
IF R_EMAIL = 'X'.
*otf_table like itcoo occurs 0 with header line
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = .
TABLES
OTFDATA = HOTFDATA
EXCEPTIONS
UNOPENED = 3.
ENDIF.
ENDFORM. " close_form
*& Form BUILD_PDF_DATA_TABLE
text
--> p1 text
<-- p2 text
FORM BUILD_PDF_DATA_TABLE .
DATA : LC_FORMAT(3) TYPE C VALUE 'PDF'.
DATA: lt_tline TYPE tp_tline_standard_table,
DATA : L_BIN_FILESIZE TYPE I,
PC_CONTENTS_BIN_LINES TYPE I.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = LC_FORMAT
IMPORTING
BIN_FILESIZE = L_BIN_FILESIZE
TABLES
OTF = HOTFDATA
LINES = LINES
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC = 0.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
T_SOURCE_TAB = LINES
T_TARGET_TAB = PT_CONTENTS_BIN
EXCEPTIONS
CONVERT_NOT_POSSIBLE = 1
OTHERS = 2.
IF SY-SUBRC = 0.
DESCRIBE TABLE PT_CONTENTS_BIN LINES PC_CONTENTS_BIN_LINES.
ELSE.
... -->
ENDIF.
ELSE.
An OTF conversion error occured
-->
ENDIF.
ENDFORM. " BUILD_PDF_DATA_TABLE
*& Form POPULATE_EMAIL_MESSAGE_BODY
text
--> p1 text
<-- p2 text
FORM POPULATE_EMAIL_MESSAGE_BODY .
REFRESH IT_MESSAGE.
IT_MESSAGE = 'Please find enclosed here with our Warehouse Release Document(s)'.
APPEND IT_MESSAGE.
CLEAR IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
APPEND IT_MESSAGE.
IT_MESSAGE = 'For United Phosphorous Inc.'.
APPEND IT_MESSAGE.
CLEAR IT_MESSAGE.
APPEND it_message.
APPEND it_message.
APPEND it_message.
IT_MESSAGE = 'TEST EMAIL from 520 clinet please ignore it'.
APPEND IT_MESSAGE.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
text
-->PIT_MESSAGE text
-->PIT_ATTACH text
-->P_EMAIL text
-->P_MTITLE text
-->P_FORMAT text
-->P_FILENAME text
-->P_ATTDESCRIPTION text
-->P_SENDER_ADDRESS text
-->P_SENDER_ADDRES_TYPE text
<--P_ERROR text
<--P_RECIEVER text
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.
p_filename = 'INVOICE'.
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 PIT_ATTACH INDEX W_CNT.
W_DOC_DATA-DOC_SIZE =
( W_CNT - 1 ) * 255 + STRLEN( PIT_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.
LOOP AT T_TO_EMAIL WHERE EMAIL <> SPACE.
CLEAR T_RECEIVERS.
T_RECEIVERS-RECEIVER = T_TO_EMAIL-EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
CLEAR T_RECEIVERS.
ENDLOOP.
copy email address
CLEAR T_RECEIVERS.
IF NOT T_RECEIVERS[] IS INITIAL.
LOOP AT T_CC_EMAIL.
T_RECEIVERS-RECEIVER = T_CC_EMAIL-EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
T_RECEIVERS-COPY = 'X'.
APPEND T_RECEIVERS.
CLEAR T_RECEIVERS.
ENDLOOP.
ENDIF.
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.
IF SY-SUBRC = 0.
FORMAT COLOR COL_NORMAL ON.
LOOP AT T_LOG.
WRITE :/03 T_LOG-VBELN,
19 SY-VLINE,
20 T_LOG-KUNNR,
34 SY-VLINE,
35 T_LOG-NAME1,
76 SY-VLINE,
77 T_LOG-EMAIL,
110 SY-VLINE,
111 'Email Sent Successfuly',
180 SY-VLINE.
ENDLOOP . "t_log
FORMAT COLOR COL_NORMAL OFF.
CLEAR T_LOG.
REFRESH T_LOG.
ENDIF.
IF SY-SUBRC NE 0.
CASE LD_ERROR.
WHEN 1.
V_ERROR = 'too_many_receivers' .
WHEN 2.
V_ERROR = 'Email address not found in Customer Master' .
WHEN 3.
V_ERROR = 'document_type_not_exist'.
WHEN 4.
V_ERROR = 'operation_no_authorization'.
WHEN 5.
V_ERROR = 'Email address not found in Customer Master'.
WHEN 6.
V_ERROR = 'x_error'.
WHEN 7.
V_ERROR = 'enqueue_error'.
WHEN 8.
V_ERROR = 'Error in sending email' .
ENDCASE.
FORMAT COLOR COL_NEGATIVE ON.
LOOP AT T_LOG.
WRITE :/03 T_LOG-VBELN,
19 SY-VLINE,
20 T_LOG-KUNNR,
34 SY-VLINE,
35 T_LOG-NAME1,
76 SY-VLINE,
77 T_LOG-EMAIL,
110 SY-VLINE,
111 V_ERROR,
180 SY-VLINE.
ENDLOOP . "t_log
FORMAT COLOR COL_NEGATIVE OFF.
CLEAR T_LOG.
REFRESH T_LOG.
ENDIF.
ENDFORM. " SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
text
--> p1 text
<-- p2 text
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
Reward Point If it usefull....
Cheers,
Sagun Desai.... -
E-Mail problems - will not open pdf attachment found in my e-mail...
Here what I’m using:
OS X (10.3.9)
safari 1.2 (v125)
SBC Yahoo DSL (sbcglobal.net)
SBC MAIL
Running through Safari 1.2 (v125)
Over the weekend I elected to empty my cache and reset Safari (don’t ask me why - I guess I through by doing so it would speed up Safari which as been running a bit show of late) - now I’m unable to open any of my current or new pdf attachments.
I open a pdf attachment, it runs a antiVirus check, then when I try to open the attachments itself from the AntiVirus window it opens a black windows and stops - no pdf document!
So what's up and what do I do?
thanks in advance for the help I going to get!
ric rYou don't need to run any antivirus software at the present time with OS X. There are no viri that currently affect OS X which has been available for 5 years and counting and if the antivirus software used is causing problems which isn't protecting you from anything anyway, you should use the uninstall feature to remove it from the hard drive if included with the antivirus software installed.
You don't need to install any software provided by an ISP which can sometimes cause more problems than it helps.
You can download Firefox for free to test if the same occurs.
http://www.mozilla.com/firefox/
I would like to get myself over to mac's own
service Mail but just how is the question?
The required account information to set up your SBC email account with the Mail.app is provided on SBC's website or you can call SBC.
SBC will tell you they don't support the Mail.app but all you need is the following:
* Account Type - I'm sure POP is the account type.
* Incoming Mail Server
* Account User Name - usually the portion of your email address in front of the @ sign only but for some providers it is the entire email address.
* Account Password - this you should know.
* Outgoing or SMTP server and is the SMTP server authenticated? I don't believe SBC requires or supports SMTP authentication but if authenticated, ask what type of authentication. If SMTP authentication is required, it is usually password authentication which requires entering the same user name and password required to check the account's incoming mail server for new mail.
This is all you need to create and access the account using the Mail.app.
Regarding using Norton SystemWorks, don't. It is poison for OS X and can cause more problems than it resolves. Symantec announced almost 3 years ago they will no longer be supporting SystemWorks or Disk Doctor with OS X but they continue to sell their garbage and they don't sell a Tiger compatible version.
If installed on your hard drive, use the uninstall feature included to remove it and discontinue its use altogether. I believe the uninstall utility included has some problems so visit Symantec's website for an updated removal utility and/or for proper removal instructions. Symantec products installs a large number of components all over the hard drive. -
PDF Attachment while posting thru MIRO / FB60
Dear Friends,
I need your help on the following scenario.
Requirement:
we are going to build an interface for invioce postings in SAP using Tcode FB60(Invioce with out PO) and MIRO(with PO).
Data has to be picked up by the interface from a staging server where each invoice data is available in .dat format.
Data for posting is from the .dat file. We are going to store that in Z tables and will use for posting.
But our additional requirement is each invoice will have a PDF document(supporting document for that invoice), it is not the invoice as such, but an additional document.
While doing the posting in SAP thru FB60/MIRO transaction, the PDF file corresponding to this invoice has to be attached with this posting.
Problem Areas:
We know that an attachment can be uploaded thru transaction in FB03 after the posting is done using Object Services.
1. But our concern is how can they be attached programatically?
2. Can't we attach the file while doing Posting either thru FB60 or MIRO?
3. How to extract those PDF files placed in another server and attach during the background job?
Any help/inputs on this is highly appreciated.
SAP Version: 4.7 Enterprise edition
Note: Content of the PDF attachment is not the data for invoice posting, no need to read its contents, it only has to be attached with the posting.
Regards,
SimhaChange in requirement..
Hence i am closing this thread.
Regards,
Simha -
Idoc to RNIF with pdf attachment
Hi
I am implementing a Idoc to RNIF with pdf attachment. I have to pick the pdf file from an ftp server in PI based on the invoice number in the idoc. I could not find a blog or documentation on how to attach the pdf file. The only viable solution I found is to create a module in this forum [Re: Using attachment with RNIF|Re: Using attachment with RNIF] Has anybody implemented this in any other way? Also, in this solution its not clear how both the messages and pdf file are reaching the rnif adapter together.
Can somebody give a step by step solution?
I am on PI 7.1 Ehp1
Thanks in advance
AsifAnyone working/worked with RNIF adapter would like to share their experience.
-
Portrait Layout of the pdf attachment in email (T-code: VL71)
Hi all,
I have a problem with the layout of the pdf attachment in email. The sapscript layout is already set to Portrait.
When I print or preview the form, it is in portrait. but when I sent it through email, the form became LANDSCAPE layout in pdf file. I dont know what i happening. I had tried to check everything possible but just useless. Please give me some light.
t-code = VL71
output type = LQFF (Certificate of Analysis)
I had checked T-Code: NACE, the method = 5 External Send. but there is no way to see whether the attachment is send as Portrait Layout or Landscape Layout.
I want it to be in PORTRAIT when send as attachment through External Send. How to set/configure the pdf layout when sending it through email?
Any idea & help are greatly appreciated.
THanks.Hi,
It has something to do with the printer or email setting, I personally think it is not ABAPer's role to set it.
SAP Standard Print program is used. RQCAAP00
Please help. thanks -
PDF attachment opens wrong file
I have had a few problems now when emailing a PDF attachment.
I save a document as a PDF and then email it to a client however
when the client opens the attachment, it opens a previous
attachment that I sent them i.e. I send them an invoice dated
15/09/08 however when they open the attachment, the invoice is for
one that I sent months ago dated 12/02/08. I usually save the PDF
attachment as the same file name each month hence overiding the
previous saved file so I'm not sure why it would open as an old
file. Any help on this would be greatly appreciatedWelcome to our community, charmyaus
You are in a forum designed for supporting Adobe Captivate.
From what you have posted, it would seem your question would be
better suited for the Adobe Acrobat forum. You might try re-posting
the question there. The link below should take you there.
Click
here to visit the Acrobat forums
Cheers... Rick
Maybe you are looking for
-
How do I use a MacBook with a Thunderbolt Display?
I have a new Thunderbolt Display which I use with a new Mac Mini. If possible, I would like to attach my 2008 era MacBook to the Thunderbolt Display to take advantage of the bigger screen. I understand that MacBook doesn't have Thunderbolt and the Th
-
Squeezed Image in QuickTime from FCP
Although I've come close to finding my specific issue when perusing the discussions, I haven't had much success. I shot in 16:9 on the XL2. I changed all my settings in FCP before logging and capturing to accommodate this. It looks fine in FCP, inclu
-
I've been using Firefox as the default browser on my systems (both Windows and Linux and in 32 or 64 editions) and for some reason Firefox consumes too much memory. Now trust me. I have a very fast machine and so I get very frustrated with this issue
-
Deleting photo albums in the photo folder
Hi, in my photos folder on the phone, I have a photo album which I want to delete.But I can't seem to find an option to delete it.Any help please.
-
File Associations gone.
I originally had CS6 installed before upgrading to CC and then CC 2014. On the latest update notification, I decided to uninstall CS6 so I don't keep getting update notifications. Once I did that, I lost my file extension associations for those pro