Problem with smartform conversion

Hello i am trying to convert PO into SMARTFORM using this code..
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSmartformtoPDFformat&
but it is taking me to dump error and when i analyzed the source code where i am going wrong it is showing error with this line CALL FUNCTION "v_fm_name" . PLease suggest me the necessary to rectify my error.
Thks

Hello Amit,
Thanks a lot for your reply please just check my code...
DATA: it_otf   TYPE STANDARD TABLE OF itcoo,
      it_docs  TYPE STANDARD TABLE OF docs,
      it_lines TYPE STANDARD TABLE OF tline,
      st_job_output_info      TYPE ssfcrescl,
      st_document_output_info TYPE ssfcrespd,
      st_job_output_options   TYPE ssfcresop,
      st_output_options       TYPE ssfcompop,
      st_control_parameters   TYPE ssfctrlop,
      v_len_in                TYPE so_obj_len,
      v_language              TYPE sflangu VALUE 'E',
      v_e_devtype             TYPE rspoptype,
      v_bin_filesize          TYPE i,
      v_name                  TYPE string,
      v_path                  TYPE string,
      v_fullpath              TYPE string,
      v_filter                TYPE string,
      v_uact                  TYPE i,
      v_guiobj                TYPE REF TO cl_gui_frontend_services,
      v_filename              TYPE string,
      v_fm_name               TYPE rs38l_fnam.
*CONSTANTS c_formname TYPE tdsfname VALUE 'ZREDDY'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
  EXPORTING
    i_language    = v_language
    i_application = 'SAPDEFAULT'
  IMPORTING
    e_devtype     = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = 'ZSMART'
  IMPORTING
    fm_name            = v_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.
ENDIF.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
  EXPORTING
    control_parameters   = st_control_parameters
   output_options       = st_output_options
  IMPORTING
    document_output_info = st_document_output_info
    job_output_info      = st_job_output_info
    job_output_options   = st_job_output_options
  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.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
  CALL FUNCTION 'CONVERT_OTF_2_PDF'
    IMPORTING
      bin_filesize           = v_bin_filesize
    TABLES
      otf                    = st_job_output_info-otfdata
      doctab_archive         = it_docs
      lines                  = it_lines
    EXCEPTIONS
      err_conv_not_possible  = 1
      err_otf_mc_noendmarker = 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.
........................GET THE FILE NAME TO STORE....................
  CONCATENATE 'smrt' '.pdf' INTO v_name.
  CREATE OBJECT v_guiobj.
  CALL METHOD v_guiobj->file_save_dialog
    EXPORTING
      default_extension = 'pdf'
      default_file_name = v_name
      file_filter       = v_filter
    CHANGING
      filename          = v_name
      path              = v_path
      fullpath          = v_fullpath
      user_action       = v_uact.
  IF v_uact = v_guiobj->action_cancel.
    EXIT.
  ENDIF.
..................................DOWNLOAD AS FILE....................
  MOVE v_fullpath TO v_filename.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      bin_filesize            = v_bin_filesize
      filename                = v_filename
      filetype                = 'BIN'
    TABLES
      data_tab                = it_lines
    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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
In this code it is showing dumperror with the call function v_fm_name....in the dump it is showing error like one parameter is missing...iam unable to recognize that parameter. Please if you can able to find help me to achieve this.
Thks

Similar Messages

  • Problem with type conversion and primary key during row fetch

    [Note, this error occurs in Oracle XE, APEX 2.1.0.00.39]
    I have been having a problem with Automatic Row Fetch:
    ORA-01460: unimplemented or unreasonable conversion requested
    So in an effort to resolve this, I created a PL/SQL process with the query below and was able to isolate the same error. The problem seems to come from one of the primary keys being a "number" type (APP_ID). The error occurs on the line:
    where u.app_id=:P5_APP_ID
    I have tried the following variations on this line in an effort to resolve this, but all generate the same error:
    1) where to_char(u.app_id) = :P5_APP_ID
    2) where u.app_id = to_number(:P5_APP_ID)
    3) where to_char(u.app_id) = to_char(:P5_APP_ID)
    I've also tried the laternate syntax "&__." and "#__#", but these don't function in the Source field and show up as syntax errors.
    Any suggestions are welcome.
    begin
    for r in (
    select app_name, apptype, appcreator, appurl
    from application_users u, application_info i
    where u.app_id=:P5_APP_ID
    and i.app_id=u.app_id
    and u.username=:P5_USERNAME)
    loop
    begin
    :P5_APP_NAME := r.app_name;
    :P5_APPURL := r.appurl;
    exception
    when others then
    raise_application_error(-20000,'In Loop Failure',true);
    end;
    end loop;
    exception
    when others then
    raise_application_error(-20000,'Out of Loop Failure',true);
    end;
    Thanks in advance,
    Barney

    I found a prior post referencing a similar issue and it was solved by using the "v(__)" syntax. This did resolve my issue, however, I have a quick follow-on which I'm hoping someone can answer quickly...
    Since the "v(__)" syntax won't work for the Automatic Row Fetch (at least to the best of my knowledge), I have to do a manual process. However, the manual query as shown above doesn't actually populate any of the form values through the bind variables. They all remain at their cached values from prior data entry on the form.
    Is using the bind variables for assignment incorrect, or is there something that must be done to get the updates to show up in the form (ordering of processes, etc.).
    My manual process is running in the Load: Before Header state so I would have expected it to update all of the fields.
    Thanks in advance,
    Barney

  • FCC: Problems with content conversion

    Dear all,
    I have a receiver FTP adapter with content conversion. In RWB I'm facing following error message:
    Adapter Framework caught exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'FCOTUPI')', probably configuration error in file adapter (XML parser error)'
    The field with value FCOTUPI could be found in POS recordset. I double check the length of columns but couldn't find
    an error.
    CC configuration:
    Recordset structure: HEADER,POS,SUBPOS
    HEADER.fieldFixedLengths = 8,4,8
    POS.fieldFixedLengths = 8,20,15,3
    SUBPOS.fieldFixedLengths = 5,5
    HEADER.fixedLengthTooShortHandling = Cut
    POS.fixedLengthTooShortHandling = Cut
    SUBPOS.fixedLengthTooShortHandling = Cut
    As you can see by the names, I am using as XML to convert a structure with subnodes. In documentation it said
    that it is not allowed, but in some threads I found the information that structure could be processed.
    Any ideas how to solve this problem?
    Thanks
    Chris

    Dear Amit,
    thanks for your answer. I already checked this blog, but hoped for other solutions.
    My problem: I tried to map my hierarchical structure to a flat structure.
    Source
    Struc1 (0..unbounded)
    -Item1.1
    -Struc2 (0..unbounded)
    --Item 2.1
    --Struc3 (0..unbounded)
    ---Item3.1
    Target:
    Struc1 (0..unbounded)
    -Item1.1
    Struc2 (0..unbounded)
    -Item 2.1
    Struc3 (0..unbounded)
    -Item3.1
    But if e.g. the Struc2 appears two time it will be created two time in target structure before
    the Struc3 is created. But ths Struc3 belongs to Struc2 and should be created in flat file under
    Struc2 directly.
    How can we created a flat structure like this
    Struc1
    Struc2
    Struc3
    Struc3
    Struc2
    Struc3
    Thanks
    Chris

  • Problem with Color conversion ADM_Color to  AI_Color

    Hello friends,
    I think this is going to be the first post in this "Illustrator SDK Forum".
    I am having problem with 'Setting Art Work Colors'.
    I am trying to get the color value from the user through a ADM dialogue window, using the function
    sADMBasic->ChooseColor();
    The function is returning color in
    ADMRGBColor structure, whose members (
    red, green, blue) are of the type
    'short'.
    Now, I want to print a rectangular box art filled with that 'user selected color'.
    But the color I have with me is in the
    ADMRGBColor(each member of type 'short') and to draw that on a illustrator file, I need the type
    'AIThreeColrStyle'(each member is of the type AIReal).
    I had no idea how to convert
    ADMRGBColor to
    AIThreeColorStyle, but after lots of 'trial and errors', I arrived at this 'crude' solution.
    ADMRGBColor value was in the range
    0-65535 and
    AIThreeColorStyle was in the range
    0-1
    aiPathStyle.fill.color.c.rgb.red = ((float)admColor.red)/65535;
    This conversion was working fine on Windows, but on Mac its giving weird results. Can some one tell me the proper solution for this conversion problem?
    Thanking you,
    Vijoy~
    And thank you Adobe for givig us this "Illustrator SDK Forum".
    Forums Operations "Why there is no SDK forum for Illustrator?" 12/13/04 4:21pm

    The code above seems to work for me. I get the proper values in the rgb fields of the AIPathStyle struct. Are you sure you are filling in the remaining values in the struct (like fillPaint, overprint, etc.) with appropriate values?
    Hope that helps,
    -Frank

  • Fonts problem with Smartforms...

    Hi Gurus,
    I have a problem with fonts in smartforms.
    My smartforms fonts are working fine in testing server but not working fine in development server. We work like after development we transport the object to stage (Testing) & then to production. I see the last modifications done were 1 st may 2008 but in development the last changes are shown 7th July 2008. So what I think is the object is not completely transported to testing server? What could be the other reason please let me know ASAP.
    Thanks,
    Hemal

    Hi Hema,
    May be the reason that your smartsyle is not activated .Jus check whether the smartstyle is activated and transported properly.
    Regards,
    Sravanthi

  • Problems with Quicktime Conversion, FCE2

    I am having problems using quicktime conversion. I want to export a 4 minute sequence into uncompressed AVI.
    Each time i do this i get an almost 4 gb file that is only the first 18 seconds of the sequence. (when i export to WMV I get the same problem, except its 30 seconds)
    I can export using compressed AVIs (such as DV-PAL), but the quality is not too good.
    I am simply trying to get the best quality and most-universally useable file to write out onto a data DVD.
    Any ideas/suggestions anyone?
    I have am using a PowerPC G4 laptop, FCE2, OSX tiger....
    Further problems: when i write this movie out to DVD with iDVD, and when it is in NTSC setting, black white lines appear on top of the black background parts in the movie, rather sporadically. I have written it out 3 or 4 times, and each time the frequency of the lines is different, but each DVD is unusable. In PAL setting this doesnt happen, but of course the quality is diminished, as the orig. footage was taken on an NTSC camera. I am in Europe, so this PAL/NTSC conversion thing is a neverending problem.... Is this an iDVD problem or a problem with my laptop's burner?
    Daniel

    Dear Tom,
    I appreciate you replying to my post, and am sorry for not getting back to you sooner, but i never received an email notification of a reply.
    The Nattress solution seems like a good route - is this compatible with FC Express 2?
    The purpose of this AVI export is to have the highest possible quality file in data form, which the (PC using) client will then be able to write out onto DVD, convert/edit himself, etc. I have written out the self-contained QuicktimeMovie data file for him, but he is unable to open that. When i write out the AVI file, it is over 4 times as big as the QTmovie file and only plays for the first 18 seconds.
    I am exporting to my internal harddrive (laptop).
    The end goal is to get this file eventually onto a PAL-BETA video. This is where the NTSC-PAL conversion problem comes in, and maybe the Nattress program could be the solution (although it initially seems a bit complicated to me).
    Another important part of this problem, is that iDVD writes out the original NTSC file with funny white lines going across the black backgrounds - so I cant write the best quality NTSC video onto DVD properly either. Each time I write it out, the frequency of these white lines is different. I dont know if this is a related problem, a Final Cut Express export problem, an iDVD problem, or a problem with my DVD writer. (I made the movie, exported it self-contained QTmov, imported it into a new file, did some color-correction, and exported the new final version. - maybe the problem stems from within this simple process? ? ? )
    (Regarding the WMV export: this is not so important, lets not deal with this now. I have flip4mac, downloaded free. My experience is that it doesnt really work.)
    So... any ideas or suggestions?
    i appreciate your help,
    Daniel

  • Problem with date conversion

    I have read some topics about it, but still have problem :-(((
    When I insert data, I don't have any problem with a date. It looks like this:
         Statement stmt = con.createStatement();
              stmt.executeUpdate("BEGIN " +
                        "INSERT INTO employee VALUES (" +
                        "employee_t(idnum.nextval,'John','Double'," +
                        "to_date('21.01.1975','DD.MM.YYYY'), 20000))" +
                        "END;"); Now I am trying to update, and get the error:
      String query = "BEGIN UPDATE employee SET " +
    "first_name ='"+getJtxtfldFirst_name().getText()+"', "+
    "last_name = '"+getJtxtfldLast_name().getText()+"', "+
    "date_of_birth = to_date('1982-03-11','YYYY-MM-DD'), "+
                                     "END; ";
    Statement stmt = con.createStatement();
                   int rs = stmt.executeUpdate(query);
                   stmt.close();The error:
    java.sql.SQLException: ORA-06550: line 1, column 149:
    PLS-00338: unable to resolve "DATE_OF_BIRTH" as a column or row expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignoredI have tried different variants, tried to parse... Just can't find where I make the error.
    If I comment this line, with a date, there are no any exceptions.
    This code in sqlplus works fine.

    And besides that, you don't need to wrap your SQL
    with the PL/SQL "BEGIN" and "END" tags; why invoke
    the PL/SQL parser if you're not using any PL/SQL
    features?
    I suspect your underlying problem is that the column
    isn't actually named "date_of_birth".You are quete right. It was my faulf. There was a field date_of_birthday. The oracle could say it more preciesly.
    With the statement it works fine also.
    Thank you for the answer and sorry for disturbing, I have forgotten to update the database and was sure I copied the new files... But updated the old one.

  • Dynamic file name in receiver - empty line problem with content conversion

    Hi,
    I do a variable substitution from a filename node in my xml structure. Because I don't want to have the the filename in my flatfile i supress the output with the conversion parameters:
    filename.fixedLengthTooShortHandling = Cut
    filename.fieldFixedLengths = 0
    It's working but: the adapter is puting an empty line at the end of the file. If I even put the filename node at the top of the xml struture it generates the empty line at the top of the flatfile.
    Anyone has an idea? is there an other way to set the filename or how can I supress this empty line( I have to) ?
    Regrads
    J.

    Jorg,
    Actually speaking we cannot get rid of this with XI. You have to write a OS script to remove this.
    Else
    you add one more parameter as .endSeparator as backspace ie., 0x08. It will definitely remove the line but I think it is putting a square box at the end of previous line. Please check by giving this and let us know the updates.
    Regards,
    ---Satish

  • Aspect ratio problem with Quicktime Conversion from FCE HD 3.5

    I have a FCE 3.5 HDV project (16:9 aspect ratio) which I am trying to export using Quicktime Conversion for eventual web-streaming. I have tried various settings including "maintain aspect ratio" and the "letterbox" options. After every multi-hour attempt, the end result is just what I need, except the aspect ratio is always 4:3 and vertically squeezed.
    What settings should I use for a small to medium sized version of my movie for streaming on a website, but in the correct aspect ratio? I'd prefer a 16:9 Quicktime frame, or at least a 4:3 Quicktime frame with black bars.

    I too have been having some problems, same software. Export to iPod completely ignores the intended aspect ratio and is non-adjustable and squeezes the footage. It looks fine on the canvas but gets messed up on export. A 4:3 video that should be 640x480 ends up being 640x426, and a 16:9 video that should be 640x360 looks to be getting 640x426 as well.
    Currently, my work-around is to export to DV file, then export to iPod. Being a double encoding, it is quite wasteful in terms of time and processing power. Is there something else I can do?

  • Problem with file conversion from version 9.2.2 to version 10.1.0.71

    Hello everyone.
    I have a problem. In my database, i have a lot of artwork done with indesign 9.2.2. Since a while now I upgraded indesign and now I have the latest version 10.1.0.71 but I can't open my indesign artwork made with indesign 9.2.2.
    When I try, a dialog box appear and says : " La conversion a échoué : les données du fichier ne correspondent pas aux données attendues".
    What should I do ?
    Thank you in advance

    Hi,
    Ideally all files created in 9.2.2 should open fine in versions greater than itself.
    Did you happen to have some 3rd party plugin in 9.2.2 which is missing in 10.1 ? That can be one of the reasons for such errors.
    Are the files still opening in version 9.2.2? (assuming you still have 9.2.2)
    If there are no 3rd party plugins involved you can share the file with us at [email protected] and we can have a look and figure out the cause of the problem.
    Regards
    Javed

  • Problem with smartform print preview.

    Hi Experts,
                     i have an rare problem i have requirement of  sending PO smartform mail as pdf ,and the smartform is configued to nace, and the tcode is  me23n.
    we checked it in development server everything went on well,and mail was sent without any error, after moving object to quality,
    we tested in the same process as in development, instead of mail 'Print preview' button was popped up.
    is it something to do  with NACE config or to do with my code ?

    Hi Prakash,
    As Mohit said default printer is not yet set for your user in QAL and on print preview screen output device field is mandatory that is why the pop up for print preview is coming.
    follow path given by Mohit and I think the pop up will not come again.
    Regards,
    Siddhesh Satghare.

  • Problem with Smartform style

    Hi all,
    I created a smartform for barcode labels printing. The form has its own style and characters and paragraphs use a
    custom font (it's a Windows font I uploaded in the system).
    My smartform worked well, but when I newly tested it yesterday, only the barcode and a field were displayed.
    The only difference I noticed is the fact I deleted some custom fonts of mine and, after the deletion, I don't
    tested anymore the smartform until yesterday. In fact if i try to print the fields without any custom style, they
    are displayed in the preview.
    Thanks in advance,
      Francesco

    Problem solved (in a strange way): I had to modify my style by setting the black color for all the paragraphs and characters.
    Usually the color should be black by default, don't you think?
    I have to clarify that in my style there's a paragraph with the white color to give a light and shade effect: I don't know if this could be the cause of my problem.
    Edited by: Francesco Negri on Feb 10, 2011 10:05 AM

  • Problem with Smartform printing

    Hi all,
    I developed Dunning form . its working fine in development system.
    We have problem in production .
    For example , we need to print dunning form for 10 customers means 10 forms need to be print at a time usinf F150.
    Some forms printing fine with all text modules and some forms are not printing text modules.
    i did debug for Fm of smartform .
    In side this Fm , it is calling SSFRT_SYMBOL_VALUE  function module , for printing all text modules.
    Inside FM SSFRT_SYMBOL_VALUE   ,
    we have issue with     assign (l_programsymbol) to <l_symbol>    statement  (Line number 86) .
    Here if <l_symbol> will populate with text module, it is printing text.
    If not , it is not printing .
    Is there any point to know solution
    Thanks & regards,
    JBR

    Thanks

  • Problem with smartforms barcode printing

    Hi,
    In my smartforms i use a simply standard barcode (CD39__00)
    for delivery number; but when i print there is no barcode, there is the dlivery number as number.
    I'm in SAP ECC 6.0 so with the new barcode printing.
    Where is the problem?
    Thanks a lot.
    Matteo

    Hi - Sometimes if the height of bar code is small, then it prints the number instead of barcode. So please try to copy tht barcode into "Z" from se73 transaction and increase the height and then assign the new barcode to ur smartform. Doing this you will be getting the barcode printed on it.
    Thanks
    Arun Kumar
    Ok, i create a new bar code bigger than the first one and now it's printed.
    Thanks lot.
    Matteo Vernile.

  • Problem with SmartForms driver program

    Hello,
    I have the following problem:
    I have created a Smarform that uses a standard text element. In my program, the text in this element is changed depending on the language the user has selected.
    The form is then created and converted to PDF and displayed to the user. The problem I have is that the first time, the PDF is displayed in the correct language. However, when another language is selected the second time, the displayed PDF will still show the first language. After some testing, I found out that the problem most likely lies with the Smartforms function module. It seems that a certain variable is not being reset when it is called the second time, resulting in the same language being shown. Perhaps there's some variable in the control_parameters that I didn't set?
    In any case, this is the code of the driver program:
    DATA: fm_name TYPE rs38l_fnam.
      DATA: output_options TYPE ssfcompop,
            control_parameters TYPE ssfctrlop,
            job_output_info TYPE ssfcrescl.
    * Get function module name for SmartForm
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = 'ZHR_ADVERTISEMENT'
        IMPORTING
          fm_name  = fm_name.
    * SmartForm settings
      control_parameters-getotf = 'X'.
      control_parameters-no_dialog = 'X'.
      output_options-tdnoprev = 'X'.
    * Execute SmartForm
      CALL FUNCTION fm_name
        EXPORTING
          control_parameters = control_parameters
          output_options     = output_options
        IMPORTING
          job_output_info    = job_output_info
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
    * Display PDF
      CALL FUNCTION 'HR_EFI_SHOW_PDF_FORM'
        TABLES
          otf_table = job_output_info-otfdata.
    Thanks in advance!
    Dave

    Hi,
    Check the below code and see if ur missing something
    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.

Maybe you are looking for

  • Older versions of itunes.

    Where can i find an older version of itunes? I think my "older" computer may not be compatible with itunes8. An older version my resolve the issue as I have tried all the "fixes" listed in support.

  • Smart mailbox

    I would like to use a smart mail box to gather all email to and from a particular person but I can't seem to do that as it asked for too much info to make this happen. Is it possible to do this or do I have to do it manually by say searching and movi

  • How I can start my career in BI

    Hi frnds, Currently I am working as a PL SQL developer.It is a kind of IFS ERP related support.Already we are doing Quick report all those things..How I can start learning this OBIEE I have more interest on that....any specific website is there for l

  • Why does the Flash player update push me to install McAfee Security Scan Plus?

    When Flash asks me if I want to update, it takes me to an Adobe page to update it, but there is a checkbox already checked to install McAfee Security Scan Plus. I already have an anti-virus program installed. Why does the flash update page assume tha

  • Several issues after last update 10.1.0.273

    Facebook is not working anymore. Slow navigation on BlackBerry device. Rabobank App needs to be registered again, so many issues. And not to forget the really anoing info popup saving email is on the left and apps are still open on the left. Can this