PDF Creation for Smartform having color graphic is giving error in opening

Hi All,
I have a Smart form with a color Graphic of company logo. This is being displayed properly in print preview and in print documents.
The requirement was to convert this to PDF and send it as mail attachment, I am using the SPOOL ID creation approach. The mail is being sent properly with the attachment and when this is being opened, it says there is some error. The page having the Graphic is not being displayed, but the other pages where this graphic is not there are being displayed properly.
I have checked the SCOT settings they are correct, for SAP Scripts/Smart forms the format is PDF only.
Please provide me any inputs on this. All inputs are rewarded.
Thanks & Regards,
Goutham.

Hi Neelima,
In the user-profile maintain LOCL as default printer
Control Parameters for the OTF Generation
  MOVE : c_x   TO lst_ctrl_params-no_dialog,        " Do not need a Dialog
         space TO lst_ctrl_params-preview,          " No Preview
         c_device_prnt TO lst_ctrl_params-device,   " PRINTER - Needs to be passed
OTF Data is obtained for the smartform if this parameter is set
       c_x   TO lst_ctrl_params-getotf,
Output Options
         c_x    TO lst_output_options-tdnoprev,    " No Print-Preview
         c_x    TO lst_output_options-tdnewid,     " Generates New-ID for spool
         space  TO lst_output_options-tdimmed,     " No Immediate Priting
         c_device_locl TO lst_output_options-tddest. " LOCL: Default Printer
FM of the Smartform: ZJ_FORM_1180
  CALL FUNCTION l_fmname
    EXPORTING
    ARCHIVE_INDEX              =
    ARCHIVE_INDEX_TAB          =
    ARCHIVE_PARAMETERS         =
      control_parameters         = lst_ctrl_params     " Control parameters
    MAIL_APPL_OBJ              =
    MAIL_RECIPIENT             =
    MAIL_SENDER                =
      output_options             = lst_output_options  " Output Options
      user_settings              = space               " WF-BATCH - Setting DO NOT CHANGE
      wa_1180                    = lst_1180            " Project Data
      i_form_amounts             = li_measure          " Funded Prgrm Data
      g_tot_req_budget           = l_tot_req_bud       " Total Requested Budget Amt
      g_req_fnd_adj              = l_req_fnd_adj       " Requested Funding Adjustment Amt
    IMPORTING
    DOCUMENT_OUTPUT_INFO       =
      job_output_info            = lst_job_output_info    " Spool ID is obtained here
    JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
      formatting_error           = 1
      internal_error             = 2
      send_error                 = 3
      user_canceled              = 4
      OTHERS                     = 5.
  IF sy-subrc <> 0.
    RAISE excp_no_smartform_output.
  ENDIF.
Get the OTF Data - getotf is set to X, then the OTF data is obtained here.
As the parameter is not set we do not require this
MOVE lst_job_output_info-otfdata TO li_otf_data.
Get the spool id number. In the spool the data is in OTF format and from
which the PDF format of the data is obtained.
  READ TABLE lst_job_output_info-spoolids INTO l_spoolid INDEX 1.
  Convert the OTF to PDF by using the FM: CONVERT_OTFSPOOLJOB_2_PDF
Just pass the sppol id number to src_spoolid, in tables u get the PDF.
Please let me know if further details are required from my side.
Regards,
Goutham.

Similar Messages

  • Creating PDF brochure for printing: Black color adjustment

    Hi guys,
    I created a brochure in Idesign which has a black background color and in addition also some pictures with black backgrounds.
    In order to print the brochure I want to create a PDF (with the right order of pages, e.g. page 1 next to page 8, 2 next to 7 etc.) via the "print function".
    The page order is not a problem, but the black background color is rather gray instead of black - so there is quite a difference between the black background color of the pictures and of the whole background.
    (When using the normal "export function" of Indesign I know how to solve the color problem, but then I cannot create a PDF with the right page order for printing...)
    Has anyone an idea how to solve this?
    Thanks for your help in advance!
    Best,
    Chris

    Your images all use some form of Rich Black for the background, and that prints using all 4 CMYK inks. Your 100%K background will almost always seem gray next to that because it is, in fact, lighter. This will be true even if you use a profile conversion to make it also a 4-color black.
    You can make your own rich black swatch and use it as the background (sample a few of the images to get some idea of a good mix), but in truth your images are still  probably not going to match all that well. Images tend to have color variations across the background, and your ID background is a flat color, so even a slight mismatch can cause the edges to be obvious. There can also be differences in color on some printers caused by differences in the way raster and vector content are processesd.
    I prefer to embrace that, or at least admit it is going to happen, and either use a completely different color for the background so the mismatch always shows, and looks deliberate rather than like a mismatch, or I add a stroke to the image frames, often paper, to break the continuity and disguise the mismatch.
    As far as imposing the file and exporting, there are a number of free scripts, and an actual plugin, IDimposer which is also currently free, that can impose your file for you before you export. You can learn more about the plugin at Overview | IDImposer

  • PDF creation causes rich black colors to shift

    I'm designing a book cover. There are three main areas: front, back and spine. Each area has specified the default "black" color in the swatches panel. This color uses 100% K in the CMYK color space. In the preferences panel, under "appearance of black", I have checked to print and display blacks as rich black. Everthing looks great on the Indesign file. My blacks are as specified. Everything has been double-checked on the swatch panel to be set to this black color, which is a non-editable color (always remains 100% K on the CMYK setting).It has been displaying just fine on the file, as a rich black, no color shifting ever whatsoever until doing the following:
    When I make a PDF using the "Export" window, I select PDF/x-1A as my printer specifies. I create the PDF, and open it, only to see that my blacks are being shifted to a shade of deep brownish black.
    On the first few attempts, only two of the three areas specified above did this. ON the next attempts, all three areas look the same. This is weird. I'm very disappointed with the strange issues present in Indesign, as I am trained with Quarkxpress and find it to work flawlessly in comparison, especially with something like color output.
    What am I doing wrong?
    When I change settings, for example, change the color management to "none" or leave it in the default for the PDFx/1-a, it doesn't make any difference in this glitch in the output.
    Help!
    Thanks.

    The Appearance of Black setting to print all blacks as rich black ONLY affects printing or exporting to RGB devices (essentially printing to desktop printers or PRINTING to PDF with Composite RGB or Composite Grayscale selected). It has no effect at all on EXPORT to PDF.
    >I changed my 100%K only blacks to genuine rich blacks of 100%K 25%C 25%Y 25%M  and the problem is corrected.
    You said this is a book cover. That implies that the output will be printed, not viewed on screen. For printed output it is ESSENTIAL that you set blacks to display accurately. You should also turn on Overprint Preview when judging color. You'll probably get away with your rich black in any type over 12 points or so where it might be applied, but it's generally not a great idea to use rich black for type in small sizes. Rich blacks also generally use slightly more cyan than yellow and magenta to compensate for ink impurities.
    Do you have a high-end monitor? Is your monitor calibrated and profiled using a colorimeter? If not, you can forget what you see on screen. The odds that it is anywhere near accurate are similar to the odds of winning the lottery. Are you using the same color space in Acrobat as you are in ID? If you change the color space, the appearance of your colors will change.
    When you export to PDF/X-1a you are converting everything to CMYK using a target color space. By default the conversion option is set to preserve numbers. If your imported art has an embedded profile that differs from the destination, that will be honored and color numbers will be changed to preserve the appearance of color, as much as possible taking into account different gamuts, and untagged imported art, along with native objects will all be presumed to be in the current working space in ID, and cmyk numbers for those objects will be preserved. If the destination space differs from the working space, thew appearance of these colors will shift, but 100% K native objects will continue to be 100% K in the PDF. A conversion to a destination that differs from the working space WITHOUT preserving numbers will result in 100% K being changed to a 4-color mix that mimics the appearance of 100% K output in the working space.
    Knowing the destination space in advance is vital if you are doing a CMYK conversion. CMYK profiles are "device dependent" and CMYK-to-CMYK conversions are destructive, both in terms of potential loss of color (and you don't gain by going from a smaller to a larger gamut space) and conversion of solid colors to 4-color mixes which is particularly problematic for black type and thin rules.

  • PDF Creation for MBP?

    I am a new owner of a MBP (love it!).
    I have office for mac installed. I can create a PDF from a Word file, but I need to be able to combine multiple files to create a larger PDF.
    Is there an existing utility on my MBP that I haven't discovered yet? On my PC I used Adobe Acrobat 8.0. Do I need to pony up a few hundred dollars for an Adobe Mac version??
    Thanks in advance!

    Hi marleem24;
    I think if here, you will find that it is not necessary to pony up to Acrobat.
    Allan

  • Printing pdf data for smartform

    Hi,
    I tried to convert an Smartform output data using program 'RSTXPDF4'.
    When I go to sp01 I see a new spool number being created saying 'xxxxxxx' converted to pdf data.
    Can someone tell me how do I print this spool number ?
    Also can someone tell me what exactly is the use of SP01 ?
    Thanks.

    Hi Tushar,
    You don't need to use 'RSTXPDF4'. In your program use 'SSF_FUNCTION_MODULE_NAME' to get the function module generated by the smartform. Then you call the generated function  importing job_output_info. This will be in otf format. Pass the OTF table to another function ie
      call function 'HR_IT_DISPLAY_WITH_PDF'
          tables
            otf_table = t_otf_table.
    This will let you display the output in PDF right in the same R/3 session. The User can then decide whether to print or save it to a location.
    Regards,
    Suresh Datti

  • Text Module Creation for Smartform

    Hi,
    When using smartform we can include text module to a text. Can anyone please tell how to create the text module. Because we can include some text module to the text but how to create?
    Best wishes,
    Atanu

    Hai Atanu,
    Text module of the text node is used to refer to an existing text module in the system. The text modules can be used in two ways:
    Ø Refer to the text module. The text then appears read-only in the PC editor and is included when the form is printed.
    Ø Copy the text module. The system then copies the text of the module and automatically converts the text node into an editable text element.
    Ø To create a text node , call the context menu for that node in the tree structure that shall contain the text and choose create->text
    Ø Enter a unique name for the node and a description
    Ø On the general attributes tab select the text type text module
    Ø Enter the name of the text module in the text name field  
    Reward points if helpful.
    Regards,
    Srikanth.

  • Creation of triggers using CFQUERY tag is giving error

    Hi,
    I am creating triggers and stored procedure on ORACLE data
    base using <CFQUERY>.
    <CFQUERY DATASOURCE="CRM">
    create or replace trigger AWC_ACCOUNTINGPERIODSID_TRI
    before insert on AWC_ACCOUNTINGPERIODS
    for each row
    begin
    select AWC_ACCOUNTINGPERIODSID_SEQ.nextval into :new.AP_ID
    from dual;
    end;
    </CFQUERY>
    But the created trigger is not compiled, it is giving the
    following error
    "Line # = 1 Column # = 6 Error Text = PLS-00103: Encountered the
    symbol "" when expecting one of the following: begin case declare
    exit for goto if loop mod null pragma raise return select update
    while with <an identifier> << close current delete
    fetch lock insert open rollback savepoint set sql execute commit
    forall merge pipe The symbol "" was ignored."
    If I edit that trigger in enterprise manager console by
    pressing space and compile that, it is working fine with out any
    error. If i run the above statement in sql *plus, It is working
    fine with out any error. Can you please tell me why this is
    happening if i run it using cfquery tag and also the possible
    solutions.
    Thanks in advance,
    Vinod

    I can't tell you why your particular trigger is failing, but
    here is some "typical" reasons from Oracle's metalink.
    Common reasons for PLS-00103
    Error Summary
    PLS-00103 Encountered the symbol "%s" when expecting one of
    the following (Oerr
    LS.103)
    Error Details
    ~~~~~~~~~~~~~
    Error: PLS-00103
    Text: Encountered the symbol "%s" when expecting one of the
    following:
    Cause: This error message is from the parser. It found a
    token
    (language element) that is inappropriate in this context.
    Action: Check previous tokens as well as the one given in the
    error message. The line and column numbers given in the
    error
    message refer to the end of the faulty language construct.
    PLS-00103 errors can often be difficult to localize what the
    error is so here are some
    common reasons for PLS-00103 errors..
    A very common reason for PLS-00103 is when a reserved word is
    used, with a reserved word
    means words that names an oracle object or a built in
    procedure, for example MOD, ABS,
    TABLE, VIEW etc..
    When trying to use SQL*PLUS commands in PL/SQL procedures,
    like SPOOL, SET and other
    commands that belongs to SQL*PLUS can result in this error.
    Using parameter declaration at the IN/OUT clause in a
    procedure, this works in versions
    prior to 8.0.4, but it just ignored the declaration.
    Using DDL commands in PL/SQL will fail in PLS-00103, the way
    to use DDL commands is
    to build a procedure in dynamic sql.
    When creating package specification and a package body, a
    PLS-00103 error will occur
    if there is no slash, '/', after the package specification.
    Phil

  • Trying to look Contents for a new custom InfoCube and giving ERRORS ?????

    Hi all,
        I have created a custom InfoCube (ZTEST_PS) in similar to 0PS_C04. When I try to look the Contents of this InfoCube through Manage --> Contents or Listcube Tcode option, it is giving the following warnings/errors for every attempt:
    1. Your user master record is not sufficiently maintained for object Company Code Hierarchy
    Diagnosis
    When checking your authorizations for object 'Company Code Hierarchy' (technical name: ZCOMPHIER) it was established that you do not have authorization in your user master record for this object (return code 12).
    Procedure
    How you continue depends on the return code. See the online documentation for ABAP language element "AUTHORITY-CHECK". Please note:
    With a return code of 12, the object 'Company Code Hierarchy' has not been maintained in the user master, meaning there is no profile in the user master record in which this authorization object has been entered. This is, however, absolutely necessary, as all of the authorization objects created in the development class RSR are validated in the 'and' link. If the authorization is missing for only one object, the request is rejected as unauthorized.
    Get the person responsible for your authorization to create you a profile containing authorization for object Company Code Hierarchy.
    2. System error: RSDRC / FORM AUTHORITY_CHECK USER NOT AUTHORIZED ZTEST_PS ZTEST_PS
    3. System error: RSDRC / FUNC RSDRC_BASIC_CUBE_DATA_GET ERROR IN RSDRC_BASIC_QUERY_DATA_GET ZTEST_PS 64
    Message no. DBMAN100
    4. System error: RSDRC / FORM DATA_GET ERROR IN RSDRC_BASIC_CUBE_DATA_GET ZTEST_PS 64
    When I try to run a query against this custom InfoCube, I am getting the same First Warning.
    How can I fix theses warnings/errors, PLEASE ?
    Thanks.

    Venkat,
    You dont have authorizations for the 'Company Code Hierarchy'ZCOMPHIER , you dont have authorizations.
    What you will have to do is ask the basis person to give you authorization for the Hierarchy , Or if you can ..switcg off authorization checks for the Cube in T-Code RSSM.
    Regards,

  • Giving error while creating a sales contact for the previous year (2008)

    Hi Friends,
    We are currently with SP12. When we try to create a sales contract for the previous year it is giving error like "Schedule line is for the item 100 cannot be after the order's latest delivery date".
    i tried debugging and found that that there is a rule created for this (in SP12). I commented the rule and tried to create a contract but, again got an error "Error while saving". This error I can't catch while debugging.
    I even didn't find where the schedule line date and header cancel dates are set so that I can change the dates manually.
    If any one has any idea, kindly help me.
    Best regards,
    Swarna Seeta

    Hi Wolfhard,
    Thanks for the reply.
    You are right and I have uncommented the line which assigns true to the return value and the contract got saved now.
    Thank you so much.
    I just want to know whether commeting this rule effects any of the functionalities of the sales contract.
    Best regards,
    Swarna Seeta

  • Color graphic in a PDF generated from a SmartForm causes error

    I have a SmartForm containing a color graphic. It works correctly,
    appears just the way it should in Print Preview, and it prints
    correctly. However, when I generate a PDF file from, Adobe Reader
    complains that the PDF file is corrupt and refuses to print it. If I
    remove the color graphic from the SmartForm and don't make any other
    changes, I get a good PDF file that can be parsed, displayed, and
    printed without any problems.
    Why is the presence of the color graphic in the SmartForm leading to a
    corrupt PDF file? Is there any workaround (short of removing the color
    graphic) that I can use to get a good PDF file?
    Here is a more detailed description of what I am doing.
    1.     Creating the color graphic
         A. I started with a color .TIF file
         B. I went to transaction SE78,
            Form Graphics -> Stored on Document Server ->
              GRAPHICS General Graphics -> BMAP Bitmap Images
         C. Clicked on the "Import" icon
         D. In the "File name" field, navigated to my .TIF file
         E. Typed the name of my graphic in the "Name" field and some
            descriptive text in the "Description" field
         F. Selected the "Color Bitmap Image" radio button
         G. Set the "Print Attributes" as follows:
            Unchecked - Resides in the Printer Memory
            Checked   - Reserve Height Automatically
            Unchecked - Compression
         H. The color graphic seems to upload correctly
         I. When I click on Print Preview, it is displayed perfectly.
         J. When I use the Search Help associated with the name field to
            find the graphic, it is shown with the name and description
            that I gave it, the Object field is displayed as "GRAPHICS",
            the ID field is displayed as "BMAP".
         K. When I select Graphic -> Graphic Information, the Resolution is
            75 DPI and the Size is 26.86 x 8.26 cm. When I use this graphic
            in the SmartForm, I will enter the resolution as 300 DPI - in
            order to get an image whose dimensions are one-quarter of these
            dimensions, but which will have a good resolution for a laser
            printer.
    2.     The use of the color graphic in the SmartForm
         A. It is a "Graphic" node which is the first node on the first
            (and only) page of the SmartForm.
            i.   The Name is the name of the graphic I created
            ii.  Object = "GRAPHICS"
            iii. ID = "BMAP"
            iv.  The "Color Bitmap Image (BCOL)" radio button is selected
            v.   The Resolution = 300 DPI
         B. The position and size are:
            i.   Left Margin = 15.00 MM
            ii.  Width = 69.00 MM
            iii. Upper margin = 15.00 MM
            iv.  Height = 21.77 MM
    3.     The process of producing the PDF file
         A. The function SSF_FUNCTION_MODULE_NAME is called to obtain the
            name of the function module associated with the SmartForm.
         B. The function module (whose name was returned by
            SSF_FUNCTION_MODULE_NAME) is called with:
            i.   CONTROL_PARAMETERS = a SSFCTRLOP structure with
                 GETOTF = 'X'
                 NO_OPEN = space
                 NO_CLOSE = space
                 NO_DIALOG = 'X'
            ii.  OUTPUT_OPTIONS = a SSFCOMOP structure with:
                 TDPRINTER = 'POST2'
                 TDDEST = space
                 TDNEWID = 'X'
                 TDIMMED = 'X'
                 TDDELETE = space
                 TDCOVER = space
                 TDCOPOES = 1
           iii. JOB_OUTPUT_INFO = a structure of type SSFCRESCL used to
                 receive the OTF file
         C. The function CONVERT_OTF is called with:
            i.   FORMAT parameter = 'PDF'
            ii.  OTF table parameter = the OTFDATA table contained within
                 the JOB_OUTPUT_INFO SSFCRESCL structure returned from the
                 SmartForm function module.
            iii. BIN_FILE parameter = an XSTRING used to receive the PDF
                 file
            iv.  BIN_FILESIZE parameter = an integer used to receive the
                 size of the PDF file.

    Hello David,
    The reason for this problem is probably related to the FlateDecode compression described  in SAP Note 843480 (PDF conversion: Compression of bitmaps and TrueType fonts).
    Try switching off the usage of FlateDecode compression again via report RSTXPDF3 as described in Note #843480.
    It is a little confusing. The option 'FLATE_COMPR_OFF' needs to be set to 'On' to turn off the FlateDecode compression.
    To set this run as follows:
       se38 -> RSTXPDF3 -> enter 'FLATE_COMPR_OFF' in the 'Name' field
             -> Select 'Change Settings' radio button
    You will get a pop-up 'Do not use flat compression'.
    Select the 'on' button.
    After this create a new PDF and check if the problem is resovled.
    Regards,
    Aidan

  • Smartform preview dump when color graphics in form

    Seems I have found a SAP BUG in the smartforms Print Preview.
    A dump occurs in preview of pages beyond the first page.  The first page previews fine.  The dump occurs when you page down.  The error is an overflow because a field called stringlength2 is equal to 0 but it is used as in index for a string operation.  There should be a check for this in SAP's code before the offending line:.
    wa_otf_preview-tdprintpar+4 =          
      hexstring+stringlength(stringlength2).
    How are bugs reported to SAP if you are a developer?  Or am I doing something else wrong.  The dump does not occur if I remove the color graphic!
    Analyse erreur                                                      
    An exception occurred. This exception is dealt with in more detail be
    . The exception, which is assigned to the class 'CX_SY_RANGE_OUT_OF_B
    was neither caught nor passed along using a RAISING clause, in the procedure  "PREPARE_OTF_FOR_GUI_PREVIEWER" "(FUNCTION)" .                                                                   
    Since the caller of the procedure could not have expected this except
    to occur, the running program was terminated. The reason for the exception is: In program "SAPLSTXBW" the system tried to access field "HEXSTRING" w
    0.  Partial field access to fields with length 0 is not allowed, however.

    Hi
    U should find some notes in OSS.
    Max

  • How do I make color headings black, but color graphics graphics grayscale in my PDFs?

    My documents have blue headings and color graphics. I leave all the colors in my web PDFs, but for press I need black headings and grayscale graphics. The Convert Colors function in Acrobat gives me grayscale on both. To get black headings for press I've been printing a second PDF from FrameMaker with Spot Color as Black/White, then doing Convert Colors in Acrobat to get grayscale graphics. This means I must make two PDFs from FrameMaker: one for web and one for press.
    Is there any way in Acrobat 11 to convert my blue headings to black, while converting graphics to grayscale?

    >You can produce a grayscale PDF by printing to a Postscript file,
    choosing Output > Color > Composite gray, and Distilling the PS file
    (assuming you have the full version of Acrobat).
    If you have a full version of Acrobat you can do that in one step by choosing AdobePDF as the printer. :)

  • How to Convert spool which is for smartform output  to PDF?

    how to Convert spool which is for smartform output  to PDF?
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' is not working for smartform output,
    if i use this there will be error spool not contain list output?
    than whats the function module or way to convert spool contain smartform output to pdg?
    regards,

    <b>Procedure</b>
         When we activate the Smartform the system generates a Function Module. The function module name we can get from Smartfrom screen from menubar
    “Environment => Function Module_Name” . In a report we can get this Function module name by calling a Function Module standard SSF_FUNCTION_MODULE_NAME. This function module  at runtime calls the FM generated by smartform, which in turn is then used to pass data from the report to Smartform. In the report given below the FM generated is “ /1BCDWB/SF00000152 ”. In this FM we can see CONTROL_PARAMETERS in import tab. This is of type SSFCTRLOP. We need to set the GETOTF of this to be ‘X’. Setting this field will activate the OTF field in smartform.
    In export tab of the FM generated by smartform we can see a parameter JOB_OUTPUT_INFO which is of type SSFCRESCL. The SSFCRESCL is a structure of having one of fields as OTFDATA. OTFDATA in turn is a table of type ITCOO. ITCOO has two fields TDPRINTCOM and TDPRINTPAR. TDPRINTCOM  represents command line of OTF format data and TDPRINTPAR contains command parameters of OTF format data.
    In every Smartform output in OTF format, TDPRINTCOM begins and ends with ‘//’. ‘EP’ represents the end-of-page value for TDPRINTCOM field.
    In addition we need to set few fields at the place where we call this FM(generated by smartform) in our program. While calling this FM we should set control_parameters, output_options, user_settings and job_putput_info fields as shown in program.
    Once these settings are done we can call Function Module CONVERT_OTF to convert the OTF data of smartfrom output to PDF data format. Once these are done we can call method “cl_gui_fronted_services=>file_save_dialog” to specify the directory path where we want to save the output PDF file. After this we can call Function Module GUI_DOWNLOAD to download the PDF file on our local system.
    <b>Here is a sample code of program to perform the function.</b>
    SAMPLE CODE
    [code]*&---------------------------------------------------------------------*
    *& Report  ZAMIT_SMART_FORM_PDF                                        *
    REPORT  ZAMIT_SMART_FORM_PDF                    .
    data: carr_id type sbook-carrid,
          cparam type ssfctrlop,
          outop type ssfcompop,
          fm_name type rs38l_fnam.
    DATA: tab_otf_data TYPE ssfcrescl,
          pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
          tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
          file_size TYPE i,
          bin_filesize TYPE i,
          FILE_NAME type string,
          File_path type string,
          FULL_PATH type string.
    parameter:      p_custid type scustom-id default 1.
    select-options: s_carrid for carr_id     default 'LH' to 'LH'.
    parameter:      p_form   type tdsfname   default 'ZAMIT_SMART_FORM'.
    data: customer    type scustom,
          bookings    type ty_bookings,
          connections type ty_connections.
    start-of-selection.
    ***************** suppressing the dialog box for print preview****************************
    outop-tddest = 'LP01'.
    cparam-no_dialog = 'X'.
    cparam-preview = SPACE.
    cparam-getotf = 'X'.
      select single * from scustom into customer where id = p_custid.
      check sy-subrc = 0.
      select * from sbook   into table bookings
               where customid = p_custid
               and   carrid in s_carrid
               order by primary key.
      select * from spfli into table connections
               for all entries in bookings
               where carrid = bookings-carrid
               and   connid = bookings-connid
               order by primary key.
      call function 'SSF_FUNCTION_MODULE_NAME'
           exporting  formname           = p_form
    *                 variant            = ' '
    *                 direct_call        = ' '
           importing  fm_name            = fm_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.
        exit.
      endif.
    * calling the generated function module
      call function fm_name
           exporting
    *                 archive_index        =
    *                 archive_parameters   =
                     control_parameters   = cparam
    *                 mail_appl_obj        =
    *                 mail_recipient       =
    *                 mail_sender          =
                     output_options       =  outop
                     user_settings        = SPACE
                     bookings             = bookings
                      customer             = customer
                      connections          = connections
          importing
    *                 document_output_info =
                     job_output_info      = tab_otf_data
    *                 job_output_options   =
           exceptions formatting_error     = 1
                      internal_error       = 2
                      send_error           = 3
                      user_canceled        = 4
                      others               = 5.
      if sy-subrc <> 0.
    *   error handling
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      tab_otf_final[] = tab_otf_data-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       format                      = 'PDF'
       max_linewidth               = 132
    *   ARCHIVE_INDEX               = ' '
    *   COPYNUMBER                  = 0
    *   ASCII_BIDI_VIS2LOG          = ' '
    IMPORTING
       bin_filesize                = bin_filesize
    *   BIN_FILE                    =
      TABLES
        otf                         = tab_otf_final
        lines                       = pdf_tab
    EXCEPTIONS
       err_max_linewidth           = 1
       err_format                  = 2
       err_conv_not_possible       = 3
       err_bad_otf                 = 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.
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    *  EXPORTING
    *    WINDOW_TITLE         =
    *    DEFAULT_EXTENSION    =
    *    DEFAULT_FILE_NAME    =
    *    FILE_FILTER          =
    *    INITIAL_DIRECTORY    =
    *    WITH_ENCODING        =
    *    PROMPT_ON_OVERWRITE  = 'X'
      CHANGING
        filename             = FILE_NAME
        path                 = FILE_PATH
        fullpath             = FULL_PATH
    *    USER_ACTION          =
    *    FILE_ENCODING        =
    *  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.
    *************downloading the converted PDF data to your local PC********
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       bin_filesize                    = bin_filesize
       filename                        = FULL_PATH
       filetype                        = 'BIN'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    IMPORTING
       filelength                      = file_size
      TABLES
        data_tab                        = pdf_tab
    *   FIELDNAMES                      =
    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.
    ENDIF.
    [/code]
    Thanks and Regards,
    Pavankumar

  • Access restriction for PDF generated with Smartform

    Hi there,
    I am generating a PDF from a Smartform using convert_otf.
    What I would like to do is, add restrictions for the generated document just like in Acrobat Professional.
    For example:
    Printing: yes/no
    saving: yes/no
    cut, copy paste: yes/no
    Is there a way to pass this Parameters to the PDF?
    Thanks in advance
    Uli

    Hello,
    check this thread: Mailing PDF Attachment with Password Protected
    Otto

  • InCopy is best for PDF creation...what do you think?

    I use Apple pages 09 export to create PDF documents with Adobe Acrobat Pro 9 (mac).  I use these with my clients, and since I am a communicaitons consultant, I want them to stand out.  I have found pages does not do the entire job...I must add things to the PDF in acrobat (such as flash) and pages has bugs (links don't show up in left column of links in adober reader).  So, I am becoming disolutioned with pages to pdf.
    I am very technically oriented and an expert computer user, so I have been thinking about moving to a more roubust word processor to make PDF documents.  I understand Adobe has such word processor (InCopy I think).  I will reserach it, but I am looking for advice from users.  What is the best way to go?
    Does InCopy allow everything to be done in InCopy (and not a 2 stage process of adding things in acrobat).  Are there alternatives to InCopy that I might look at?  Is there anything better for PDF creation?  Print is not a big issue for me, just PDF/electronic documents.
    thanks
    bob

    InCopy doesn't do what you want. InCopy is designed for to create content that will eventually be placed into ID. I could be wrong, but I'd ask in the Incopy forum, not here:
    http://forums.adobe.com/community/incopy/incopy_general
    To some extent I think you would be better off with InDesign. It is not really a WP, but you can use Pages, TextEdit, Nisus, Mellel or any other WP as a Word Processor and then just place the content into InDesign. Can you use InCopy to place the content into InDesign, sure, but I really think of InCopy as an integrated workflow product for group content creation.

Maybe you are looking for

  • Firefox keeps saying it is not responding

    i have a samsung netbook and have firefox 4 but when i go on the internet after a few mins it stops working and says on the blue line at the top 'not responding'. i have to restart my computer and start a over again. occasionally after a few mins it

  • App created with DPS only works while on WIFI

    I have created an app in InDesign and went through all the steps to create an .ipa. I then loaded it onto my ipad. The app works fine on the iPad only went it is connected to wifi. Once I disable any connection the animations in the app do not ever l

  • Assigning digital Spidf in / out put in logic LE using TC KONNEKT 24 D

    hi there.. i know LE doesnt support digital in/out puts but ive been told i have to configure is manually through my KONNECT 24d audio interface.. that i have no clue how to configure and assign these in/out puts... if any one knws how to do that ..

  • Loopback

    Is there any software updates to cure the loopback issue or any routers that don't suffer the problem? Using the host file at the moment but that is causing other issues

  • Broken link report broken?

    Hi. I'm using Dreamweaver CS 5.5. I get the same results on Mac or Windows so I don't think this is OS specific. When I run "Site>Check links sitewide" I end up with a report that shows around 11,000 broken links on different pages. I am running this