Can we create complete report in OOPs

Hi,
Could you please advice if we can code the complete report in SE24 and call it in SE38 report..
For ex. I have a report followed by ALV output..now can i write everything in a Z Object (from decalration to output ) ..
Kindly suggest if it is a good strategy than simply using standard objects in report editor.
If possible, request you to provide a sample report using complete OOPs approach.
Thanks,
Gaurav

Yes...the entire thing, INCLUDING SELECTION SCREEN, can be written in OO.  I haven't tried building the whole thing in SE24, then executing....what's the point?  A report may be pretty much one-off, but utilize pieces of classes.
SAP Press recent manual "Official ABAP Progamming Guidlines" contains an example using Separation of Concerns/Software Layering approach that includes a selection screen call in the Presentation layer.  It can be done!  What I don't see is an easy or elegant way to re-process the selection screen if I must reject what the user has input and get different values....
In that program, BTW, the start of selection event contains only:
report->main( ).
Main might look like:
(from my program, not their version).  E-me if you want the entire program.
class report definition.
  public section.
    class-methods main.
endclass.                    "report DEFINITION
class report implementation.
  method main.
    data: gt_itab   type table of gtyp_itab,
          so_tstmp  type table of iseldats,
          rpt_tab   type table of gtyp_rpt.
    data: rc      type sy-subrc.
    gui_level=>get_input_parms( ).  "calls selection screen!
    gui_level=>create_date_table(
             changing so_tstmp = so_tstmp ).
    persistence_level=>get_data_from_db(
                  exporting so_tstmp = so_tstmp
                  importing gt_itab = gt_itab
                                 rc = rc ).
    if rc eq 0.
      apps_level=>sort_itab(
              changing gt_itab = gt_itab ).
      apps_level=>build_report_table(
              changing gt_itab = gt_itab
                       rpt_tab = rpt_tab ).
      if sy-subrc eq 0.
        gui_level=>display_alv_form( rpt_tab  ).
      endif.
    endif.
  endmethod.                    "main
endclass.                    "report IMPLEMENTATION

Similar Messages

  • Can we create ALV report in CO module

    Hi All,
    Can we create ALV reports in CO( controlling area ) module like MM and SD.
    i m new to CO module, pls suggest me in this case.
    my requirement is to generate a report on ' estate general charges by company'
    Thanks
    Mona

    Hi,
    look whatever the module may be , if you store your result in an internal table , you can display it with ALV.
    ALV is, as you know, nothing but a way to display list in better way. SO get your data and design a field catalog according and use any ALV disply function to display it.
    Regards,
    Anirban

  • Creating ALV reports using OOP concept

    After creating many reports i found out that 90% of the coding in a report is copy paste i.e. only 10% of coding effort is required which includes
        creating the custom data types and internal table variables  ...
        populating the data
        creating screen,GUI status and GUI title
    Just copy paste the below code and do as stated  :
    *ALV TEMPLATE
    *create screen no. 2000
    *change flow logic in screen if necessary
    *create GUI status and GUI title
    *change selection texts and text symbols*
    REPORT  Y_TEMPLATE_ALV.
    TABLES : ."use if range of values required on selection screen.
    DATA: zcl_alvgrid        TYPE REF TO cl_gui_alv_grid,
           zcl_ccontainer     TYPE REF TO cl_gui_docking_container,
           wa_layout    TYPE lvc_s_layo,
           it_fieldcat  TYPE STANDARD TABLE OF lvc_s_fcat,
           wa_fieldcat  TYPE lvc_s_fcat,
           z_document         TYPE REF TO cl_dd_document,
           o_docking TYPE REF TO cl_gui_docking_container,"Docking Container
           o_split TYPE REF TO cl_gui_easy_splitter_container, "Splitter
           o_top_container TYPE REF TO cl_gui_container,   "Top Container
           o_bottom_container TYPE REF TO cl_gui_container."Bottom Container
    TYPES : BEGIN OF TY_FINAL,
    "All columns which are to be displayed in the report should be included here
    END OF TY_FINAL.
    *Add additional Internal Tables's if data is to be extracted from multiple tables
    *Then loop at main table and Read the other tables
    DATA :IT_DATA TYPE STANDARD TABLE OF , "data extracted from tables can be stored in this internal table variable ..
           WA_DATA TYPE ,
           iT_alv      TYPE STANDARD TABLE OF TY_FINAL, " pass to  the method SET_TABLE_FOR_FIRST_DISPLAY of class
    ZCL_ALVGRID [Already done ; its  just fyi]
           WA_alv      TYPE                   TY_FINAL.
    DATA :V_CLN(255) TYPE C, " For no. of records
           V_LINE TYPE I. " for conversion of integer to character
    *                 Selection Screen                                     *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:
    SELECT-OPTIONS: " PARAMETERS and Range on selection screen
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
    *                        START  OF  SELECTION                          *
    START-OF-SELECTION.
    *  SELECT * FROM INTO CORRESPONDING FIELDS OF TABLE IT_DATA WHERE ....in ....
       IF SY-SUBRC = 0.
         LOOP AT IT_DATA INTO WA_DATA.
           MOVE-CORRESPONDING WA_DATA TO wa_alv. " if data is fetched from only one table
           APPEND wa_alv TO it_alv.
           CLEAR : wa_alv,WA_DATA.
         ENDLOOP.
         DESCRIBE TABLE it_alv LINES V_LINE.
         V_CLN = V_LINE.
       ENDIF.
    END-OF-SELECTION.
       PERFORM DISPLAY_ALV.
    *&      Module  STATUS  OUTPUT
    *       text
    MODULE STATUS_2000 OUTPUT.
       SET PF-STATUS 'STATUS'.
       SET TITLEBAR 'ALV'.
    *  ** Creating Docking Container
       CREATE OBJECT o_docking
       EXPORTING
    *    side = cl_gui_docking_container=>dock_at_right
         ratio = '95'.
       IF sy-subrc EQ 0.
    * Splitting the Docking container
         CREATE OBJECT o_split
         EXPORTING
           parent        = o_docking
           sash_position = 05 "Position of Splitter Bar (in Percent)
           with_border   = 0. "With Border = 1 Without Border = 0
    *   Placing the containers in the splitter
         o_top_container = o_split->top_left_container .
         o_bottom_container = o_split->bottom_right_container .
    *   Creating the document
         CREATE OBJECT z_document
         EXPORTING
           style = 'ALV_GRID'.
       ENDIF.
    * Calling the methods for dynamic text
       CALL METHOD z_document->add_text
       EXPORTING
         TEXT         = 'No. of Records:'
         sap_emphasis = cl_dd_area=>strong. " For bold
    * Adding GAP
       CALL METHOD z_document->add_gap
       EXPORTING
         width = 10.
    * Adding Text
       CALL METHOD z_document->add_text
       EXPORTING
         TEXT = v_cln.
    * Adding Line
       CALL METHOD z_document->new_line.
    * Display the data
       CALL METHOD z_document->display_document
       EXPORTING
         parent = o_top_container.
       IF zcl_alvgrid IS INITIAL .
    *----Creating ALV Grid instance
         CREATE OBJECT zcl_alvgrid
         EXPORTING
           i_parent          = o_bottom_container
         EXCEPTIONS
           error_cntl_create = 1
           error_cntl_init   = 2
           error_cntl_link   = 3
           error_dp_create   = 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.
    * Calling the method of ALV to process top of page
         CALL METHOD zcl_alvgrid->list_processing_events
         EXPORTING
           i_event_name = 'TOP_OF_PAGE'
           i_dyndoc_id  = z_document.
    * Preparing field catalog.
         PERFORM T_FIELDCAT USING:
                    '1'        'BRNCD'      'BRAND'.
    *          'Column no' 'FIELDNAME' 'Column Heading' 
         WA_LAYOUT-CWIDTH_OPT = 'X'.
         WA_LAYOUT-ZEBRA = 'X'.
         WA_LAYOUT-SEL_MODE =  'A'.
    * Setting table for first display
         CALL METHOD ZCL_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
         EXPORTING
           IS_LAYOUT                     = WA_LAYOUT
         CHANGING
           IT_OUTTAB                     = it_alv
           IT_FIELDCATALOG               = IT_FIELDCAT
         EXCEPTIONS
           INVALID_PARAMETER_COMBINATION = 1
           PROGRAM_ERROR                 = 2
           TOO_MANY_LINES                = 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.
       ELSE.
         CALL METHOD ZCL_ALVGRID->REFRESH_TABLE_DISPLAY
         EXCEPTIONS
           FINISHED = 1
           OTHERS   = 2.
         IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
       ENDIF.
    ENDMODULE.                 " STATUS  OUTPUT
    MODULE USER_COMMAND_2000 INPUT.
       DATA: V_OK_CODE TYPE SY-UCOMM,
             V_SAVE_OK TYPE SY-UCOMM.
       V_OK_CODE = SY-UCOMM.
       V_SAVE_OK = V_OK_CODE.
       CASE SY-UCOMM.
         WHEN 'BACK'.
           SET SCREEN 1000.
         WHEN 'EXIT'.
           LEAVE program.
         WHEN OTHERS.
           SET SCREEN 1000.
       ENDCASE.
       CLEAR V_SAVE_OK.
       SET SCREEN 0.
       LEAVE SCREEN.
    ENDMODULE.                 " USER_COMMAND_2000  INPUT
    *&      Form  T_FIELDCAT
    *       text
    *      -->x   text
    *      -->y   text
    *      -->z   text
    FORM T_FIELDCAT  USING VALUE(X) TYPE ANY
           VALUE(Y) TYPE ANY
           VALUE(Z) TYPE ANY.
       WA_FIELDCAT-COL_POS = X.
       WA_FIELDCAT-FIELDNAME = Y.
       WA_FIELDCAT-COLTEXT  = Z.
       APPEND WA_FIELDCAT TO IT_FIELDCAT.
       CLEAR WA_FIELDCAT.
    ENDFORM.                      " T_FIELDCAT
    *&      Form  DISPLAY_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY_ALV .
       IF NOT it_alv[] IS INITIAL.
         CALL SCREEN 2000.
       ELSE.
         MESSAGE 'No data for Display' TYPE 'I'.
       ENDIF.
    ENDFORM.                    " DISPLAY_ALV

    Hello Jay,
    Calling methods, creating instances, casting etc are not OOP. When you say you've developed an OO-report you think OO, refer to this blog to see what i mean - Global Data in ABAP OO Programs
    BR,
    Suhas

  • How can I create a Report from a SWT-Application?

    Post Author: mkoch
    CA Forum: JAVA
    I'm a Developer and new to Crystal Reports and I have the job to create a Report from a SWT-Application.The report-files ( *.rpt) were created with Crystal Reports 10 or 11.> I'm not sure but I have access to a machine where Crystal Reports 10 Developer an Crystal Reports 11 Runtime are installed.Can anybody describe in detail how I can start the creation of a report from my Java-Application?> What libraries are needed, where can I get them and so on.I saw in the CR10-Setup that there is a Java-feature - but unfortunately this is not installed on my test-machine.--> Is it necessary to install this feature or can I get this files on businessobjects.com?Is it possible to start the report-creation from command-line?I saw a Java-example on the internet which uses Report.exe - but I haven't found this on my machine.I hope, that somebody can help me.GreetingsMarkus

    Inv. #
    Item
    Sale Price
    Lisa
    Oct Sold 12
    Oct Sold 12-2
    Oct Sold 12-3
    149
    Vase Lidded
    25
    201
    Bird
    7
    7
    202
    Bird
    7
    203
    Bird
    7
    204
    Bird
    7
    7
    205
    Bird
    7
    7
    206
    Bird
    7
    7
    207
    Bird
    7
    207
    Bird
    7
    7
    208
    Bird
    7
    7
    209
    Bird
    7
    7
    This is my very simple inventory.  On previous program I could sort by those items that did not have any figure in the row across.  Then I could print a report of open inventory.  Such as 149 Lidded Vase has not sales amount in the four colums across, thus it is open inventory.  How can I capture all those items in one report?

  • Can we create a report that show us all comments created for a specific MP

    Hi All,
    I have created documents for multiprovider.
    Now, I want to know whether we can create a report that shows all the documents created on this multiprovider or not.
    Your help will be rewarded.
    Regards,
    Haritha.

    Check out this post: http://forums.adobe.com/message/4399918#4399918
    You can use skip logic to get the desired effect. If you have problems do it just reply back.
    Randy

  • How can I create a report with a specified format in Answers

    Hello Everyone!
    I want to create a request in Answers gives me a report format like this:
    http://i25.tinypic.com/t6p0ee.jpg
    How can I achieve this?
    Please help!
    -D

    Thanks for quick replies. I think I was not able to give a lot of details.
    So, I am selecting a country, region, branch (branches can be multiple)
    The report is grouped by Branch (I get details of each individual projects within each of the branch, the total sales of individual projects and then total sales of the branch)
    The report then further gives me sum of sales of the branches that selected in my query.
    In the end I want the report to look similar to the pic I posted.
    Thanks!
    -D

  • Can I create a report based on Non-Oracle template?

    Hi:
    I have a Microsoft Word document that contains the entire layout of a report I need to create with Oracle Report 6i. I know that I can create a report based on a template, but as I understand it, I am limited to using Oracle Reports templates. Does Reports support using foreign templates? Thanks for any word in this manner.
    Thomas Morgan
    :)

    oracle reports does not support using ms word documents as templates. there is a product in the oracle applications stack, XML publisher, that allows you to inject data into a word template.
    thanks,
    ph.

  • Can we create a report painter report which shows the details of CC/CE/IO?

    Hi,
    I am trying to create a report painter report which shows the details of cost elements,cost centers and internal orders in a single section.I am able to create reports with 2 characteristics (like CC/CE or IO/CE etc.) but not with 3 characteristics (CE/CC/IO)  which is my case.I am trying to get data something like below.Is this even possible using report painter?I will appreciate if any one could suggest how to do this.
    CE          CC                        IO                        Amt
    600000  8190001100           1100001                $1000
                                              1100002                $2000
                                              1100003                $3000
                                                                          $4000
    620001  8190001101           1100004                $6000
                                              1200001                $2500
    . . . . . . . .and so on
    Thanks,
    Saurabh.

    >
    But when i am using the same synonym in crystal report design, my report is working fine.. but the same synonym is available as invalid in database..
    >
    What does 'my report is working fine' mean? Are you saying that if you rerun the query it retrieves fresh data from the database?
    What does 'same synonym is available as invalide in database' mean? How are you determining this.
    Synonyms can be created for objects that do not yet exist.
    create synonym q for table_does_not_exist
    select * from user_objects where object_name = 'Q'
    SYNONYM_NAME,TABLE_OWNER,TABLE_NAME,DB_LINK
    Q,SCOTT,TABLE_DOES_NOT_EXIST,

  • Can not create Webi report on a Universe based on Bex Query

    Hi,
    We are using BO XI 3.1 (FP 3.4) with SAP integration Kit (same Patch Level) with SAP Authentication. We have a Universe based on a bex query and its connection is set to use SSO.
    We have say two SAP users U1 & U2. Now "U1" is able to create webi reports but when we Logged in as "U2" and try to create Webi reports or try to refresh reports created by U1 it through an error ...
    The database error text is: (CS) "Error on NumResultCols" . (WIS 10901).....
    As per the "Authorization" section in BusinessObjects XI Integration for SAP Solution Installation Guide we have provided this users with all the mention autherizations.
    Any words over this will be highly appreciated.
    Regards,

    It is highly probable that this is due to missing authorizations on the SAP BW side (not talking about the authroizations which are directly related to the BO/BW integration). I would recommend to ask your SAP Basis team to do a security trace while you are accessing the reports with the user, who gets the error. THey should look for failing authorization checks.
    Regards,
    Stratos

  • Created Quiz in Captivate 4. How can I create a report on Question Level

    I have created a quiz in Captivate 4. I would like to create a report on question level. for e.g., I'd like to determine the no. of users that answered wrong on specific question consistently. This helps us to go back and tweak the quiz to make it more learning friendly.

    Hi there
    This is normally handled by virtue of installing a Learning Management System (LMS). You then upload the Captivate into the LMS and the LMS handles aggregating and keeping track of performance.
    Captivate does offer an E-Mail reporting function, but it's far from reliable and not remotely secure. Additionally you would be forced to hand tally and track responses if you are fortunate enough for it to actually SEND responses.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How can I create a Report with LabView Real-Time?

    With conventional LabView, I can create Reports in HTML, for example to document Errors.
    I need this feature in LabView Realtime. Is it possible?

    It is possible, but you got to put a name to the file with an extension of three letters. i.e. errors.htm
    Three letters on the extension is what the RT Operating system allows to use.
    Then you will need to do an ftp to your RT machine and get the file and maybe change the extensions.
    Not all the vis for Report generation can be used in the RT engine. The ones that use ACTIVE X will not work. i.e printting
    Another way to generate reports and the most recommended is to use the host machine to generate the reports.
    Regards,
    Blasioz Valenzuela
    National Instruments

  • Can itune create inventory reports of the albums and Artists in my library?

    I want to create an album inventory report for my large itunes library which consists of only CDs I have purchased.  There are a couple of reasons for doing this.  The first is to share the report with my insurance company in case of a burglury and second is to have an inventory of what I already have in my library so I don't buy duplicates.  I have approximately 3000 CDs in total.
    Can anyone help me with this?

    With the music library open, File > Print > Song Listing (or Album Listing), and direct the output to a PDF file. 
    This will create a nice readable listing that you can store in a safe place.

  • Can I create a report at WAAS central manager based on server IP address

    Hi,
    I have two distinct applications running at port 8080 for which I would like to have separated performance reports at Central Manager. Is there any mean to do that by using server ip address for example? If so how? Do I need to change policy? If so is that the only way?
    Thanks
    Wilhelm

    Hi Rulix,
    The latest version of CR Server is 2008. Therefore I'm assuming you are using CR Server 2008.
    New in CR 2008 is the .NET report modification software development kit (SDK). The report application server (RAS) SDK is now available for users of Crystal Reports .NET API without the use of a RAS server. Report modification such as changing, adding, or removing database providers, or adding, removing, or creating report objects, parameters, formulas, and sections can be achieved by accessing the RAS SDK through the Crystal Reports .NET SDK.
    Java developers however receive the JRC and Java SDK documentation through the free Crystal Reports for Eclipse download. This product will be updated on a separate schedule from Crystal Reports.
    Further Information and samples are available in our [Developer Library|https://www.sdn.sap.com/irj/sdn/businessobjects?rid=/webcontent/uuid/5001d5de-f867-2b10-00bf-8d27683c85a0]
    Kind regards,
    Tim

  • Can't create simple report

    What does all this mean?
    ORA-20001: Unable to create report page. ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "FLOWS_010402.WWV_BIU_FLOW_HNT_TABLE_INFO", line 7 ORA-04088: error during execution of trigger 'FLOWS_010402.WWV_BIU_FLOW_HNT_TABLE_INFO'
    As a newbie to htmldb I am trying to creat my first litte report.

    this is the result of a known bug, alfreda. sorry about that. you can get around the issue by doing your application development in html db logged in as a user with a username that's less than or equal to 30 characters.
    regards,
    raj

  • How can I create a Report with the Report Generation Toolkit?

    Hi,
    I have installed Labview Report Gerneration Tool for Microsoft Office Version 1.1 and now I want to use MS Office Report Express VI but it need the VI "Dflt Data Dir.vi". I don't have this on my computer, why? Where can I get this VI? Can somebody help me?
    thanks Labprog

    Hello Labprog
    This VI should be located in the file.llb in the folder
    ..\vi.lib\utility. Thus, it is not part of the report generation
    toolkit but of LabVIEW. I am not sure why you are missing that file on
    your PC, maybe you just did not find it because it is hidden in a LLB.
    Maybe this LLB is not part of your LabVIEW package (Base, FDS, PDS).
    Anyway, I'll attatch that little VI, hoping that this is the only one missing.
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany
    Attachments:
    Dflt Data Dir.vi ‏11 KB

Maybe you are looking for

  • Ipod no longer recognized by itunes (on MAC)

    I am running a Mac 10.6.8 and since my last updates, my ipod is no longer recognized in itunes? Is there any conflictual extensions? PLEASE HELP? What do i have to do?? Thanks

  • How to install Leopard from an external DVD reader?

    Hi, I've bought Leopard today. unfortunately, it's not yet installed on my PowerBook. As my SuperDrive is dead, I use now an external DVD (Lacie Portable DVD-RW), but it doesn't work. I can read the Leopard install DVD, but when it reboot, it reboot

  • Cash Journal Budgeting

    Is it possible to do planning/Budgeting for expense account cash journal number wise. I can understand that the planning/budgeting can be done in CO module but here we want if we have budget $ 1000 for Entertainment expesne then it will be utilized b

  • Incoming email settings on library

    Hi! I have a SharePoint 2013 foundation environment. on this environment i have enabled the incoming email settings and succesfully tested this on a library on the root of my site collection. When i create a subsite and add a new Document library, i

  • LSMW - TAX CLASSIFICATION FIELD

    Hi all, 1)I am uploading materials by LSMW - Direct input method. [5th step in LSMW(Maintain Field Mapping and Conversion Rules).] I would like to know the field name for mapping for <b>Tax classification</b> field in Sales Org 1 view of Materail Mas