Need help in downloading SMARTFORM

I need to download my smartform @ presetation server as a PDF format,
I have written following code for that:
DATA: lv_filename   TYPE string,
      lv_binfile    TYPE i,
      lv_datab      TYPE STANDARD TABLE OF itcoo,
      lv_pdftab     TYPE STANDARD TABLE OF tline.
CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      format                = 'PDF'
      max_linewidth         = 132
    IMPORTING
      bin_filesize          = lv_binfile
    TABLES
      otf                     = lv_datab
      lines                 = lv_pdftab
    EXCEPTIONS
      err_max_linewidth     = 1
      err_format            = 2
      err_conv_not_possible = 3
      err_bad_otf           = 4
      OTHERS                = 5.
  IF sy-subrc <> 0.
      ENDIF.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = lv_filename
      filetype                = 'BIN'
*      write_field_separator   = 'X'
*      confirm_overwrite       = 'X'
    TABLES
      data_tab                = lv_pdftab  .
With this I am able to download a PDF file with no data and error "OTF end command // missing in OTF data" .
>>Please let me know why this is not working
Please debug & you will find it yourself. Don't expect others to do your Job
Edited by: Suresh Datti on Aug 31, 2009 12:28 PM

Hi,
Try this code,
{'code'}tables : kna1,VBAK.
data : t_kna1 type kna1 occurs 1,
       t_itab type kna1 occurs 1,
       t_vbak type vbak occurs 1,
       t_vbap type vbap occurs 1,
       w_kna1 type kna1,
       w_itab type kna1,
       w_vbak type vbak,
       w_vbap type vbap.
select-options : s_custno for kna1-kunnr.
data :cs type ssfctrlop.
cs-no_open = 'x'.
cs-no_close = 'x'.
select * from vbak into table t_vbak
          where kunnr in s_custno.
if sy-subrc = 0.
  message s001(ztest_msg).
endif.
sort t_vbak by kunnr vbeln.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
  ARCHIVE_PARAMETERS       =
  USER_SETTINGS            = 'X'
  MAIL_SENDER              =
  MAIL_RECIPIENT           =
  MAIL_APPL_OBJ            =
  OUTPUT_OPTIONS           =
  CONTROL_PARAMETERS       =
IMPORTING
  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.
ENDIF.
loop at t_vbak into w_vbak.
  select * from kna1 into table t_kna1
            where kunnr = w_vbak-kunnr.
  sort t_kna1 by kunnr.
  select * from vbap into table t_vbap
             where vbeln = w_vbak-vbeln.
  sort t_vbap by vbeln posnr.
  loop at t_kna1 into w_kna1.
    w_itab-kunnr = w_kna1-kunnr.
    w_itab-name1 = w_kna1-name1.
  endloop.
  CALL FUNCTION '/1BCDWB/SF00000215'     " this is the FM from smartform
    EXPORTING
   ARCHIVE_INDEX              =
   ARCHIVE_INDEX_TAB          =
   ARCHIVE_PARAMETERS         =
     CONTROL_PARAMETERS         = cs
   MAIL_APPL_OBJ              =
   MAIL_RECIPIENT             =
   MAIL_SENDER                =
   OUTPUT_OPTIONS             =
   USER_SETTINGS              = 'X'
      W_KNA1                     = w_itab
      W_VBAK                     = w_vbak
IMPORTING
   DOCUMENT_OUTPUT_INFO       =
   JOB_OUTPUT_INFO            = JOI
   JOB_OUTPUT_OPTIONS         =
    TABLES
      T_VBAP                     = t_vbap
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.
endloop.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
  JOB_OUTPUT_INFO        =
EXCEPTIONS
  FORMATTING_ERROR       = 1
  INTERNAL_ERROR         = 2
  SEND_ERROR             = 3
  OTHERS                 = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.{'code'}
Regards,
Vijay
Edited by: vijay kumar pamulapati on Aug 31, 2009 12:21 PM
Edited by: vijay kumar pamulapati on Aug 31, 2009 12:24 PM

Similar Messages

  • I need help in downloading and installing a previously purchased version of Photoshop Elements 12: AD012822594 1057-0247-4177-3303-6451-8067  or   1057-0904-6949-7119-8323-9165

    I need help in downloading and installing a previously purchased version of Photoshop Elements 12: AD012822594 1057-0247-4177-3303-6451-8067  or   1057-0904-6949-7119-8323-9165

    Please do not share serial numbers  or Order numbers on Forums . Serial numbers and order numbers  are very confidential.
    You can only share serial number with Adobe Customer support staff.

  • I need help in downloading and installing a previously purchased version of Photoshop Elements 12: Serial number removed by moderator

    I need help in downloading and installing a previously purchased version of Photoshop Elements 12: <Serial number removed by moderator>

    Hi There,
    Kindly try: Troubleshoot installation | Photoshop Elements, Premiere Elements | Windows
    Thanks,
    Atul Saini

  • Need help in downloading current Adobe Reader version!

    Need help in downloading and installing the current Adobe Reader version! I am running Windows Vista. I receive an error message that the current version is trying to update version 8.1. During the install efforts, the program locks up @ the 96% complete. Any ideas?

    Use the Acrobat Cleaner Tool to remove the current version: http://labs.adobe.com/downloads/acrobatcleaner.html
    The download and run the installer from http://get.adobe.com/reader/enterprise/

  • I need help in downloading lr5 as a free trial. Currently I have lr4

    i need help in downloading lr5 as a free trial. Currently I have lr4

    Thanks for quick response.  Firstly, let me say that I am not computer savvy.
    I have Lr4 which does not open my raw file from a D4s (on loan).  So I thought, its about time that I subscribe to Lr5 and CS6 via CC.  Adobe is checking my educational credential.
    Meanwhile, an idea came to me about a freetrial whilst I wait for them to check me out!  Secondly, can you convert these files to DNG in Lr4.  I tried but does not work for me.
    Hope you understand my problem/question.

  • I need help in Downloading Adobe Elements for my Mac & Adobe Acrobat for my laptop...I have been battling for the last day.

    I need help in Downloading Adobe Elements for my Mac & Adobe Acrobat for my laptop...I have been battling for the last day.

    ~graffiti wrote:
    PjonesCET wrote:
    I know if you attempt to download and exe file to Mac from a Mac Partition you'll get something like. Cannot not understand file format octet-stream. This means it does not recognize MS execute files.
    Not necesarily. I've done it a few times.
    PjonesCET wrote:
    I'm not sure you can download a PC copy of Acrobat 9 unless you operating from bootcamp or other such application and running the PC partition.
    Yes. You can.
    I've learned something. New. This must be recently changed. That last time I clicked on a Link I though was a dmg file and turned out it was and exe file my Macs wouldn't allow me to do so. But haven't tried recently everytime and exe file comes up I cancel. I gues I am used to the time everytime a Virus or some other nasty was downloaded it was packaged in and exe file and Macs owuldn't allow it. I suppose with the INtel guts now they can no longer refuse to download.

  • I need help in downloading my ringtones

    I need help in downloading my ringtones back to my phone from itunes

    ~graffiti wrote:
    PjonesCET wrote:
    I know if you attempt to download and exe file to Mac from a Mac Partition you'll get something like. Cannot not understand file format octet-stream. This means it does not recognize MS execute files.
    Not necesarily. I've done it a few times.
    PjonesCET wrote:
    I'm not sure you can download a PC copy of Acrobat 9 unless you operating from bootcamp or other such application and running the PC partition.
    Yes. You can.
    I've learned something. New. This must be recently changed. That last time I clicked on a Link I though was a dmg file and turned out it was and exe file my Macs wouldn't allow me to do so. But haven't tried recently everytime and exe file comes up I cancel. I gues I am used to the time everytime a Virus or some other nasty was downloaded it was packaged in and exe file and Macs owuldn't allow it. I suppose with the INtel guts now they can no longer refuse to download.

  • Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Wowowowow I was told I can get any app from the net and it will work thank

  • Excuse me, i truly need help, I downloaded the Muse CC trial, & my scroll motion tab is missing

    excuse me, i truly need help, I downloaded the Muse CC trial, & my scroll motion tab is missing

    Hi,
    Please open Muse > Go to Window at the top > Check " Scroll effects". The scroll effect tab will appear in the right side panel.
    Cheers!
    Aish

  • Need Help With Download For Airport Express

    Ok, computer dummy here needing help with airport express. We were given airport express last night from a friend who recently purchased a newer gadget. He told us we would need to come here to download the operating system. I see lots of links to updates but no links for someone like me who has never had anything like this on my computer before. Does anyone know what link I would need to use? We have a pc with windows XP. Thanks so much for your help!

    Hello jesschambers. Welcome to the Apple Discussions!
    The AirPort Express Base Station (AX) doesn't have an "operating system" per se, but it does have built-in firmware which pretty much is the same thing. In addition, in order to administer the AX, you will need the AirPort Admin Utility for your Windows PC.
    Here are the links for the latest versions of both:
    o AirPort Express Firmware Update 6.3 for Windows
    o AirPort 4.2 for Windows

  • I need help on downloading adobe flash player. It keeps telling me it is installed but it is not.

    I need help downloading Adobe Flash Player and Java Script. It keeps telling me it is installed but it is not.

    Please follow the trouibleshooting steps mentioned in the doc : http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html

  • HT4743 I need help in downloading a cd on to my Mac

    I need help downloading a cd onto my mac

    Does your iMax have a CD/DVD drive?
    If so just open iTunes and insert the CD and it should ask you if you want to import.
    AC

  • Need help to download my product; Adobe Photoshop CS6 Extended, bought in a shop in Norway

    need helpt to download my product. Adobe Photoshop CS6 Ectended, bought in a shop in Norway, got eligibility accepted and serialnumber of 24 number in a mail . Not able to find downloads and the number is not accepted for r...card.

    if you follow all 7 steps, you can dl a trial via one of the links on this page:  http://prodesigntools.com/adobe-cs6-direct-download-links.html
    and activate with your serial number.
    if you have a dl problem, you didn't follow all 7 steps.  typically, failure to meticulously follow steps 1,2 and/or 3 is the problem.  also, your browser needs to accept cookies for the prodesigntools.com links to work.

  • Need help to download csv file in application by writting to outputstream.

    HI All,
    Requirment of my client is donloading CSV file from portal.
    My approach  is:
    On clicking "Download" button in JSP I am calling an action in controller and from here I am redirecting call to DownloadCSV.jsp where i am writing to output stream of response.
    Action called in controller:
         @Jpf.Action(forwards = { @Jpf.Forward(name = StaticConstants.SUCCESS, redirect = true, path = "DownloadCSV.jsp") })
         public Forward gotoReports() {
              Forward forward = new Forward(StaticConstants.SUCCESS);
              return forward;
    Download jsp:
    response.resetBuffer();
         response.reset();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Content-Disposition", "attachment;filename="+ companyId +"_Audit_Report.csv");
         ServletOutputStream os = response.getOutputStream();
              os .println();
              os .print("DATE");
              os .print("USER");
    os .println();
    os.flush();
    os.close();
    I am able to download the csv file in excel. But after that i am not able to perform any operation in portal page. Mouser pointer becomes busy and cant click on anything.
    Second approach followed:
    I wrote the code for writting to outputstream of outputresponse in controller action itself and forwarded to the same jsp where my download button resides.
    Problem:
    Download happens perfectly but the excel in csv format contains the portal framework generated content also other than content i wrote to response.
    If u have any other approach to download an excel without redirecting to JSP plz let me know. Coing is being done in 10.2 weblogic portal.
    Please help. Its very urgent.
    Plz let me know how a file can be downloded in portal context without keeping a file at server side. I need to download file by writting to outputstream.
    If it is possible plz attach one small example project also.
    Thanks a ton in advance.
    It is very important plz do reply.

    Hi Srinivas,
    For downloading binary content that is not text/html, the Oracle WebLogic Portal content management tools use javascript in an onclick event handler to set the window URL to the URL of a download pageflow controller: window.location = url. The content management tools are in a portal so it should be possible for you to do the same thing.
    The url is a custom pageflow controller that streams the bytes to the response. It sounds like you already have a pageflow you could recycle to use in that way. You don't want to stay within your portlet pageflow because then you will be streaming bytes into the middle of a portal response. You want a separate download pageflow that you invoke directly, outside of the portal framework (in other words, don't invoke it by rendering a portlet that invokes the pageflow).
    You can set the url to invoke the pageflow directly by giving the path to the pageflow controller from the web root (remember the pageflow path matches the package name of the pageflow controller class) like this: "/content/node/nodeSelected/download/DownloadContentController.jpf"
    By the way, for the case of text/html, the tools uses a standalone portlet URL so that the text/html is not rendered in the browser window, which would replace the portal markup (because the browser renders text/html by default, instead of giving you a download widget or opening some other application to deal with the bytes).

  • Need helping tracking downloads

    Hi everyone!
    First off I'm a complete noobie when it comes to podcasting... I've had a podcast for over a year, however, I do not know anything about coding. I use a 3rd party app called Feeder to help me with my feeds.
    I have a podcast in iTunes (http://itunes.apple.com/us/podcast/aural-pleasures/id398501156) but originally started off with people subscribing via my website (http://www.auralpleasuresmusic.com). The website was linked to FeedBurner (took me a long time to get that to work, but I somehow did over a year ago... March 2009 to be exact). The FeedBurner link is itpc://feeds.feedburner.com/auralpleasurespodcast. The actual feeds to the podcast are http://idisk.me.com/keith_bowden/Public/AuralPleasures.xml (main feed) and http://idisk.me.com/keith_bowden/Public/KeithsPodcast.xml (which re-directs to the AuralPleasures.xml).
    FeedBurner has allowed me to track downloads via people that clicked on the link on my website, but now I have no idea how to track download statistics from people that are subscribing via iTunes Music Store. Can someone please help me with that part?
    Any and all help would be greatly appreciated! I hope I'm explaining myself properly and sharing the correct info you need to help... if I'm not, please tell me what other information you need and I'll post ASAP.
    Cheers,
    Keith

    iTunes is using your feed at
    http://idisk.me.com/keith_bowden/Public/AuralPleasures.xml
    The other feed contains the redirect tag and if it's more than about two weeks since you placed it there you can remove this feed as no longer necessary (the extra delay is for the benefit of subscribers, to redirect their own iTunes applications).
    iTunes does not provide any sort of statistics. Whether it's possible to get the statistics from your server depends on whether it can offer the required facilities. This Apple Tech note briefly explains a method of doing this, and I'm afraid that as it's outside my experience I can't comment further on it.
    Feedburner may be able to provide statistics, though you would need to confirm this with them before proceeding. You would need to submit your feed to them; they would then make their own version of it (adding quite a lot of muck in the process, most of which shouldn't be a problem as iTunes will ignore it). You would then need to go through the redirect process again to redirect iTunes to the Feedburner feed.
    You should be aware that in doing this you lose control of your feed, and it's entirely possibly that should you ever want to redirect iTunes away from the Feedburner version you won't be able to.

Maybe you are looking for

  • Issue while creating Outbound Delivery using Standard BAPI

    Hi all, I am trying to create an outbound delivery for a Sales order using the Standard BAPI - BAPI_OUTB_DELIVERY_CREATE_SLS. After giving the valid inputs for Sales order no and doc no, am getting an error as "No instance of object type OutboundDeli

  • Set iCloud as the Personal folder in Outlook

    Is it possible to set iCloud as the Personal folder in Outlook? It would be a lot easier to use if so!!

  • How to pass parameters to a SQL query or Data template

    Hi, The requirement is that my final report will take 'date' as input from the user and print only those records which have date later than the user-supplied 'date'. ('Date' is a field in the database). I know the way to achieve this is to use user-d

  • Drawing with mouse

    Hi everybody, I'm making a drawing application, everythings looks and works ok, except for one thing... My mouse cursor is hidden and a paintbrush like cursor follows it. This cursor is a movieclip, because the user chooses a color, and the tip of th

  • Deploying web applications

    Hi to all, I am a new Coldfusion developer coming from Java EE world. I am looking for hints on how to manage the deployment lifecycle of a CF website. Instead of direct editing (with Dreamweaver) cfml files on server, what are the best practices? I