Attachment of a PDF through Adobe Offline Form

Hi Experts!!!
How can we mail a pdf file via mail as an attachment?

Hi,
Check this code.
REPORT  zsa_adob.
DATA: form TYPE fpwbformname,
          fm_name TYPE rs38l_fnam,
          interface_type TYPE fpinterfacetype.
DATA: fp_outputparams TYPE sfpoutputparams.
DATA : fp_docparams TYPE sfpdocparams,
           fp_result TYPE fpformoutput,
           wa_fpformoutput TYPE fpformoutput,
           pdf               TYPE fpformoutput-pdf,
           pdf_data          TYPE solix_tab,
           attachment  TYPE solix_tab,
           lv_email TYPE adr6-smtp_addr.
DATA : bcs_exception TYPE REF TO cx_bcs.
DATA : bookings  TYPE TABLE OF sbook  .
SELECT * FROM sbook INTO TABLE bookings  UP TO 5 ROWS  WHERE
             carrid  = 'LH'  .
ZSATEST is the adobe form designed in SFP tcode
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
  EXPORTING
    i_name           = 'ZSATEST'
  IMPORTING
    e_funcname       = fm_name
    e_interface_type = interface_type.
CALL FUNCTION 'FP_JOB_OPEN'
  CHANGING
    ie_outputparams = fp_outputparams
  EXCEPTIONS
    cancel          = 1
    usage_error     = 2
    system_error    = 3
    internal_error  = 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.
fp_docparams-langu = 'E'.
CALL FUNCTION fm_name
EXPORTING
   /1bcdwb/docparams =  fp_docparams
   booking                   =  bookings
IMPORTING
   /1bcdwb/formoutput   =  fp_result
EXCEPTIONS
   USAGE_ERROR       = 1
   SYSTEM_ERROR     = 2
   INTERNAL_ERROR   = 3
   OTHERS                   = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fm_name
  EXPORTING
    /1bcdwb/docparams  = fp_docparams
    par1                         = 'SR'
  IMPORTING
    /1bcdwb/formoutput = fp_result
  EXCEPTIONS
    usage_error        = 1
    system_error      = 2
    internal_error      = 3
    OTHERS            = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
  E_RESULT             =
EXCEPTIONS
  USAGE_ERROR          = 1
  SYSTEM_ERROR         = 2
  INTERNAL_ERROR       = 3
  OTHERS               = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
pdf = wa_fpformoutput-pdf.
pdf_data = cl_document_bcs=>xstring_to_solix( ip_xstring = pdf ).
attachment = pdf_data.
TRY.
    DATA : l_subject TYPE so_obj_des,
               l_mail_text TYPE bcsy_text,
               l_mail_text_row TYPE soli.
    l_subject = 'RFQ'.
    CONCATENATE 'Please check the'  ' Attached file'  INTO l_mail_text_row.
    APPEND l_mail_text_row TO l_mail_text.
    DATA : document TYPE REF TO cl_document_bcs,
               num_rows TYPE i,
               text_length TYPE so_obj_len.
    DESCRIBE TABLE l_mail_text LINES num_rows.
    num_rows = num_rows * 255.
    MOVE num_rows TO text_length.
    TRY.
        CALL METHOD cl_document_bcs=>create_document
          EXPORTING
            i_type        = 'RAW'
            i_subject     = l_subject
            i_length      = text_length
   I_LANGUAGE    = SPACE
   I_IMPORTANCE  =
   I_SENSITIVITY =
            i_text        = l_mail_text
   I_HEX         =
   I_HEADER      =
   I_SENDER      =
          RECEIVING
            result        = document
      CATCH cx_document_bcs .
    ENDTRY.
    DATA : attcdoctype TYPE soodk-objtp,
          atttitle TYPE sood-objdes,
          attsize TYPE sood-objlen,
          pdftab TYPE solix_tab.
    attcdoctype = 'pdf'.
    atttitle = 'RFQ Details'.
   attsize = XSTRLEN( pdf ).
   pdftab = cl_document_bcs=>xstring_to_solix( ip_xstring = pdf ).
    document->add_attachment( EXPORTING i_attachment_type = attcdoctype
                                        i_attachment_subject = atttitle
                                        i_attachment_size = attsize
                                        i_attachment_language = sy-langu
                                        i_att_content_hex = attachment ).
    DATA : send_request TYPE REF TO cl_bcs.
    send_request = cl_bcs=>create_persistent( ).
    send_request->set_document( document ).
    DATA : sender TYPE REF TO cl_sapuser_bcs.
    sender = cl_sapuser_bcs=>create( 'SUSER' ).
    TRY.
        CALL METHOD send_request->set_sender
          EXPORTING
            i_sender = sender.
      CATCH cx_send_req_bcs .
    ENDTRY.
    DATA : recipent TYPE REF TO if_recipient_bcs.
    recipent = cl_cam_address_bcs=>create_internet_address( lv_email ).
    send_request->add_recipient( EXPORTING i_recipient = recipent ).
    send_request->set_send_immediately( 'X' ).
    send_request->send( ).
     COMMIT WORK.
     WRITE : 'Email containing has been sent successfully'
  CATCH cx_bcs INTO bcs_exception.
ENDTRY.

Similar Messages

  • Unable to send emails through adobe offline project.

    Hi Experts!!!
                        I am trying to send an email through Adobe Offline Form. I am quoting the code. Plz check what's the problem with the code.
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.lifecyclelettersapplication;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateFormView).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.SendFailedException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import com.lifecyclelettersapplication.wdp.IPrivateFormView;
    //@@end
    //@@begin documentation
    //@@end
    public class FormView
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(FormView.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.lifecyclelettersapplication.wdp.IPrivateFormView for more details
      private final IPrivateFormView wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.lifecyclelettersapplication.wdp.IPrivateFormView.IContextNode for more details.
      private final IPrivateFormView.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public FormView(IPrivateFormView wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
         /* The following lines initialize the context elements;
    Enter your e-mail id in the set From-method
         //wdContext.currentContextElement().setTeststatus(" do in it");
            try{
            wdContext.currentEmailElement().setFrom("[email protected]");
            wdContext.currentEmailElement().setTo("[email protected]");                                            
            wdContext.currentEmailElement().setCc("[email protected]");
            wdContext.currentEmailElement().setBcc("[email protected]");
    //        wdContext.currentEmailElement().setCc(" ");
    //        wdContext.currentEmailElement().setBcc(" ");
            wdContext.currentEmailElement().setSubject("Test Mail By Umang");
            wdContext.currentEmailElement().setBody("You will find the address proof letter in the attachment of this e mail. Please sign this form and send it.");
           catch(Exception e)
             wdContext.currentContextElement().setTeststatus("do in it"+e.getMessage());              
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateFormView wdThis, IPrivateFormView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        //@@end
      //@@begin javadoc:onPlugFromFirstview(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onPlugFromFirstview(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onPlugFromFirstview(ServerEvent)
         wdContext.currentContextElement().setTeststatus("from first view");
         //wdDoInit();
        //@@end
      //@@begin javadoc:onActionBack(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionBack(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionBack(ServerEvent)
        wdThis.wdFirePlugToFirstView();
        //@@end
      //@@begin javadoc:onActionSend(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionSend(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSend(ServerEvent)
         Properties props = new Properties();
              String host = "rmail070.zmail.ril.com";
              props.put("rmail070.zmail.ril.com", host);
              Session session = Session.getInstance(props, null);
              MimeMessage message = new MimeMessage(session);
              Address toAddress = new InternetAddress();
              Address fromAddress = new InternetAddress();
              Address ccAddress = new InternetAddress();
              Address bccAddress = new InternetAddress();
         wdContext.currentContextElement().setTeststatus("1");
              try
                   MimeMultipart multipart = new MimeMultipart();
                   wdContext.currentContextElement().setTeststatus("2");
                   BodyPart messageBodyPart = new MimeBodyPart();
                   if (! wdContext.currentEmailElement().getFrom().equals(""))
                        fromAddress = new InternetAddress(wdContext.currentEmailElement().getFrom());               
                        message.setFrom(fromAddress);
                   wdContext.currentContextElement().setTeststatus("3");
                   if (! wdContext.currentEmailElement().getTo().equals(""))
                        toAddress = new InternetAddress(wdContext.currentEmailElement().getTo());
                        message.setRecipient(Message.RecipientType.TO, toAddress);
                   wdContext.currentContextElement().setTeststatus("4");
                   if (! wdContext.currentEmailElement().getCc().equals(""))
                        ccAddress = new InternetAddress(wdContext.currentEmailElement().getCc());
                        message.setRecipient(Message.RecipientType.CC, ccAddress);
                   wdContext.currentContextElement().setTeststatus("5");
                   if (! wdContext.currentEmailElement().getBcc().equals(""))
                        bccAddress = new InternetAddress(wdContext.currentEmailElement().getBcc());
                        message.setRecipient(Message.RecipientType.BCC, bccAddress);
                   wdContext.currentContextElement().setTeststatus("6");
                   if (! wdContext.currentEmailElement().getSubject().equals(""))
                        message.setSubject(wdContext.currentEmailElement().getSubject());
                   wdContext.currentContextElement().setTeststatus("7");
                   if (! wdContext.currentEmailElement().getBody().equals(""))
                        messageBodyPart.setText(wdContext.currentEmailElement().getBody());
                   wdContext.currentContextElement().setTeststatus("8");
                   multipart.addBodyPart(messageBodyPart);
                   wdContext.currentContextElement().setTeststatus("10");
    ////               A new part will be added this will be the attachment
                   messageBodyPart = new MimeBodyPart();
    //               String filename = "temp
    webdynpro
    web
    local
    LifeCycleLetters
    Components
    com.lifecyclelettersapplication.LifeCycleLettersApplication
    LifeCycle.pdf";
    //               DataSource source = new FileDataSource(filename);
    //               messageBodyPart.setDataHandler(new DataHandler(source));
    //               messageBodyPart.setFileName(source.getName());                    
    //               messageBodyPart.setHeader("Content-Type","application/pdf");
    //               multipart.addBodyPart(messageBodyPart);
                   message.setContent(multipart);
                   Transport.send(message);
                   wdContext.currentContextElement().setTeststatus("11");
              catch (AddressException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (SendFailedException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
              catch (MessagingException e)
                   wdComponentAPI.getMessageManager().reportWarning(e.getLocalizedMessage());
                   e.printStackTrace();
         catch(Exception e)
                             wdContext.currentContextElement().setTeststatus("action send"+e.getMessage());              
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      //@@end

    Hi,
    I think u need to set up the SMTP  So that u can send the email.
    Regards
    Mustafa.

  • Can't create received Adobe Offline Form e-mail

    Hi experts,
    My setup is as follows:
    CE 7.2 BPM System with Adobe Offline Forms, sent from system through smtp and received by imap.
    When I recieved my Adobe Form task in my personal inbox, I modify it, press submit and I send the composed email with the pdf to the default receiver with default composed text.
    Problem:
    When the system receives the email, the following error occurs in the Last 24 hours (Java) log.
    "Cannot create e-mail, because: charset=us-ascii [EXCEPTION] java.io.UnsupportedEncodingException: charset=us-ascii"
    To submit the pdf, button has to configured to submit the file as .pdf file. Standard the encoding with submit as pdf is UTF-16 (not possible to change the encoding when saving as pdf in LiveCycle Designer 2)
    Any clues where to search/fix this problem? Because the process stops at that step.
    Thx.
    Full trace & IMAGE of trace: http://i54.tinypic.com/ej7ij5.png
    Cannot create e-mail, because: charset=us-ascii
    EXCEPTION
    java.io.UnsupportedEncodingException: charset=us-ascii
    at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52)
    ... (see image for complete trace)
    Category: com.sap.bpem.base.mail.MimeMessageBuilder
    Application: sap.com/tcbpembase~ear

    This just happened to me this morning during my commute. I read about 10 of my e-mails fine, but when I went to the next unread e-mail, the body of the e-mail was blank. I changed the preview to five lines and could see some of the text in the preview, but when I opened the e-mails, the body and subject lines are blank. It's been weeks since I upgraded to iOS4, so I don't know if it's related or not.
    When I get home tonight, I might try resetting the iPhone.
    ^MD

  • How to embed mp4 in PDF  through Adobe Standard?

    How to embed mp4 in PDF  through Adobe Standard?

    That's available in Acrobat Pro.
    See the features matrix

  • HTTPS communication for Adobe Offline form with SAP ABAP WAS

    Hi Experts,
    Can we use HTTPS communication method to call a SAP ABAP Web Service from an Adobe offline form?
    Example : I have a SUBMIT button in my Adobe offline form and when clicked, it populates a sales order number in the form.
    Here my SAP ABAP server from where it reads the info is using HTTPS communication method. Now if i use the same service with HTTP it works fine but if i switch the service to use HTTPS it shows me an error "Error attempting to read from file. <https://FQDN/<service name> .
    I am using self-signed SSL server certificate from SAP ABAP server. But here i also see a certificate error in my browser (IE 7.0) saying "Untrusted Certificate". Is this the reason for my above issue?
    I could not find any post in SDN giving me the answer.
    Regards,
    Hobin

    Hi,
         The Certificates are already imported into the Trusted Certificates Section. But the real Issue is regading the Adobe Offline forms. If I open the Adobe Offline forms in the Adobe reader 9.0 and the Web Service call is made based on the Https:// . It saying "Error attempting to Read the file". The Fully qualified domain name is also provided VA. I have tried to import the certificates to Adobe Reader's -  Trust Identities but still it is not working . If I switch the webservice authentication method to Http:// then it would work. ADS is already configured with SSL. And the HTTPS:// based WebService embedded in the Adobe Interactive Form is working ,if the form is Online in the Browser (integrated in the Webdynpro Abap UI element).
    Is there any other way to Add SSL Certificates to Adobe Reader , so that Https:/ based webservice will work if the Form is opened in Adobe Reader 9.0.
    Regards,
    Hobs

  • Adobe Offline Forms 4.7

    Is it possible to create an Adobe Offline form in SAP 4.7?   If not, what other alternatives are available that can mimic filling out a form offline and then passing the information back into R/3 at a later time?

    Check the [Adobe FAQ|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2a8a0a37-0301-0010-f794-aecd1bb426e0#q-8]

  • Hi I have just tried to convert a pdf through Adobe Export PDF, it appears to process it, but when I open the word file it just has the lines on it, and no words.

    hi I have just tried to convert a pdf through Adobe Export PDF, it appears to process it, but when I open the word file it just has the lines on it, and no words.

    Hi nickel13,
    What is the problem you are facing?
    Is this happening with a single PDF file?
    Regards,
    Florence

  • Problem in adobe offline forms

    Hi All,
    I am developing an application on Adobe Interactive Forms. I am working on the example given in SDN online, offline with file upload.  Online Scenario is working fine and i could able to get the data even from back end executing BAPI.
    But problem is with offline scenario, where i am uploading pdf filled with data in offline mode. I could render the pdf successfully on browser, But when i press Button the data in the PDF (entered in offline) is not passing to the controller instead it is throwing NULL.
    So i could not get the result.....
    I had gone through all the documents in SDN. Please suggest me some solutions..
    Regards
    Raghu

    Hi Raghu,
    Yes, attribute is bound to binary & is different for datasource context structure.
    It seems you have done all the things properly, only one small difference in code as I mentioned earlier.
    Did you check with code in sample example at SAP Library like wdContext.currentABCelement().getAirline() ?
    Kind Regards,
    Nitin
    Updated: Refer to link which has the code to move data to controller's context https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/offline%20interactive%20pdf%20form%20using%20download.pdf
    Edited by: Nitin Jain on Mar 7, 2009 11:33 AM

  • Adobe Offline Forms issue in GRC System

    Experts:
    I am working on creating a Offline Form for GRC Process Control  in SAP GRC System. I have couple of doubts.
    1. In the Form property, there is a new field call 'Inbound Handler'.    The document which I referred says  that, this 'inbound handler' helps in processing the inbound pdf's which comes thro mail.       In this place we need to select the class developed with 2 methods, 1.Create Instance and 2. Handle PDF.    And the document also talks about creating a separate class and referring it in the exit rules (SO50).     I am not sure whether Inbound Handler is a replacement for Exit Rules (SO50) so something else.  Please Clarify.
    2. While generating the PDF file, as you know we call the series of function modules. I have problem with the FM ' CALL FUNCTION fm_name' . When this FM is executed,  normally it should generate the PDF and XML which will be available in fp_formoutput-pdf and fp_formoutput-xml.  But in this system even when there is no issues with the export parameters, the FM is not able to generate the PDF and XML. Both fp_formoutput-pdf and fp_formoutput-xml are coming as EMPTY. Result of which when the FM 'FP_JOB_OPEN' is called it displays the message 'No Job Started' and exits the program.  This same program works find in ECC 6.0 system. Can anyone thro some light on this?
    Line: -
    TYPES: BEGIN OF st_test,
           one   TYPE string,
           two   TYPE string,
           three TYPE string,
           END OF st_test.
    DATA: it_test TYPE st_test  OCCURS 0.
    DATA: wa_test TYPE st_test.
    DATA: fp_outputparams type sfpoutputparams.
    DATA: fm_name TYPE rs38l_fnam.
    DATA: fp_docparams TYPE sfpdocparams.
    DATA: result TYPE sfpjoboutput.
    DATA: fp_formoutput type fpformoutput.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-b02.
    PARAMETERS: p_taskid TYPE grfntaskplan-taskplan_id DEFAULT 'DF492600B7308BF19F5E00237D624FE0' OBLIGATORY,
                p_email  TYPE ADR6-SMTP_ADDR DEFAULT 'a@b' OBLIGATORY,
                p_tmail  TYPE ADR6-SMTP_ADDR DEFAULT 'a@b'' OBLIGATORY,
                p_form   TYPE fpwbformname   DEFAULT 'ZAOF_TEST',
                p_langu  TYPE spras          NO-DISPLAY DEFAULT 'EN',
                p_countr TYPE land1          NO-DISPLAY DEFAULT 'US',
                p_pages  TYPE fppagecount    NO-DISPLAY DEFAULT 2,
                p_loop   TYPE i              NO-DISPLAY DEFAULT 1.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    START-OF-SELECTION.
    wa_test-one = 'One'.
    wa_test-two = 'Two'.
    wa_test-three = 'Three'.
    append  wa_test to it_test.
    END-OF-SELECTION.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name     = p_form
      IMPORTING
        e_funcname = fm_name.
    fp_outputparams-getpdf = 'X'.
    fp_outputparams-nodialog = 'X'.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = fp_outputparams
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 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.
    DO p_loop TIMES.
      fp_docparams-langu   = 'E'. "p_langu.
      fp_docparams-country = 'US'."p_countr.
      fp_docparams-FILLABLE = 'F'.
      fp_docparams-dynamic = 'X'.
      fp_docparams-UPDATE_INTERACTION_CODE = 'X'.
      CALL FUNCTION fm_name
        EXPORTING
          /1bcdwb/docparams  = fp_docparams
          Ztest      = it_test
        IMPORTING
          /1bcdwb/FORMOUTPUT = fp_formoutput
        EXCEPTIONS
          cancel             = 1
          usage_error        = 2
          system_error       = 3
          internal_error     = 4.
    ENDDO.
    CALL FUNCTION 'FP_JOB_CLOSE'
      IMPORTING
        e_result       = result
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 3
        OTHERS         = 4.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Thanks in Advance
    Vijai
    Edited by: Thomson VijaiAnand on Apr 21, 2010 11:15 AM

    Hi Thomson 
      I met a similar probleam.
      Could you explain how you get it through?
    Thanks

  • Smartforms to PDF and PDF to adobe interactive forms

    Dear all,
    Is there any way to convert Smartforms to PDF document and import it programatically to Adobe interactive forms(SFP) and make it interactive.
    Regards
    Aravind

    Hi:
    Smartform to PDF
    ATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    Work Area declarations
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    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.
    Step 1:
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZZZ_TEST2'
    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'.
    Step 2:
    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.
    Step 3:
    i_otf] = w_return-otfdata[.
    Step 4:
    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.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    For Smartform to Adobe is possible
    as [Adobe|http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm]
    Regards
    Shashi

  • ADOBE OFFLINE FORM-.An exception  CX_SOAP_FAULT occurred  Message no. TPDA

    HI GUYS,
    WE HAVE DEVELOPED AN OFFLINE  INTERACTIVE ADOBE FORM WHICH USES WEBSERVICES TO GET DATA FROM SAP WHICH IS WORKING FINE IN DEV SERVER AFTER MOVING IT TO QUALITY IT IS NOT WORKING ... WE FOUND CX_SOAP_FAULT ERROR IN DEBUGGING MODE OF WEBSERVICE... BECAUSE OF WHICH IT IS NOT PULLING DATA FROM SAP.......
    CAN ANY ONE HELP US REGARDING THIS
    WHAT IS THIS ERROR .....An exception (CX_SOAP_FAULT) occurred Message no. TPDA430
    THANKS
    TOUSIF
    Moderator message: wrong forum, please have a look in the forum for "Adobe Interactive Forms", and never use all upper case when posting.
    Edited by: Thomas Zloch on Apr 28, 2011 5:59 PM

    Hi Surjith,
    This happen randomly, it does not specify on a particular user. We have more than 100 transaction successfully created. However only some fails.
    Any idea?
    Thanks
    Regards,
    Bryan

  • Attachment of files in an Adobe Interactive form

    Hi,
      Is it possible have 'File attachment' attach any type of file inside and Adobe Interactive form .. ?
    Thanks
    Sivaraj

    Yes, you can attach all kind of filetypes to an AIF.

  • PAsword Protectiong for adobe Offline Forms

    Hi,
    Can anyone help me in the below scenario.
    I have an offline Adobe Interactive form.
    This form needs to be password protected so that only authentic users can view the form.
    Thanks
    Nancy

    Hi,
    <b>I have changed the mode to UpdateDataInPDF mode.</b>And now it is giving <b>500 Internal server Error while deployment.</b>
    The usePDF mode is working perfectly but then it cannot be used for displaying data fetched from SAP R/3.
    For displaying data mode has to be updateDataInPDF but its giving a deployment error.
    Does it has anything to do with proper installion of ADS Service on SAP WAS?

  • Problems in displaying SAP R/3 data in Adobe Offline Forms

    Hello All,
    I have a requirement where I need to display a PDF Form with data being fetched from the SAP R/3 through RFC .
    <b>I am using SAP NWDS SP9, SAP WAS SP15 and Adobe Reader 7.0.</b>
    I have 2 input fields which are binded to certain attributes of the View's Node.
    But while deploying my application its not displaying any data.
    Note : For the Interactive Form I am using the below mentioned features:
    1. mode  : I am using <b>usePDF</b> mode.
    2. PDF Source : I did a PDF Preview of my Interactive Form and then saved the PDF form inside my WebDynpro Projects src/mimes/components folder fiving some name Test123.pdf.
    3. I created a binary attribute say PDFSource which inturn reads the above mentioned PDF.
    Please suggest why the PDF form upon deployment is not displaying any data although the fields are mapped to
    node which are filled with data.

    Hi,
    <b>I have changed the mode to UpdateDataInPDF mode.</b>And now it is giving <b>500 Internal server Error while deployment.</b>
    The usePDF mode is working perfectly but then it cannot be used for displaying data fetched from SAP R/3.
    For displaying data mode has to be updateDataInPDF but its giving a deployment error.
    Does it has anything to do with proper installion of ADS Service on SAP WAS?

  • Adobe offline form submission without HTTP or SMTP.

    Dear Adobe Gurus,
       Can offline Adobe forms can be submitted without uploading the form to a webdynpro application(HTTP) or sending an email(SMTP). In crude terms, if I have a PDF form with submit button. Can I open the PDF, click on the submit button and get the PDF form submitted. Please let me know your thoughts here and also what do you think is the best option to integrate the Offline PDF forms into SAP system.
    Thanks!
    Surya.

    Hi,
    If i understand weel you want to send back the form to SAP in an offline scenario without using SMTP or HTTP(S) , that's right ?
    There are 3 solutions for send back the form to SAP :
    1 - HTTP(S)
    2 - SMTP with an inbound processing define in SAP system
    3 - Upload directly into SAP.
    To upload data in SAP system you have to convert the Adobe forms into IXML data and then process the XML to extract data ...when it's finised you have to call a BAPI for updating data.
    Have a look here, you will find information on SMTP Flow .... [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCodeforprocessingInboundMailwithAdobeInteractive+Forms]
    Hope this help you.
    Best regards

Maybe you are looking for

  • Calling a function from another class - help!

    I realize that this is probably a basic thing for people who have been working with JavaFX for a while, but it is eluding me, and I have been working on it for over a week. I need to call a function that is in another class.  Here's the deal.  In Ent

  • Sum the Sum total values above

    Post Author: John Patterson CA Forum: Formula I have created a report that contains a list of values (in a group) that come from a formlar that has Sum {} totals in it.  All I want to do is sum that list into one value below, just like Excel would do

  • Filter a Visual Without the Filter Being Part of the Visual?

    In PowerView, it's possible to uniquely filter a visual on a page by dragging a column over to the visual's filter pane (not the page itself) without needing to include the column in the visual and without need to filter the entire page.  Useful. It

  • Do smart playlists only accept one variable?

    My smart playlists no longer do anything if I have more then one variable selected. Is this a new "feature"? Is there a work around?

  • Problem with menus on the right and image is too far to the right.

    Notice the difference in sizes of the menus, (Unfamiliar with the correct terminology). I cannot get the Adjustments, Layers, Properties, etc. to all be the same size, increase their width. Notice the loaded image is too far to the right underneath t