PDF Error while converting from SMARTFORM

Hi ,
While opening the PDF file in Outlook, I am getting the error 'An unrecognized token '0RG' was found and the data is not appended to PDF .
Can anyone please tell me what may be the problem.
Thanks in advance,
Regards,
Shankar

Hi,
Chk the below code to download to pdf and crosscheck with ur code.
REPORT  zpdf_g.
DATA: form_name TYPE rs38l_fnam,      " Used to get the function module of Smartform
      wa_ctrlop TYPE ssfctrlop,       " Smart Forms: Control structure
      wa_outopt TYPE ssfcompop,       " SAP Smart Forms: Smart Composer (transfer) options
      t_otfdata TYPE ssfcrescl.       " Smart Forms: Return value at end of form printing
Data: t_pdf_tab type table of tline,  " SAPscript: Text Lines
      t_otf TYPE table of itcoo.      " OTF Structure
Variables used to pass to GUI_DOWNLOAD
DATA: w_filesize TYPE i,
      w_bin_filesize TYPE i.
Variables used for Save Dialog Box
DATA : file_name TYPE string,
       file_path TYPE string,
       full_path TYPE string.
START-OF-SELECTION.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = 'ZPDF_G'      "p_name
    IMPORTING
      fm_name            = 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.
  wa_ctrlop-getotf = 'X'.
  wa_ctrlop-no_dialog = 'X'.
  wa_outopt-tdnoprev = 'X'.
  CALL FUNCTION form_name
    EXPORTING
      control_parameters = wa_ctrlop
      output_options     = wa_outopt
      user_settings      = 'X'
    IMPORTING
      job_output_info    = t_otfdata
    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.
END-OF-SELECTION.
  t_otf[] = t_otfdata-otfdata[].
  CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      format                = 'PDF'
      max_linewidth         = 132
    IMPORTING
      bin_filesize          = w_bin_filesize
    TABLES
      otf                   = t_otf
      lines                 = t_pdf_tab
    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.
----TAKING THE DOWNLOAD FILE PATH AS USER INPUT*
  CALL METHOD cl_gui_frontend_services=>file_save_dialog
    CHANGING
      filename             = file_name
      path                 = file_path
      fullpath             = full_path
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 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.
Download the file to the selected path
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      bin_filesize            = w_bin_filesize
      filename                = full_path                   "fname1
      filetype                = 'BIN'
    IMPORTING
      filelength              = w_filesize
    TABLES
      data_tab                = t_pdf_tab
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 22.
  IF sy-subrc <> 0.
    MESSAGE i000(zpdf).      "File not downloaded
  ELSE.
    MESSAGE i001(zpdf).      "File downloaded
  ENDIF.

Similar Messages

  • Lock a PDF file when converted from Smartform

    Hello Experts,
    In our current project we have an urgent requirement to apply a Lock to a PDF document
    so it cannot be amended. This is a PDF document and not an Adobe interactive
    form, which currently cannot be used on the project. We are seeking help from
    other colleagues who have had successful experience in achieving the creation
    of a lock to the PDF document which is generated as an output from a SAP Smart
    Form and then e-mailed to the recipient, in this case end Customers, therefore
    integrity of information to prevent changes is a legal requirement. We are
    aware of an encrypted password option but in this case we need to apply a lock
    to the PDF document.
    Many Thanks in advance,
    Kind Regards,
    Nikhil

    Does your pdf reader plugin need updating, are you on version 7, whilst current version is v10
    * see [[opening pdf files within firefox]]
    * and [[using the adobe reader plugin with firefox]]

  • After 9.3 update getting error printing to Adobe PDF while converting from Powerpoint to PDF

    That happened after upgrading Acrobat Pro 9.1.2 to 9.2->9.3 on Windows XP sp2 platform. Converting from other Microsoft Office 2003 products is totally normal(Excel, Word) Did anyone came accross and know how to fix that?? We have many users with exactly same issue.

    thanks...figured out my problem!
    Date: Wed, 3 Feb 2010 12:24:29 -0700
    From: [email protected]
    To: [email protected]
    Subject: Re: After 9.3 update getting error printing to Adobe PDF while converting from Powerpoint to PDF
    What happens if you try to print to the Adobe PDF printer?
    >

  • Error while converting Image -to- PDF and then to PDF/A

    Hi,
    I'm trying to convert a Image format(JPEG,bmp,tiff) to PDF and then to PDF/A. I could able to convert Image to PDF successfully.
    I'm getting the below error while converting the PDF(that was generated) to PDF/A.
    Caused by: com.adobe.livecycle.output.exception.OutputException: Input Document is a already flat PDF Document
    at com.adobe.printSubmitter.PrintServer.transformPDF(PrintServer.java:307)
    at com.adobe.printSubmitter.service.OutputServiceImpl.transformPDFInTxn(OutputServiceImpl.ja va:518)
    at com.adobe.printSubmitter.service.OutputServiceImpl$4.doInTransaction(OutputServiceImpl.ja va:481)
    ... 106 more
    Error OCCURRED: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    Please give me the solution to convert PDF to PDF/A?

    I've just read a footnote in the API documentation which indicates that the transformPDF function cannot be used for this purpose:
    "GS_Enterprise said on Nov 24, 2007 at 12:03 PM :
    Please note that the parameter "inPdfDoc" for transformPDF assumes that the stream content is an XFA-based PDF, and that it's not an XFA-based PDF with a PDF background (also known as "XFA foreground"). In other words, this function does not convert any input PDF to PDF/A, but only those PDFs generated from an XFA template which does not include any static PDF content as a background."

  • Error while converting schema from oracle to SQL server

    Hello,
    I am getting following error while converting schema from oracle to SQL server using SSMA.
    I get Errors 1-3 while migrating procedures and error 4 while migrating a table.
    1- O2SS0050: Conversion of identifier 'SYSDATE' is not supported.
    2- O2SS0050: Conversion of identifier 'to_date(VARCHAR2, CHAR)' is not supported.
    3- O2SS0050: Conversion of identifier 'regexp_replace(VARCHAR2, CHAR)' is not supported.
    4- O2SS0486: <Primary key name> constraint is disabled in Oracle and cannot be converted because SQL Server does not support disabling of primary or unique constraint.
    Please suggest.
    Thanks.

    The exact statement in oracle side which causing this error (O2SS0050:
    Conversion of identifier 'to_date(VARCHAR2, CHAR)' is not supported.) is below:
    dStartDate:= to_date(sStartDate,'MON-YYYY');
    Statement causing error O2SS0050:
    Conversion of identifier 'regexp_replace(VARCHAR2, CHAR)' is not supported is below.
    nCount2:= length(regexp_replace(sDataRow,'[^,]'));
    So there is no statement which is using to_date(VARCHAR2,
    CHAR) and regexp_replace(VARCHAR2, CHAR) in as such. 'MON-YYYY'  and '[^,]'
    are CHAR values hence SSMA is unable to convert it from varchar2 to char.
    Regarding SYSDATE issue, you mean to put below code in target(SQL) side in SSMA ?
    dDate date := sysdate;
    Thanks.

  • Error while converting document to html

    "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275"
    I use the procedure to convert the documents if it is not already converted before using procedure as follows
    PROCEDURE "STARDOC"."HTMLOUTPUT" (
    "DOCID" IN NUMBER) IS
    mklob clob;
    doccount number;
    errorcode number;
    errormessage varchar2(200);
    BEGIN -- executable part starts here
    SELECT COUNT(document_id) INTO doccount FROM docviewhtml where document_id=docid;
    --dbms_output.put_line(doccount);
    if doccount=0 then
         dbms_output.put_line('Document Not Found: Converting '||docid);
         --If document is not found run document coversion routine
         ctx_doc.filter('idxdocuments',docid, mklob,FALSE);
         INSERT INTO docviewhtml(document_id, html) VALUES (docid, mklob);
         COMMIT;
    elsif doccount=1 then
         --return;
         dbms_output.put_line('Document Found');
         --if document id found then return the document content
         null;
    else
         --dbms_output.put_line('Error occured');
         --need to deal with duplicate documents
         null;
    end if;
    dbms_lob.freetemporary(mklob);
    EXCEPTION
    --rollback when an exception occurs
         WHEN OTHERS THEN
              errorcode:=SQLCODE;
              errormessage:=SQLERRM;     
              dbms_output.put_line(sqlcode || ':' ||sqlerrm);
              ROLLBACK;
              LOGERROR(errorcode,errormessage);
    END "HTMLOUTPUT";
    i get the error when i convert large documents
    "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275"
    Also if there are any converion errors while converting documents to html. how to find them is there a log o fany sort.
    what is wrong. please help!
    Message was edited by:
    connect2sandeep

    You free your temporary lob, but never create it.

  • Email Billing document as PDF Attachment while saving from VF01/02

    Hi,
    Can anybody suggest if there is any BADI/User Exit/Configuration exists in order to email Billing document as a PDF attachment while saving from VF01 or VF02?
    We need to trigger this while saving the Output type say, VF02 GOTO -> HEADER -> OUTPUT (select the output type) -> SAVE - should send an email with PDF attachment.
    I have written the code for sending email with PDF attachment. Presently this code is included in the Print program for the sapscript and an email is sent when an output is issued from VF01/02/03 where as the requirement is to send email whenever the document is saved.
    Thanks in Advance,
    Srinivas

    Hi,
    While saving subroutine FORM_OPEN will get triggerred, and this will be included in the Z Program. If it is not contained in the Z program, include this subroutine. This subroutine will have include RVADOPFO.
    The above include will have the function module ADDR_GET_NEXT_COMM_TYPE, and the import parameter LVS_COMM_VALUES will contain the address number and email address to whom the pdf needs to be sent.
    So here, i.e. In place of standard include RVADOPFO, put custom include ZRVADOPFO, and modify the code as below.
    After the function module ADDR_GET_NEXT_COMM_TYPE, read the email address from any custom table based on the various conditions or hard coded value, then move it to the below variable.
    LVS_COMM_VALUES-ADSMTP-SMTP_ADDR.
    And remaining functionality will be taken care by the standard code. i.e. converting the spool to PDF and attaching it while sending the email etc....
    If I am not wrong, the same functionality will work  even while saving the sales order etc..
    Regards,
    Santu.

  • Error while converting class file to exp and jca file

    error while converting *.class file to *.exp and *.jca file
    =====================================================================================================================
    linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
    error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
    error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
    conversion completed with 2 errors and 0 warnings.
    =====================================================================================================================

    i compile a file javacard use this command:
    ===
    javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
    ===
    and try to convert this class use this command
    ===
    /home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    ===
    result convert:
    ===
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
    converting com.sun.javacard.samples.Identity.Identity
    error: export file framework.exp of package javacard.framework not found.
    conversion completed with 1 errors and 0 warnings.
    ===
    why ??
    please your comment for this problem.
    thank 4 all.

  • Error while deleting from BIA index

    HI EXPERTS GETTING BELOW ERROR PLZ GIVE CLARITY ON THIS:
         1.A communication error occured, with the TREX TcpIp     
         2.Error while deleting from BIA index; reconstruction required     
    THANKS &REGARDS,
    rAMESH,

    Dear Ramesh,
    Please check the connection with BIA. Please ask the Basis team to check the BW to BIA connection if they maintain it.
    YOu can go to rsddbiamon2 and check BIA connection availibility for more details.
    If that is right please try redoing the step at which you faced error and it should help.
    Please close the question if you have got the answer or solved it.
    Regards,
    Den

  • Error while converting jad and jar to alx and cod files

    hi all,
    i am getting an error while converting jad and jar files into cod and alx files for balckberry.. here is the error i am getting.. can anyone help me this regard...
    Parsing classfile: txtCanvas.class
    I/O Error: Import file not found: d:\Research In Motion\BlackBerry JDE4.6.0\lib\
    net_rim_api.jar
    thanks in advacne
    pallavi

    thank you very much for your responses. can i send my cod and alx files to check. if you are interested only.
    here is the command which i used to convert my jad and jar files
    D:\Research In Motion\BlackBerry JDE 4.6.0\bin>rapc import="d:\Research In Motio
    n\BlackBerry JDE 4.6.0\lib\net_rim_api.jar" codename=MoBilalMIDlet -midlet jad=M
    oBilalEnglish.jad MoBilalEnglish.jar

  • Error while navigating from a report in OBIEE

    I get the below error while navigating from one report to another report
    Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
    [nQSError: 16001] ODBC error state: 37000 code: 1101 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate a new page for database 'TEMPDB'
    because of insufficient disk space in filegroup 'DEFAULT'. Create the necessary space by dropping objects in the filegroup
    , adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup..
    [nQSError: 16015] SQL statement execution failed. (HY000).
    Any inputs on this is highly appreciated.
    Thanks,
    Vasavi

    Hi Vasavi,
    There is no Temp space in Data base to run queries .Please contact your DBA to increase your db size
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 14, 2010 7:35 AM

  • Getting Error while creating a SMARTFORM.

    Hi All,
          i got these errors, while creating a smartform. Can anybody solve this.
    TOT_TEXT        Field V_TOTAL has no defined value
    GRD_TOTAL     Field V_GRANDTOTAL has no defined value
    Thanks in Advance...
    regards,
    Chenna.

    the txt fields are being created under a header which is not correct.
    Try to include the Text under the Main header, or else under the loop.
    can u send a screenshot of the problem? (expand all the branches, with error.)

  • SDM Error while deploying from IDE

    Hi I am getting an error while deploying from IDE.
    -- Server XXX did not accept login request as admin on port 50018.Details: ERROR: Could not establish connection to server XXX at port 50018: XXX
    This problem has been discussed herein SDN earlier.I also checked in the SDM trouble shooting guide and accordingly have added a entry in the host file under sys32/drivers, but still I continue to get that error.Any pointers will be appreciated.
    Regards,
    Muinul

    Hi
      Have you ever been able to deploy into SDM. What is the password that you type. Try typing SDM and see. If that doesnt work then you will have to change the password of your SDM. Your password either has been corrupted or changed
    Anyway follow these steps
    1. Start the Config Tool.
               (Execute <SAPj2eeEngine_install_dir> \configtool\configtool.bat.)
    1. Select the secure store node.
                The configuration for the secure storage in the file system appears.
    1. Select the admin/password/<SID> entry.
    2. Enter the administrator user's new password in the "Value" field and choose "Add".
    3. Choose "File" --> "Apply" to save the data.
    Note: Contrary to the message that appears, you do not need to restart the server or cluster for this change to take effect.
    4. Finally restart SDM server.
    Hope that helps. Let me know if you require more information
    regards
    Ravi

  • Error While Importing from EIF file into AW

    Hi All,
    I am facing the following error while importing from EIF file into AW using AWM as well as from sql prompt.
    java.sql.SQLException: ORA-36786: (IOSEC04) File POCAW/abc.eif does not exist or cannot be accessed.
    ORA-06512: at "SYS.DBMS_AW", line 42
    ORA-06512: at line 1
    at oracle.olap.awm.eif.eifimport.ImportDialogActionThread.doExportOrImport(ImportDialogActionThread.java:172)
    at oracle.olap.awm.eif.EifDialogActionThread.doAction(EifDialogActionThread.java:58)
    at oracle.olap.awm.ui.dialog.ThreadedDialogActionThread.run(ThreadedDialogActionThread.java:49)
    i have already created the directory pocaw.
    i have done the following steps :
    CREATE OR REPLACE DIRECTORY POCAW as 'D:\Olap_POC\export';
    GRANT all ON DIRECTORY POCAW to PUBLIC;
    execute dbms_aw.execute ('aw create ''POC_AW''');
    execute dbms_aw.execute('cda pocaw');
    execute dbms_aw.execute('dtb attach POC_AW rw');
    execute dbms_aw.execute('import all from eif file ''/abc.eif'' dfns update ');
    any idea or thought would be appreciable.
    thanks n advance
    anwar

    execute dbms_aw.execute('import all from eif file''/abc.eif'' dfns update ');
    Maybe one of the following file names could help
    (have never tried it):
    ''abc.eif''
    ''POC_AW\abc.eif''Yes,
    you don't need the slash. CDA is like setting a default directory.

  • Error while extracting from BI source

    Hi,
    We are facing a wierd problem:
    Scenario:
    Loading data from one DSO to another DSO with the help of transformation
    The DTP fails at second data package each time. First data package goes successfully but it fails at the second data package) We have tried to vary the data package for e.g. 100 records, 5 records etc.....no matter what we do the load fails at the second data package with the following error message.
    Error:
    Data package processing terminated
    Error while extracting from source EPUD0002 (type InfoProvider)
    System error in program SAPLRS_EXCEPTION and form RS_EXCEPTION_TO_MESSAGE (see long text)
    Unknown error in SQL interface
    Error reading the data of InfoProvider EPUD0002
    Exception CX_RS_STEP_FAILED logged
    Workaround:
    We tried to increase the number of data package size so that all the records can be processed in only one data package and the load has never to request for 2nd data package . BUT as the data package size is big it takes long time to process and never completes....
    FYI...Our transformation has lots of abap coding ...
    Addn Info:
    SAP_BW   700   0010
    BI_CONT   703   0005
    SAP_BASIS  700  0010
    Any help will be highly appreciated...
    - Amit

    There must be some bug in the code which is causing this issue.
    try to debug it,
    refer: /people/community.user/blog/2007/03/29/sap-netweaver-70-bi-extended-capabilities-to-debug-a-data-transfer-process-dtp-request
    /people/dirk.herzog/blog/2005/02/11/abap-development-in-sap-bw

Maybe you are looking for

  • Argh, lost data, can someone help

    A week ago or so I updated to the iOS 4 on my iPhone 3GS. Pretty smooth update, everything seemed to be working, expect I had zero data services. Email, web, etc, all down. Voicemail did not work, SMS did, but MMS did not. I am on AT&T. I did some go

  • Misalignment between FEBA and GL account of the corresponding bankaccount

    Hi, For CCXXXX the balance in FEBA for the USD bank account does not agree to the balance in the GL account. The difference is too big to originate in the revaluation. According to the GL account, the balance is AUD 203.400, according to FEBA, the ba

  • Duplicated table

    I have duplicated a table on the same sheet, with the hope to have the duplicated one showing filtered information only. The problem is that when I alter the original, adding more lines, changes are not reflected on the duplicated table. Is there any

  • I am having problems with the Google Internet access on my iPhone 5 since the latest update

    I Am having problems connecting to the internet and this started after my latest installation of updates for my iPhone. It is an iPhone 5, version 8.1.2. I force a shutdown and reboot which corrects the problem for awhile. Is there something else I c

  • Creating an iPad app on a Windows 8.1 PC

    Do I require a Mac in order to create an iPad application? I realize I need an iPad to test the app. I am signed up for Creative Cloud, but not the publishing app. Do I need to sign up for the publishing app?