Sending and Receiving Email With Attached Interactive Forms in ABAP - Webinar Powerpoint
Sending and Receiving Email With Attached Interactive Forms in ABAP - Webinar Powerpoint
Process Interactive
Forms via Email in AS
ABAP.
Jeff Gebo
NetWeaver RIG, SAP Labs LLC
Introduction
Creating Interactive Forms in AS ABAP
SMTP in AS ABAP
Sending Email with attached Interactive Forms
Processing Inbound Emails
Processing Interactive Forms
Interactive Form Offline Scenario
E-mail / SMTP
SAP
NetWeaver
Adobe Reader
offline
User fills out form offline, submits form via email when online.
Form Interface
Represents the data structures you wish to display or have the user
enter on the Interactive Form.
Can be simple types, structures or tables.
Form
Create a form and assign the form interface to it. Data elements in the
form interface can then be used in the form.
LiveCycle Designer is displayed in the Layout mode of the form.
Context Layout
Interface
PDF-based
form template
activate
ABAP
Application function
program module
(generated)
Print Form
or
Interactive
Database Form
Select the Layout tab of the Form Builder, this will start the
LiveCycle Designer.
Design your form as you would a standard print form. Just make
sure not to set the input fields to read only!
This will display a function module that contains the same input
parameters as the forms interface just enter data into the data
elements.
LOOP AT ...
* (4) Call function module dynamically
CALL FUNCTION <generated function module> ...
ENDLOOP.
DATA:
form TYPE fpwbformname,
fm_name TYPE funcname.
...
is/SMTP/virt_host_0 = *:*;
SAP
Internet
Internet/ /Intranet
Intranet
SMTP Server
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = l_mailtext
i_length = textlength
i_subject = l_subject ).
* Add attachment
data: attdoctype type soodk-objtp,
atttitle type SOOD-OBJDES,
attsize type SOOD-OBJLEN,
pdftab type SOLIX_TAB.
attdoctype = 'pdf'.
atttitle = 'CreateFlight'.
attsize = xstrlen( pdf ).
pdftab = cl_document_bcs=>xstring_to_solix(
ip_xstring = pdf ).
send_request = cl_bcs=>create_persistent( ).
send_request->set_document( document ).
* Add sender
CALL METHOD send_request->set_sender
EXPORTING i_sender = sender.
* Create recipient.
data: recipient TYPE REF TO if_recipient_bcs.
recipient = cl_cam_address_bcs=>create_internet_address(
p_addr ).
send_request->set_send_immediately( 'X' ).
* Send document
send_request->send( ).
COMMIT WORK.
The BCS classes throw exceptions, make sure place the BCS class
interaction in a try/catch block:
* Create and send the email.
data: bcs_exception type ref to cx_bcs.
try.
* Enter your email code here!
catch cx_bcs into bcs_exception.
data: ex_msg type string.
ex_msg = bcs_exception->get_text( ).
write: 'Caught exception.', ex_msg.
endtry.
Inbound Exit classes are singleton classes that must implement the
IF_INBOUND_EXIT_BCS interface.
* been created.
IF instance IS INITIAL.
ENDIF.
ro_ref = instance.
document = io_sreq->get_document( ).
pdf_table = document->get_body_part_content( 2 ).
clear pdf_xstring.
endloop.
1. Get the form data from the Interactive Form PDF document using
the CL_FP_PDF_OBJECT class.
The form data is returned as an XML documnet.
streamFactory = l_ixml->create_stream_factory( ).
iStream =
streamFactory->create_istream_string( formxml ).
* Create an XML Document class that will be used to process the XML
data: document type ref to if_ixml_document.
document = l_ixml->create_document( ).
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose
without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended
strategies, developments, and functionalities of the SAP product and is not intended to be binding upon SAP to any particular course of business, product
strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.
SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics,
links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use
of these materials. This limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use
of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party
Web pages.
Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfltigung dieser Publikation oder von Teilen daraus sind, zu
welchem Zweck und in welcher Form auch immer, nur mit ausdrcklicher schriftlicher Genehmigung durch SAP AG gestattet.
Bei dieser Publikation handelt es sich um eine vorlufige Version, die nicht Ihrem gltigen Lizenzvertrag oder anderen Vereinbarungen mit SAP unterliegt. Diese
Publikation enthlt nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP-Produkts. SAP entsteht aus dieser Publikation keine Verpflichtung zu
einer bestimmten Geschfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherige Ankndigung
gendert werden.
SAP bernimmt keine Haftung fr Fehler oder Auslassungen in dieser Publikation. Des Weiteren bernimmt SAP keine Garantie fr die Exaktheit oder
Vollstndigkeit der Informationen, Texte, Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche
Gewhr, weder ausdrcklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschlielich, hinsichtlich der Gewhrleistung der Marktgngigkeit
und der Eignung fr einen bestimmten Zweck sowie fr die Gewhrleistung der Nichtverletzung geltenden Rechts.
SAP haftet nicht fr entstandene Schden. Dies gilt u. a. und uneingeschrnkt fr konkrete, besondere und mittelbare Schden oder Folgeschden, die aus der
Nutzung dieser Materialien entstehen knnen. Diese Einschrnkung gilt nicht bei Vorsatz oder grober Fahrlssigkeit.
Die gesetzliche Haftung bei Personenschden oder Produkthaftung bleibt unberhrt. Die Informationen, auf die Sie mglicherweise ber die in diesem Material
enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP untersttzt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt
keinerlei Gewhrleistungen oder Zusagen ber Internetseiten Dritter ab.
R 0 239 77 191
G 51 159 77 191
B 102 0 77 191
R 124 87 190 80 33
G 30 129 102 34 87
B 31 174 0 71 71
SAP_PPT Guidelines Other than Title Slides and Divider Pages - The SAP PPT
Guidelines include theory and examples of:
Colors, Fonts & Bullets
Image Usage & Quotes
Graphics, Charts, Tables & Processes
SAP_PPT Samples SAP PPT Sample pages include live ppt slides that
were discussed in the SAP PPT Guidelines. Users can
select from a library of slides including title slides,
divider pages, bulleted slides, charts and graphs
For questions regarding the information and materials contained in these guidelines,
please email [email protected]