How to generate classical report

Hi guys,
            I need a help from you. how to generate classical report can you guide me please.
Thanks guys.

Vijay,
To generate a report, follow the steps below
1) Determine the desired output for End-user
2) Based on the desired output, write a program with data declarations for all the variales u will display in the report
3) Write extraction routines to fetch data from the DB tables
4) Read extracted data and bind the data for final output
5) Output data
here's a simple example for your ref
report ztest.
Table declaration
data: it_mara type table of mara with header line.
SELECTION SCREEN
parameters: p_matnr like mara-matnr.
start-of-selection.
select * from mara into table it_mara where matnr = p_matnr.
end-of-selection.
loop at it_mara.
  write: it_mara-matnr, it_mara-mtart, it_mara-mbrsh.
endloop.
reward if helpful,
Karthik
Message was edited by:
        Karthik

Similar Messages

  • How to generate a report direct in PDF with oracle developer 6i

    hi all
    Please help me about this issue.
    THAT How to generate a report directly in PDF using oracle developer 6i.
    Regards
    Yousuf Ahmed Siddiqui

    Hi,
    You can create the Report directly in PDF by setting some of the Report Parameters
    i.e. DESTYPE, DESNAME AND DESFORMAT as follows before calling the Report.
    DECLARE
         PL_ID          PARAMLIST;
         PL_NAME     VARCHAR2(10) := 'param_list';
    BEGIN     
         PL_ID := GET_PARAMETER_LIST (PL_NAME);
         IF NOT ID_NULL (PL_ID) THEN
                  Destroy_Parameter_List(PL_ID);
         END IF;
         PL_ID := Create_Parameter_List(PL_NAME);
         Add_Parameter (PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         Add_Parameter (PL_ID, 'DESNAME', TEXT_PARAMETER, 'c:\test.pdf');
         Add_Parameter (PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
            RUN_PRODUCT (REPORTS, 'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
    END;Hope this helps.
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 22, 2010 9:24 AM

  • How to generate interactive report in alv

    hi,
      how to generate interactive report in alv,for this what are the requirements,
    give me one sample report.
                                                 thankyou.

    Hi,
    Chk these helpful links..
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Regards
    Anversha

  • How to generate a report in pdf from a stored proc

    Hi, i need guidance on how to generate a report in pdf from an oracle stored proc.
    The environment is oracle 10gas + 10gdb.
    On a specific event, a PL/SQL stored procedure is called to do some processing and at the end of the processing to generate report which has to be sent to the printer (and optionally previewed by the user).
    Can anyone assist me with this?

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • How to generate a report in Excel with multiple sheets using oracle10g

    Hi,
    I need a small help...
    we are using Oracle 10g...
    How to generate a report in Excel with multiple sheets.
    Thanks in advance.
    Regards,
    Ram

    Thanks Denis.
    I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
    rdf paperlayout format will not workout for generating multiple worksheets.
    Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
    Regards,
    Ram

  • How to generate my report in HTML format

    Hi
    I am using Forms and reports 6i . How to generate a report in Html format.
    Please explain what are the option available in reports and the way to do
    thanks in advance
    prasanth a.s.

    *specify  desformat=html  in cmd line
    refer
    * Forms Reports integration 6i
    http://otn.oracle.com/products/forms/pdf/277282.pdf
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

  • How to generate a report based on account description

    Hi Experts,
    How to generate the report based on account description, that means
    i want to generate a report on G/L account and which account numbers are having 'CASH' description.
    for Ex: G/L a/c no: 25010026-Cash and Bank balance(des)
    G/L a/c no: 101000-Cash-freight
    like this.
    please help to do this,
    good answer will be appreciated with points,
    Thanks in advance
    Venkat

    Hi shana,
    my requirement is
    I have G/L account numbers, that account numbers having some descriptions, in these some descriptions are belongs to cash transactions, i want to generate the report on these cash transactions, and the report is " G/L account, debit cash, credit cash, balance".
    is it possible or not,
    thanks in advance,
    Venkat

  • How to generate addm report using grid

    Hi,
    how to generate addm report using grid, please provide any relevant doc/links etc.
    Thanks in advance.

    how to generate addm report using grid, please provide any relevant doc/links etc.When you start with the wrong question, no matter how good an answer you get, it won't matter very much.
    what is best way to divide board into 2 pieces using a hammer?
    Edited by: sb92075 on Oct 25, 2010 7:22 AM

  • How to generate PDF report directly instead of RPT report by using JRC ?

    Hi,
    Good Day !
    How to generate PDF report directly instead of RPT report by using Crystal Reports XI Release 2 Java Reporting Component (JRC) in desktop (Swing thick-client) ?
    My GUI program will generate a RPT report, then i can export to PDF file, this is ok, no problem.
    BUT
    i want it direct to generate a PDF report, not a RPT report.
    The code like below (2 java files)
    ClassA.java
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(XXX, 0);  
    ParameterFieldController paramFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    paramFieldController.setCurrentValue("", "XXX", DomainClass.getXXX());        
    new ReportViewerFrame(reportClientDoc);
    // End of ClassA.java
    // Begin ReportViewerFrame.java
    public class ReportViewerFrame extends JFrame
           //Initial window frame properties.
         private final int XPOS = 80;
         private final int YPOS = 60;
         private final int WIDTH = 760;
         private final int HEIGHT = 550;
         private ReportViewerBean reportViewer = new ReportViewerBean();     
         private ReportClientDocument reportClientDoc = new ReportClientDocument();     
         public ReportViewerFrame(ReportClientDocument reportClientDoc) throws    Exception
              //Initialize frame properties.
              this.setResizable(true);
              this.setLocation(XPOS, YPOS);
              this.setSize(WIDTH, HEIGHT);
              this.setTitle("Crystal Report Java Viewer");
              //Add GUI components to the frame including the ReportViewerBean.
              addComponents();
              //Add GUI listeners to the frame.
              addListeners();
              //Set the report that the ReportViewerBean will display.
              this.reportClientDoc = reportClientDoc;
              reportViewer.setReportSource(reportClientDoc.getReportSource());     
              reportViewer.init();
              reportViewer.start();
              //Display the frame.
              this.setVisible(true);     
    How to set the export option to PDF base on existing code ?
    Where can i download this package/jar ?
    regards

    Please find a console app that you can extend it to a JFrame app by importing the relevant swing package:
    //Crystal Java Reporting Component (JRC) imports.
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.lib.*;
    import com.crystaldecisions.sdk.occa.report.exportoptions.*;
    //Java imports.
    import java.io.*;
    public class ExportReport {
         static final String REPORT_NAME = "ExportReport.rpt";
         static final String EXPORT_FILE = "C:\\myExportedReport.pdf";
         public static void main(String[] args) {
              try {
                   //Open report.               
                   ReportClientDocument reportClientDoc = new ReportClientDocument();               
                   reportClientDoc.open(REPORT_NAME, 0);
                   //NOTE: If parameters or database login credentials are required, they need to be set before.
                   //calling the export() method of the PrintOutputController.
                   //Export report and obtain an input stream that can be written to disk.
                   //See the Java Reporting Component Developer's Guide for more information on the supported export format enumerations
                   //possible with the JRC.
                   ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
                   //Release report.
                   reportClientDoc.close();
                   //Use the Java I/O libraries to write the exported content to the file system.
                   byte byteArray[] = new byte[byteArrayInputStream.available()];
                   //Create a new file that will contain the exported result.
                   File file = new File(EXPORT_FILE);
                   FileOutputStream fileOutputStream = new FileOutputStream(file);
                   ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
                   int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
                   byteArrayOutputStream.write(byteArray, 0, x);
                   byteArrayOutputStream.writeTo(fileOutputStream);
                   //Close streams.
                   byteArrayInputStream.close();
                   byteArrayOutputStream.close();
                   fileOutputStream.close();
                   System.out.println("Successfully exported report to " + EXPORT_FILE);
              catch(ReportSDKException ex) {
                   ex.printStackTrace();
              catch(Exception ex) {
                   ex.printStackTrace();
    As to the relevant jar(s) deployment refer to this link (Java Reporting Component Configuration):
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/JRC_SDK/jrc_java_dg_doc/doc/jrcsdk_java_dg/WorkingWithJRC2.html#1004391
    Cheers

  • How to generate the reports in BI and display in EP ?

    Hi All
       I am new to BI but i am working on EP
       Can any one help me how to generate the reports in BI and should be displayed
       in EP frontend?  So what and all settings and installations i need to do ?
       Any documents on this will be really helpful to me..........
    Adv...thanks and regards
    Kops

    Hi kops,
    Check the links below.What you need is there..
    How can i place a query developed in BEX to portal
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/92dceb49fd25e5e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm

  • How to generate pdf report and automatically save in the folder?

    Hi all,
    I want to ask, how to generate pdf report and automatically save in the folder?
    Actually, if i run pdf report and show to screen. Now do not need to show to the screen but save the pdf file in the folder.
    If anyone know, please share to me.
    Thanks and regards,
    Iwan

    Hi all,
    Thanks for the reply.
    when i run pdf report, and i got this URL to show the pdf report.
    http://190.180.55.73:7778/reports/rwservlet/getjobid3828?server=sitcnrepsvr
    Do any body know where can i get this pdf report that i have run in application server report folder ?
    Thanks and regards,
    Iwan

  • How to convert Classical Report into PDF format..........

    Hi Experts,
    I have written a classical report with write statements and when i am downloading in excel the format is mismatching and now i want to convert into PDF format.
    How to convert into PDF format from Classical report ?
    Yusuf

    Hi yusuf,
    please find the below report,,
    please make two include programs before executing it,
    there codes are pasted below,
    INCLUDE zimpr_data_declaration.
    INCLUDE zimpr_performs_wrap.
    REPORT  zimpr_word_wrap NO STANDARD PAGE HEADING LINE-SIZE 115..
                INCLUDE for DATA DECLARATION                               *
    INCLUDE zimpr_data_declaration.
                INCLUDE for all performs.                                  *
    INCLUDE zimpr_performs_wrap.
    TOP-OF-PAGE--
    TOP-OF-PAGE.
      PERFORM f_top_page.                     "TOP OF THE REPORT PAGE,I.E. HEADER.
    START-OF-SELECTION.
      SET PF-STATUS 'SEL_SCREEN'.             "PF-STATUS OF THE SELECTION SCREEN.
      PERFORM f_data_retrieval.               "PERFORM FOR ALL SELECT STATEMENTS.
      PERFORM f_report_display.               "REPORT DISPLAY,WRITE STATEMENTS.
    --Define the actions to be performed for pf-status-----
    AT USER-COMMAND.
      wf_ok_code = sy-ucomm.
      wf_save_ok = wf_ok_code.
      CLEAR wf_ok_code.
      CASE wf_save_ok.
        WHEN 'PDF'.          "WHEN PDF ICON IS CLICKED,REPORT WILL CONVERT INTO PDF.
          loc_repid  = sy-repid.   "PROGRAM NAME
    --THIS FM SETS  THE PARAMETERS FOR LAYOUT OF PDF OUTPUT--
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              layout                 = loc_paart             "LANDSCAPE LAYOUT
              line_size              = loc_linsz                  "CHARACTER WIDTH OF REPORT
              no_dialog              = 'X'
              user                   = sy-uname              "USERNAME
            IMPORTING
              out_parameters         = loc_print_parms        "OUTPUT PARAMETERS WILL BE COLLECTED HERE.
              valid                  = loc_valid
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    --FOR GENERATING THE SPOOL NUMBER--
          NEW-PAGE PRINT ON NO DIALOG PARAMETERS loc_print_parms.                        " This allocates the spool no
          "to the screen without the dialog screen.
          PERFORM f_top_page.
          PERFORM f_report_display.
          NEW-PAGE PRINT OFF.                                                      "This marks the end of the screen for which the spool no was generated.
          wf_id = sy-spono.                                                      " This assign the spool no of the screen to the variable.
    --PERFORM FOR GETTING THE PDF OUTPUT--
          PERFORM f_pdf_display.
    --PERFORM FOR DOWLOADING FILE TO A LOCAL DISK--
          PERFORM f_download_local.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    include data declaration----
    *&  Include           ZIMPR_DATA_DECLARATION
    TYPE-POOLS : shlp.
    DATA : wf_ordert TYPE aufk-auart.                      "ORDER TYPE
    DATA : wf_order TYPE aufk-aufnr.                       "ORDER NUMBER
    DATA : wf_bdate TYPE afko-gstrp.                       "BASIC START DATE
    DATA : wf_status(4) TYPE c ."rihea-i_astatin.                 "STATUS
    DATA : wf_objnr TYPE jest-objnr VALUE 'OR%'.           "Object number
    DATA : wf_aufnr TYPE aufk-aufnr.
    DATA : wf_name TYPE thead-tdname.                      "NAME TO PASS IN FM READ_TEXT
    DATA : wf_date1(12) TYPE c.                            "DATE
    DATA : wf_i1(3) TYPE n,wc_i1(3) TYPE n VALUE '1'.      "COUNTERS FOR REPORT DISPLAY
    DATA : wf_i2(3) TYPE n,wc_i2(3) TYPE n VALUE '1'.
    DATA : wf_kopf TYPE tdid VALUE 'KOPF',wf_aufk TYPE tdobject VALUE 'AUFK'.
    DATA : wf_save_ok TYPE sy-ucomm ,wf_ok_code TYPE sy-ucomm.
    DATA: wf_id TYPE tsp01-rqident ,                         " For storing Spool request number
          wf_bytes TYPE i .                                  " For storing the bytes of data to be converted to PDF.
    DATA : wf_langu(2) TYPE c VALUE 'EN'.
    DATA: wf_pripar TYPE pri_params,                         " Structure for Passing Print Parameters
          wf_rcpar TYPE arc_params.                          " ImageLink structure
    DATA : wf_statu TYPE dfies-fieldname VALUE 'STATUS',
           wf_field TYPE help_info-dynprofld VALUE 'S_STATUS'.
    &--SELECTION SCREEN--
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  s_ordert FOR wf_ordert .                  "ORDER TYPE
    SELECT-OPTIONS:  s_order FOR wf_order OBLIGATORY.          "ORDER NUMBER
    SELECT-OPTIONS:  s_bdate FOR wf_bdate.                      "BASIC START DATE
    SELECT-OPTIONS:  s_status FOR wf_status matchcode object zei_sys .  "SYSTEM STATUS
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK b_1.
    *--INTERNAL TABLES--
    TYPES : BEGIN OF ty_aufk,
          aufnr TYPE aufk-aufnr,              "OREDR NUMBER
          auart TYPE aufk-auart,              "ORDER TYPE
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          ktext type aufk-ktext,              "SHORT TEXT
          gstrp TYPE afko-gstrp,              "BASIC START DATE
          END OF ty_aufk.
    TYPES : BEGIN OF ty_tj02t,
          objnr TYPE aufk-objnr,              "OBJECT NUMBER
          txt04 TYPE tj02t-txt04,             "STATUS
          istat TYPE tj02t-istat,             "Object status
          spras TYPE tj02t-spras,             "LANGUAGE KEY
          END OF ty_tj02t.
    TYPES : BEGIN OF ty_temp,
          objnr TYPE aufk-objnr,
          status(300) TYPE c,
           END OF ty_temp.
    TYPES : BEGIN OF ty_wrap,
           line(54) TYPE c,                     "LONG TEXT
           END OF ty_wrap.
    TYPES : BEGIN OF ty_wrap2,
           line(25) TYPE c,                     "STATUS
           END OF ty_wrap2.
    TYPES : BEGIN OF ty_f4,
            txt04 TYPE tj02t-txt04,
            txt30 TYPE tj02t-txt30,
            END OF ty_f4.
    types :  begin of ty_sta,
            istat type tj02t-istat,
            objnr type jest-objnr,
            end of ty_sta.
    data : int_sta type table of ty_sta with header line.
    DATA : int_f4 TYPE TABLE OF ty_f4 WITH HEADER LINE.
    DATA: int_pdf TYPE TABLE OF tline WITH HEADER LINE.            "TABLE FOR PDF CONVERSION
    DATA: int_wrap TYPE TABLE OF ty_wrap WITH HEADER LINE.         "TABLE FOR LONGTEXT
    DATA: int_wrap2 TYPE TABLE OF ty_wrap2 WITH HEADER LINE.       "TABLE FOR STATUS
    DATA: int_temp TYPE TABLE OF ty_temp WITH HEADER LINE.         "Table for concatenation of system status.
    DATA: int_aufk TYPE TABLE OF ty_aufk WITH HEADER LINE.
    DATA: int_tj02t TYPE TABLE OF ty_tj02t WITH HEADER LINE.
    DATA: int_tline TYPE STANDARD TABLE OF tline WITH HEADER LINE. "TABLE FOR READ_TEXT.
    DATA : int_fld TYPE TABLE OF dfies ,wa_fld LIKE LINE OF int_fld.                     " Field Type for FM for F4 help
    DATA :int_return   TYPE TABLE OF ddshretval WITH HEADER LINE .
    DATA:
      loc_print_parms LIKE pri_params,          "PRINT PARAMETERS
      loc_valid(1)      TYPE c,
      loc_file type SDOK_CHTRD,
      loc_bytecount     TYPE i,                 "NUMBER OF BYTES TRANSFERRED
      loc_length        TYPE i,                 "LINE-LENGTH
      loc_rqident       LIKE tsp01-rqident,     "SPOOL NUMBER
      loc_rq2name(12)   TYPE c.
    DATA: loc_filename LIKE rlgrap-filename.     "FILENAME
    DATA:loc_repid LIKE sy-repid,                    " Report to execute
         loc_linsz LIKE sy-linsz VALUE 115,          " Line size
         loc_paart LIKE sy-paart VALUE 'X_65_132'.   " Paper Format
    Include           ZIMPR_PERFORMS_WRAP----
    *&  Include           ZIMPR_PERFORMS_WRAP
    *&      Form  f_top_page
         top-of the page
    -->  p1        text
    <--  p2        text
    FORM f_top_page .
    *--HEADER--
      FORMAT COLOR 1 .
      WRITE : text-010.
      FORMAT COLOR 1 OFF.
      WRITE : / text-011,sy-datum NO-GAP.
      WRITE : / text-012,sy-uzeit NO-GAP,90 text-013,101 sy-uname.
      ULINE .
      FORMAT COLOR 1 INTENSIFIED OFF .
      WRITE : 1 sy-vline,                "HEADINGS
      2 text-014 NO-GAP,
      7 sy-vline,
      8 text-015 NO-GAP,
      20 sy-vline,
      21 text-016 NO-GAP,
      76 sy-vline,
      77 text-017 NO-GAP,
      88 sy-vline,
       89 text-018  NO-GAP,
      115 sy-vline.
      WRITE : /1 sy-vline,
        2 text-019 NO-GAP,7 sy-vline,
        20 sy-vline,76 sy-vline,77 text-020 NO-GAP,88 sy-vline,115 sy-vline.
      ULINE.
      FORMAT COLOR 1 OFF.
    ENDFORM.                    " f_top_page
    *&      Form  f_data_retrieval
         select statements
    -->  p1        text
    <--  p2        text
    FORM f_data_retrieval .
    SELECTING ORDER TYPE,ORDER NO.,OBJECT NO. AND BASIC START DATE
      SELECT  p~aufnr
               p~auart
               p~objnr
               p~ktext
               r~gstrp
               FROM  ( aufk AS p INNER JOIN afko AS r ON raufnr = paufnr )
               INTO TABLE int_aufk
               WHERE p~aufnr IN s_order AND
                     p~auart IN s_ordert AND
                     r~gstrp IN  s_bdate AND
                     p~objnr LIKE wf_objnr.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_aufk BY aufnr.
      DELETE ADJACENT DUPLICATES FROM int_aufk.
      SELECT q~istat
           p~objnr
           FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
           INTO TABLE int_sta
           FOR ALL ENTRIES IN int_aufk
           WHERE p~objnr = int_aufk-objnr
                 AND q~txt04 IN s_status and
                 q~spras = wf_langu and
                 p~inact = ''.
      IF sy-subrc <> 0.
        MESSAGE s101(zipm).                "no values found for selection criteria.
        STOP.
      ENDIF.
      SORT int_sta BY objnr.
      DELETE ADJACENT DUPLICATES FROM int_sta.
    *--SELECTING OBJECT NO.,STATUS AND LANGUAGE--
      IF int_sta[] IS NOT INITIAL.
        SELECT p~objnr
               q~txt04
               q~istat
               q~spras
               FROM ( jest AS p INNER JOIN tj02t AS q ON pstat = qistat )
               INTO TABLE int_tj02t
               FOR ALL ENTRIES IN int_sta
               WHERE p~inact = '' AND
                     p~objnr = int_sta-objnr AND
                     q~spras = wf_langu AND
                    q~txt04 IN s_status AND
                     p~objnr LIKE wf_objnr.
        IF sy-subrc <> 0.
          MESSAGE s101(zipm).               "no values found for selection criteria.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_data_retrieval
    *&      Form  f_report_display
          report display
    -->  p1        text
    <--  p2        text
    FORM f_report_display .
      LOOP AT int_tj02t.              "concatenating the status into a internal table
        AT NEW objnr.
          CLEAR int_temp-status.
        ENDAT.
        CONCATENATE int_temp-status int_tj02t-txt04 INTO int_temp-status SEPARATED BY space.
        AT END OF objnr.
          int_temp-objnr = int_tj02t-objnr.       "key field.
          APPEND int_temp.
          CLEAR int_temp.
        ENDAT.
        CLEAR int_tj02t.
      ENDLOOP.
      LOOP AT int_aufk.
        CONCATENATE sy-mandt int_aufk-aufnr INTO wf_name .    "concatenating client number and order number
    *--THIS FM CAPTURES THE LONG TEXT AND STORES IT IN INTERNAL TABLE--
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = wf_kopf         "TEXT ID
            language                = sy-langu       "LANGUAGE
            name                    = wf_name        "TEXT NAME
            object                  = wf_aufk         "TEXT OBJECT
          TABLES
            lines                   = int_tline      "LINES OF LONG TEXT.
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.
        IF sy-subrc <> 0.
          int_tline-tdline = int_aufk-ktext.
          APPEND int_tline.
          CLEAR :int_tline.
        ENDIF.
        LOOP AT int_tline.
    *--THIS FM WRAPS THE LONG TEXT INTO 54 CHARACTERS EACH--
          CALL FUNCTION 'RKD_WORD_WRAP'
            EXPORTING
              textline            = int_tline-tdline          "LONG TEXT LINE
              outputlen           = 54                        "OUTPUT LENGTH
            TABLES
              out_lines           = int_wrap                  "INTERNAL TABLE
            EXCEPTIONS
              outputlen_too_large = 1
              OTHERS              = 2.
          IF sy-subrc <> 0.
            CLEAR :int_tline.
          ENDIF.
        ENDLOOP.
    *-- THIS FM WRAPS THE STATUS INTO 25 CHARACTERS EACH--
        READ TABLE int_temp WITH KEY objnr = int_aufk-objnr.
        CALL FUNCTION 'RKD_WORD_WRAP'
          EXPORTING
            textline            = int_temp-status
            outputlen           = 25
          TABLES
            out_lines           = int_wrap2
          EXCEPTIONS
            outputlen_too_large = 1
            OTHERS              = 2.
        IF sy-subrc <> 0.
         CONTINUE.
        ENDIF.
        IF NOT int_wrap2[] IS INITIAL.
          ULINE AT (115).
        ENDIF.
        DESCRIBE TABLE int_wrap LINES wf_i2.         "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP
        DESCRIBE TABLE int_wrap2 LINES wf_i1.        "COUNTING THE NO. OF LINES FOR TABLE INT_WRAP2
        WHILE ( wc_i1 LE wf_i1 OR wc_i2 LE wf_i2 ).
          IF ( wc_i2 LE wf_i2 ).
            READ TABLE int_wrap INDEX wc_i2 .        "READING THE INTERNAL TABLE INT_WRAP WITH INDEX
            wc_i2 = wc_i2 + 1.
          ENDIF.
          IF ( wc_i1 LE wf_i1 ).
            READ TABLE int_wrap2 INDEX wc_i1 .       "READING THE INTERNAL TABLE INT_WRAP2 WITH INDEX
            wc_i1 = wc_i1 + 1.
          ENDIF.
    *--THIS FM CONVERTS THE DATE FROM SYSTEM FORMAT TO OUTPUT FORMAT--
          CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
            EXPORTING
              input  = int_aufk-gstrp
            IMPORTING
              output = wf_date1.
          IF NOT int_wrap2[] IS INITIAL .
    *--REPORT DISPLAY--
            WRITE : /1 sy-vline, 2 int_aufk-auart COLOR = 4 INTENSIFIED OFF NO-GAP ,
                    7 sy-vline ,8 int_aufk-aufnr COLOR = 4 INTENSIFIED OFF NO-GAP,
                    20 sy-vline,21 int_wrap-line,
                    76 sy-vline ,77  wf_date1 ,
                    88 sy-vline ,89 int_wrap2-line,
                    115 sy-vline.
    *--CLEARING THE VARIABLES--
            wf_date1 = ''.
            CLEAR: int_aufk,int_temp,int_wrap2-line,int_wrap-line.
          ENDIF.
        ENDWHILE.
        wc_i1 = 1.
        wc_i2 = 1.
        CLEAR :int_wrap,int_wrap2.
        REFRESH : int_wrap,int_wrap2,int_tline.
      ENDLOOP.
      ULINE AT (115).
    ENDFORM.                    " f_report_display
    *&      Form  F_PDF_DISPLAY
         pdf conversion
    -->  p1        text
    <--  p2        text
    FORM f_pdf_display .
    *--THIS FM CONVERTS THE SPOOL REQUEST INTO PDF REPORT--
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = wf_id                 "SPOOL NUMBER
          no_dialog                = space
          pdf_destination          = 'X'
        IMPORTING
          pdf_bytecount            = loc_bytecount        "NUMBER OF BYTES TRANSFERRED
        TABLES
          pdf                      = int_pdf                                  "TABLE FOR PDF REPORT
        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.
    ENDFORM.                    " F_PDF_DISPLAY
    *&      Form  f_download_local
         download to local system
    -->  p1        text
    <--  p2        text
    FORM f_download_local .
    ---------------------THIS FM DOWNLOADS THE PDF REPORT INTO LOCAL MACHINE
    data  loc_ret TYPE iwerrormsg.
      CALL FUNCTION 'IW_C_GET_SAPWORKDIR'
       IMPORTING
         SAPWORKDIR       = loc_file
        ERROR_MSG        =  loc_ret
      loc_filename = loc_file.
      if loc_ret is initial.
      concatenate loc_filename '\work order header long text_  ' sy-timlo '.pdf' into loc_filename.
      endif.
      CALL FUNCTION 'DOWNLOAD'
        EXPORTING
          bin_filesize = loc_bytecount      "NO. OF BYTES
          filename     = loc_filename       "DEFAULT FILE NAME
          filetype     = 'BIN'
        IMPORTING
          act_filename = loc_filename
        TABLES
          data_tab     = int_pdf.
    ENDFORM.                    " f_download_local
    if you have any doubts,,
    please revert
    Regards,
    Talwinder

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • How to generate crystal report in sap application

    hi,,
    i  want to  generate crystal report  through sap application...
    How  is it possible ....?
    could you help me  in details?
    Plz  help me???????????

    STEP 1: Like any other add-on project, refer SBO UI and DI COM to your project. Initialize SBO APPLICATION object and SBO COMPANY object and listen to events. (This is standard add-on project steps)
    STEP 2: Add a Dataset to the project. This is used as a data source to your Crystal Reports. (For more information on this search for Push Technique Crystal Reports)
    STEP 3: Add a Windows Form to your Project.
    STEP 4: Add a Crystal Report Control to it.
    STEP 5: Design report based on dataset added above.
    STEP 6: Launch this Form with required parameters and selection criteria when any even happens.
    Remember there is lot stuff available on net if you search with PUSH TECHNIQUE CRYSTAL REPORT. SAP SDN has lot answers for adding Crystal Reports integration to SAP Business One Add-On.
    HTH
    B Ravi Shankar

  • How to generate pdf report in swing

    Hello,
    can you help me?
    i want to generate pdf report in my swing based project but i don't know about any idea of this report generating
    procedure . Please help me.

    shesh_07 wrote:
    Hello,
    can you help me?Can you help yourself? Two suggestions I have for posting to a technical forum are:
    1) Add an upper case letter to the start of each sentence. This helps the reader to scan the text quickly, looking for the important parts. It also helps to dispel the impression that the writer is just lazy.
    2) Try to do some research on your own, summarise it and state any conclusions you have reached. Ask a specific question and generally, try not to sound so pathetic.
    i want to generate pdf report ..Search for [Java PDF|http://lmgtfy.com/?q=java+pdf] *(<- link).*
    Figure how to generate a PDF report in a class used from the command line, then..
    ..in my swing based project .....wrap a GUI around that class. For details on the latter, see the [Swing tutorial|http://java.sun.com/docs/books/tutorial/uiswing/] *(<- link).*
    ..but i don't know about any idea of this report generating
    procedure . Please help me.Please help yourself.

Maybe you are looking for

  • [svn:fx-trunk] 7700: Integrated TLF build 450.

    Revision: 7700 Author:   [email protected] Date:     2009-06-09 21:31:13 -0700 (Tue, 09 Jun 2009) Log Message: Integrated TLF build 450. This integration required no changes to framework code. From TLF's ReleaseNotes.txt: Build 450 Fix bug 330941 Bac

  • Finding a table with a like %name% in a schema

    What is the query I should use to find a table with a like %name% in a schema? Thank you for any help

  • Adding same keywords to multiple images

    How can I add keywords, or change keywords, to multiple selected images at the same time instead of having to do it one at a time? Or can I?  I know how to change or add to metadata on multiple images, but it won't retain the keywording changes on al

  • How to disable CD-DRIVE checking, while using a Dolphin file manager

    Hello. I  would like ask for a help. I have one problem that's quite annoying. It is related to checking cd-drive when using a dolphin file menager. It always cheecks it when Dolphin is launched from K or launcher on taskbar for the first time, again

  • CPU in 13" model

    What is the processor in the 13" model (the i5 one)? I would like to see the exact specs of it from intel's page. And for future reference, is there any place I can find this infomation? And when I mean processor, I mean like "i5-380m", so I can find