How to display the data in PDF format : problem is splitting into 2 lines

Hi ,
I developed one report which downloads the data into PDF format and saved in C drive but my problem is
in my program : Line size of the report is 255 in PDF it is splitting into 2 lines. it has to show in a single line. how to do it. how to reduce the width of the output? i am sending my code below. anybody can suggest me how to do it. if possible please send me the code.
my code:
report zmaheedhar.
maheedhar-start
TABLES : vbak.
parameters : p_vbeln type vbak-vbeln.
data : begin of itab occurs 0,
        vbeln type vbak-vbeln,
        ERDAT type vbak-erdat,
        ERZET type vbak-erzet,
        ERNAM type vbak-ernam,
        ANGDT type vbak-angdt,
        BNDDT type vbak-bnddt,
        AUDAT type vbak-audat,
        VBTYP type vbak-vbtyp,
        TRVOG type vbak-trvog,
        AUART type vbak-auart,
        AUGRU type vbak-augru,
        GWLDT type vbak-gwldt,
        SUBMI type vbak-submi,
        LIFSK type vbak-lifsk,
        FAKSK type vbak-faksk,
        NETWR type vbak-netwr,
        WAERK type vbak-waerk,
        VKORG type vbak-vkorg,
       end of itab.
maheedhar-end
DATA: pripar TYPE pri_params,
      arcpar TYPE arc_params,
      lay TYPE pri_params-paart,
      lines TYPE pri_params-linct,
      rows TYPE pri_params-linsz.
DATA: val(1), val1(1).
*---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
DATA: name TYPE pri_params-plist VALUE 'Testing'.
DATA: i_pdf TYPE STANDARD TABLE OF tline.
DATA: spono TYPE tsp01-rqident.
maheedhar-start
top-of-page.
write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
       'Date','Document Date','SD document category','Transaction group','Sales Document Type',
       'Order reason'.
start-OF-SELECTION.
      select vbeln  ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
              VBTYP  TRVOG AUART AUGRU GWLDT SUBMI LIFSK
              FAKSK  NETWR WAERK VKORG from vbak
        into table itab
        where vbeln = p_vbeln.
maheedhar-end
--- Retreive local printer details
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    destination            = dest
    no_dialog              = 'X'
    immediately            = ' '
  IMPORTING
    out_archive_parameters = arcpar
    out_parameters         = pripar
    valid                  = val
    valid_for_spool_creation = val1
  EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params   = 2
    invalid_archive_params = 3
    OTHERS                 = 4.
IF sy-subrc NE 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-- Set Spool printer details w.r.t local printer
pripar-prdsn = 'DSN'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    in_archive_parameters    = arcpar
    in_parameters            = pripar
    no_dialog                = 'X'
    list_name                = name
  IMPORTING
    out_archive_parameters   = arcpar
    out_parameters           = pripar
    valid                    = val
    valid_for_spool_creation = val1
  EXCEPTIONS
    archive_info_not_found   = 1
    invalid_print_params     = 2
    invalid_archive_params   = 3
    OTHERS                   = 4.
IF sy-subrc EQ 0.
---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
  NEW-PAGE PRINT ON
  NEW-SECTION
  PARAMETERS pripar
  ARCHIVE PARAMETERS arcpar
  NO DIALOG.
ELSE.
  WRITE:/ 'Unable to create spool'.
ENDIF.
*--- Output statements
*WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
*WRITE:/ 'Second Line'.
LOOP at itab.
write: itab-vbeln,
        itab-ERDAT,
        itab-ERZET,
        itab-ERNAM,
        itab-ANGDT,
        itab-BNDDT,
        itab-AUDAT,
        itab-VBTYP.
ENDLOOP.
"---> Close spool
NEW-PAGE PRINT OFF.
spono = sy-spono.
Convert ABAP Spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
  EXPORTING
    src_spoolid                    = spono
    no_dialog                      = 'X'
TABLES
   pdf                            = i_pdf
EXCEPTIONS
   err_no_abap_spooljob           = 1
   err_no_spooljob                = 2
   err_no_permission              = 3
   err_conv_not_possible          = 4
   err_bad_destdevice             = 5
   user_cancelled                 = 6
   err_spoolerror                 = 7
   err_temseerror                 = 8
   err_btcjob_open_failed         = 9
   err_btcjob_submit_failed       = 10
   err_btcjob_close_failed        = 11
   OTHERS                         = 12.
Download PDF contents to presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename                        = 'c:\test.pdf'
    filetype                        = 'BIN'
  TABLES
    data_tab                        = i_pdf
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.
thanks,
maheedhar

hi tripat,
actual problem is what u said it is decreased the wiidht of the output.
now the output is:
Sales Document C Date Entry time Created By Quotation date Date Document Date
SD document category Transaction group Sales Document Type Order reason
62741 07/29/1996 11:54:38 DARLENE 00/00/0000 00/00/0000 07/29/1996 C
actual output is:
output should come in a single line. it is splitting into 2 lines.
thanks,
maheedhar

Similar Messages

  • How to display the data in PDF format

    hi all,
    i will give input in my selection screen and i will execute my report then it has to display data in PDF file in some directory (like c or d directory). i refered existingthreads . most of then saying using spool req we can download pdf file i.e. not my requirement. my requirement is when i click on execute button it has to display the data in pdf file with headings.
    Anybody can send me the sample code please.
    thanks,
    maheedhar

    Hi Easwar,
    i am sending my code. in this one records is splitting into 2 records.
    report zmaheedhar.
    maheedhar-start
    TABLES : vbak.
    parameters : p_vbeln type vbak-vbeln.
    data : begin of itab occurs 0,
            vbeln type vbak-vbeln,
            ERDAT type vbak-erdat,
            ERZET type vbak-erzet,
            ERNAM type vbak-ernam,
            ANGDT type vbak-angdt,
            BNDDT type vbak-bnddt,
            AUDAT type vbak-audat,
            VBTYP type vbak-vbtyp,
            TRVOG type vbak-trvog,
            AUART type vbak-auart,
            AUGRU type vbak-augru,
            GWLDT type vbak-gwldt,
            SUBMI type vbak-submi,
            LIFSK type vbak-lifsk,
            FAKSK type vbak-faksk,
            NETWR type vbak-netwr,
            WAERK type vbak-waerk,
            VKORG type vbak-vkorg,
           end of itab.
    maheedhar-end
    DATA: pripar TYPE pri_params,
          arcpar TYPE arc_params,
          lay TYPE pri_params-paart,
          lines TYPE pri_params-linct,
          rows TYPE pri_params-linsz.
    DATA: val(1), val1(1).
    *---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
    DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
    DATA: name TYPE pri_params-plist VALUE 'Testing'.
    DATA: i_pdf TYPE STANDARD TABLE OF tline.
    DATA: spono TYPE tsp01-rqident.
    maheedhar-start
    top-of-page.
    write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
           'Date','Document Date','SD document category','Transaction group','Sales Document Type',
           'Order reason'.
    start-OF-SELECTION.
          select vbeln  ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
                  VBTYP  TRVOG AUART AUGRU GWLDT SUBMI LIFSK
                  FAKSK  NETWR WAERK VKORG from vbak
            into table itab
            where vbeln = p_vbeln.
    maheedhar-end
    --- Retreive local printer details
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = dest
        no_dialog              = 'X'
        immediately            = ' '
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- Set Spool printer details w.r.t local printer
    pripar-prdsn = 'DSN'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_archive_parameters    = arcpar
        in_parameters            = pripar
        no_dialog                = 'X'
        list_name                = name
      IMPORTING
        out_archive_parameters   = arcpar
        out_parameters           = pripar
        valid                    = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found   = 1
        invalid_print_params     = 2
        invalid_archive_params   = 3
        OTHERS                   = 4.
    IF sy-subrc EQ 0.
    ---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
      NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS pripar
      ARCHIVE PARAMETERS arcpar
      NO DIALOG.
    ELSE.
      WRITE:/ 'Unable to create spool'.
    ENDIF.
    *--- Output statements
    *WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
    *WRITE:/ 'Second Line'.
    LOOP at itab.
    write: itab-vbeln,
            itab-ERDAT,
            itab-ERZET,
            itab-ERNAM,
            itab-ANGDT,
            itab-BNDDT,
            itab-AUDAT,
            itab-VBTYP.
    ENDLOOP.
    "---> Close spool
    NEW-PAGE PRINT OFF.
    spono = sy-spono.
    Convert ABAP Spool to PDF
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid                    = spono
        no_dialog                      = 'X'
    TABLES
       pdf                            = i_pdf
    EXCEPTIONS
       err_no_abap_spooljob           = 1
       err_no_spooljob                = 2
       err_no_permission              = 3
       err_conv_not_possible          = 4
       err_bad_destdevice             = 5
       user_cancelled                 = 6
       err_spoolerror                 = 7
       err_temseerror                 = 8
       err_btcjob_open_failed         = 9
       err_btcjob_submit_failed       = 10
       err_btcjob_close_failed        = 11
       OTHERS                         = 12.
    Download PDF contents to presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\test.pdf'
        filetype                        = 'BIN'
      TABLES
        data_tab                        = i_pdf
    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.
    thanks,
    maheedhar

  • How to display the data in XML files into JSP using Jdeveloper.

    Hi All,
    I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
    Are there any reference documents, regarding the above process please can anyone guide through how to do it.

    Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.

  • How to send the output to PDF format in reports 6i?

    Hi,
    How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
    DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
    Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
    Thanks
    Kavitha

    Hello,
    Do you get this problem only for DESFORMAT=PDF ?
    Test with :
    DESFORMAT = RTF, DESNAME = C:\x.rtf
    or
    DESFORMAT = HTMLCSS, DESNAME = C:\x.html
    does it work ?
    Check if DESNAME is modified in the reports itself.
    Regards

  • How to display the data of CJ2C(T-CODE) using web dynpro abap

    Hi all:
        How to display the data of CJ2C(T-CODE) using web dynpro abap.
        CJ2C used to display a Gantt Chart.
        Thanks.

    Hi,
    Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
    On action place the code and Deploy the application
    byte[] bytes = new byte[ 1024];
    FileOutputStream out = new FileOutputStream( new File( <path in server>));
    InputStream in = resource.read( true);
    int len;
    while( ( len = in.read( bytes)) > 0)
         out.write( bytes, 0, len);
    in.close();
    out.close();
    Regards
         Vinod V

  • How to arrange the data in vertical format?

    Hi All,
    I am working on BI answer.Can it be possible to arrange data in vertical format?
    Actually, when we select fields , then they got arranged horizontally.
    Like :
    Customer ID | Customer Name
    But i need to display the data in vertical format like :
    Customer ID
    Customer Name
    Is it possible while displaying data? Pls help me.
    Thanks

    Use
    Customer_ID||'Less than Symbol br Greater Than Symbol'||Customer_Name
    in the Answers Formula column and change the data format to HTML. That will print the Customer ID and Customer Name one below the other.
    HTML is not allowed in the forum. So, change the Less than and Greater than Symbols above to the actual symbols while entering the formula.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How to display the data from database(MS access) to a textbox

    anyone know ?

    how to display the data from database(MS access) to a
    textboxThe reply hasn't changed over these years. Read the tuutorial on how to fetch the data. You can display it anywhere you feel like. :)
    http://java.sun.com/docs/books/tutorial/jdbc/

  • How to import the data in a .xls or .xlsx file into a oracle database table

    Hi,
    Please tell me how to import the data in a .xls or .xlsx file into a oracle database table in Oracle 10gR2 using Oracle Warehouse Builder 10gR2.

    ....can we do something through Non-Oracle->ODBC?Yes, it is possible, look at this thread
    [SQLServer access from AIX Warehouse builder|http://forums.oracle.com/forums/thread.jspa?messageID=2502982]
    If your server (with target DB and OWB runtime) is on Windows OS this configuration will be simpler - you can use single server.
    And additional link on OWB blog (with 11g transparent gateway)
    [http://blogs.oracle.com/warehousebuilder/2008/01/11g_heterogeneous_agent.html]
    (configuring nonoracle connection with 10g generic connectivity very similar to 11g gateway)
    Also look at
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358
    Regards,
    Oleg

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to display the Data labels in Chartobject Dynamically?

    Hi
    i am using Crystal Report Server XI R2 -  ReportClientDocument to generate reports dynamically.
    i want to display the data labels on the chart object in runtime. how it is possible?
    is there any way to achieve this? since it is possible in designer, i hope that there must be WAY.....
    Regards,
    Padmanaban V

    The chart analyzer is a third party tool that Crystal is licensed to use in the designer. That means in the Crystal Designer you have a lot of chart functionality, but at runtime the chart exists as part of the report object and the analyzer is not present. Therefore you have a few formatting options but not as many as in the designer.
    For details of what options you have with the chart at runtime, see these links:
    [1|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crlrfCrystalDecisionsCrystalReportsEngineChartObject_MembersTopic.htm]
    [2|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crlrfCrystalDecisionsCrystalReportsEngineChartObject_PropertiesTopic.htm]
    [3|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crlrfCrystalDecisionsCrystalReportsEngineChartObjectClassTopic.htm]
    Ludek

  • How to set the Date and Currency Formats Based on Country

    Hi Friends,
    I am designing the one Global Form it will use for all countries.
    in that Form i want to print the date and currnecy Formats based on country.
    Like
    For US i want print the date and Currency Like This.
    Date -  MM/DD/YYYY
    Curremcy - XX,XXX,XX.XX
    For DE i want print the date and Currency Like This.
    Date -  DD.MM.YYYY
    Curremcy - XX.XXX.XX,XX
    Please suggest how i can control these things through Java Script or Formcalc....

    Hi Nitin,
    thanks For ur reply,
    i tried with this solution,
    But it is displaying the default Format like bellow formats.
    For short - mm/dd/yy
    For Medium - mmm dd , yyyy
    For Long     - thursday ,mmm dd , yyyy
    it was prinitng in above mentioned format,
    but here i want to print my own format for USA like MM/DD/YYYY.

  • Camileo S20 - How to display the date and time

    Hi, to all. I have got as Christmas present the Camileo S20 and I am not able to display the date and time at video. In manual is no mention about this, just how to set the correct date and time. But what is intention of setting the date and time into camera, if it is not possible to display them on video ?

    Hi,
    of course, I did it repeatly, it is written in my question above. I am not stupid.
    This question is aimed to owners of camera Camileo S20 and also Camileo S10 - Camileo S20 is derived of Camileo S10, may be any of them discovered the way how to get the date and time into video.

  • How to set the date and time format from Windows Server 2008 R2

    Hi,
    I want to control my client's date and time format as dd/mm/yyyy format and I need to do it using the windows server 2008 R2. How can I achieve this goal?
    Yoshika04

    Hi,
    In Windows Server 2008 R2, you can use Regional Options Extension in Group Policy Preferences to configure the date and
    time format. For more information, please refer to:
    Regional Options Extension
    http://technet.microsoft.com/en-us/library/cc754496.aspx
    Regards,
    Bruce

  • How to display the data according to the search criteria

    Hi ,
    I want to display the order data in my application.
    I have certain search criteria in my application like
    ordernumber , date etc.
    If I click the submit button without giving any criteria , all the data is getting displayed properly in the table.
    But,If I want to display the data according to the order number, all the orders present are getting displayed , but actually it should display the order only for that particular order number.
    The code is  like : onActionSearch()
    wdThis.wdComponentController().executeGetlist_Input();
    Can any one tell me how to display the orders depending upon the search criteria.
    Ideas & suggestions are truely welcome.
    Thanks & Regards
    Neha Mahanty

    Hi Neha,
    Design ur RFC in such a way that it should display the result according to your search criteria.
    If you are making a search on "Order Number" pass some input(search criteria along with some parameter, if order number is not null then pass "X" as parameter) to RFC so that it will return the result accordingly. And same with date also.
    Thanks n Regards,
    Jhansi Miryala

  • How to display the data in row wise in smartform

    Hi,
        I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the  
        column wise. Actually there is a text which i want to display the data row wise.
        It is possible to display the data in row wise of the text .
    Edited by: nav009 on Oct 8, 2009 10:39 AM

    Hello ,
    I  assume that your requiremen is related to smartform.the below is the solution i suggest.
    As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
    However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
    Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
    I assume you are aware of creating of line types for table.
    Thanks
    M.Naveen.

Maybe you are looking for

  • Find button on toolbar won't search current page

    Post Author: sarasew13 CA Forum: .NET I'm having an issue with the Find button on the standard report viewer toolbar for ASP.  When I enter a search term and click on find, it starts searching on the next page even though there are entries (several)

  • Creation of virtual outbound delivery from MIGO.

    Hi All, Scenario - Material, packing material, virtual Goods receipt and virtual outbound delivery and PGI, and final billing. We have a scenario wherein we have a Sales Scheduling Agreement for a material is created. The requirement will be generate

  • Start Up in Safe Mode - Empty Trash Afterwards?

    Hi! Did a Retrospect clone backup. Started up in Safe Mode to stop indexing before backup. Per an article I found throgh Dr. Smoke: "Starting up in safe Mode moves to the Trash all font caches normally stored in /Library/Caches/com.apple.ATS/(uid)/ ,

  • Is Adobe Acrobat 7.0 Professional compatible with Windows 7?

    I've ordered Acrobat XI Pro, but it may be a week or two before I receive it.  I need to make some pdf files from WordPerfect files and I already have Acrobat 7.0 Pro.  I was hoping to be able to use the 7.0 until I receive the version XI.

  • Misplaced Auditable Attributes in Downloaded Report

    I have a custom audit step that has an auditable attribute. When I run the report and click on the link to see the details, the auditable attribute is displayed correctly. However, when I download the report to csv or pdf, the auditable attribute is