Default event in classical reports

what is the default event in classical reports?
Regards,
pandu.

hi,
Let us take you developed a program then LOAD-OF-PROGRAM and INITIALIZATION  these will be fired first when running the program, before the selection screen, if there is one, is fired.
If there is a selection screen, AT SELECTION-SCREEN OUTPUT event will be fired automatically before the screen is shown.
Also, if there is a selection screen, the START-OF-SELECTION event will only be fired when the user clicks the "Execute" button on the selection screen.
TOP-OF-PAGE will automically be fired when you use the first WRITE statement as well as anytime the line count is reached.

Similar Messages

  • Events in classical report

    Hi Gurus,
    Please provide me the correct sequence of all possible events in a classical report.
    Thanks,
    Binay

    Hi,
    Events in Classical List Proceesing:
    When u start the Report:
    LOAD-OF-PROGRAM
    INITIALIZATION
    Before displayins Selection Screen:
    AT SELECTION-SCREEN OUTPUT.
    Before leaving Selection Screen:
    AT SELECTION-SCREEN.
    After processing Selection Screen when the List starts:
    START-OF-SELECTION.
    Before displaying the List .. After completing START-OF-SELECTION.
    END-OF-SELECTION.
    For Every page:
    TOP-OF-PAGE .
    END-OF-PAGE.
    For more details check this link -
    Events in Report
    Reward points if found helpful…..
    Cheers,
    Chandra Sekhar.

  • RELATED TO  CLASSICAL REPORT

    HI
    WHAT IS CLASSICAL REPORT??

    Hi,
    <b>Classical Reports:</b>
    These are the most simple reports. Programmers learn this one first. It is just an output of data using the Write statement inside a loop.
    Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.
    <b>Events In Classical Reports:</b>
    <b>INTIALIZATION:</b> This event triggers before selection screen display.
    <b>AT-SELECTION-SCREEN:</b> This event triggers after proccesing user input still selection screen is in active mode.
    <b>START OF SELECTION:</b> Start of selection screen triggers after proceesing selection screen.
    <b>END-OF-SELECTION:</b> It is for Logical Database Reporting.
    Pls do reward points.
    Regards,
    Ameet

  • WHAT ARE EVENTS IN A CLASSICAL REPORT ?

    WHAT ARE EVENTS IN A CLASSICAL REPORT ? PLEASE EXPLAIN THEM ?
    BEST REGARDS
    RYAN

    When u start the Report:
    LOAD-OF-PROGRAM
    INITIALIZATION
    Before displayins Selection Screen:
    AT SELECTION-SCREEN OUTPUT.
    Before leaving Selection Screen:
    AT SELECTION-SCREEN.
    After processing Selection Screen when the List starts:
    START-OF-SELECTION.
    Before displaying the List .. After completing START-OF-SELECTION.
    END-OF-SELECTION.
    For Every page:
    TOP-OF-PAGE .
    END-OF-PAGE.
    For more details check this link -
    Events in Report

  • Print LOGO in classical report printout

    Hi GURUS,
    Is it possible to take print of logo in classical report.

    refer this link:[click|http://tinyurl.com/5s22vp]
    the code is copied from that link.
    Make the changes in the code as given below.
    REPORT  zgb_prog06.
    * START OF DO NOT CHANGE***********************************
    DATA: docking TYPE REF TO cl_gui_docking_container,
          picture_control_1 TYPE REF TO cl_gui_picture,
          url(256) TYPE c .
    DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
          html_table LIKE w3html OCCURS 1,
          return_code LIKE  w3param-ret_code,
          content_type LIKE  w3param-cont_type,
          content_length LIKE  w3param-cont_len,
          pic_data LIKE w3mime OCCURS 0,
          pic_size TYPE i.
    * END OF DO NOT CHANGE*************************************
    DATA : sum(4) , num1(4) , num2(4).
    PARAMETERS: p_dummy(4) DEFAULT '4' .
    PARAMETERS: p_dummy1(4) DEFAULT '5' .
    AT SELECTION-SCREEN OUTPUT.                 "Remove this event
    START-OF-SELECTION.
    write 'Testing picture printing in classic report'.
    PERFORM show_pic.                                      "Add it here
    end-of-selection.
    *& Form show_pic
    FORM show_pic.
      DATA: repid LIKE sy-repid.
      repid = sy-repid.
      CREATE OBJECT picture_control_1 EXPORTING parent = docking.
      CHECK sy-subrc = 0.
      CALL METHOD picture_control_1->set_3d_border
        EXPORTING
          border = 5.
      CALL METHOD picture_control_1->set_display_mode
        EXPORTING
          display_mode = cl_gui_picture=>DISPLAY_MODE_FIT.
      CALL METHOD picture_control_1->set_position                      "change positions
        EXPORTING
          height = 70
          left   = 800
          top    = 20
          width  = 190.
    *CHANGE POSITION AND SIZE ABOVE***************************
      IF url IS INITIAL.
        REFRESH query_table.
        query_table-name  = '_OBJECT_ID'.
    *CHANGE IMAGE NAME BELOW UPLOADED IN SWO0******************
        query_table-value = 'ZLOGO'.
        APPEND query_table.
        CALL FUNCTION 'WWW_GET_MIME_OBJECT'
          TABLES
            query_string        = query_table
            html                = html_table
            mime                = pic_data
          CHANGING
            return_code         = return_code
            content_type        = content_type
            content_length      = content_length
          EXCEPTIONS
            object_not_found    = 1
            parameter_not_found = 2
            OTHERS              = 3.
        IF sy-subrc <> 0.
    *      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CALL FUNCTION 'DP_CREATE_URL'
          EXPORTING
            type     = 'image'
            subtype  = cndp_sap_tab_unknown
            size     = pic_size
            lifetime = cndp_lifetime_transaction
          TABLES
            data     = pic_data
          CHANGING
            url      = url
          EXCEPTIONS
            OTHERS   = 1.
      ENDIF.
      CALL METHOD picture_control_1->load_picture_from_url
        EXPORTING
          url = url.
    *Syntax for URL
    *url = 'file://D:\corp-gbanerji\pickut\cartoon_184.gif'.
    *url = 'http://l.yimg.com/a/i/ww/beta/y3.gif'.
    ENDFORM.                    "show_pic

  • Default printer in classic environment

    After upgrading to 10.4.4 the default printer in Classic is changed to the default printer in OSX.
    If I want to print from a Classic application the first time before the print dialog is displayed I get an error message stating that apple events are not supported or that desktop printing is not installed. In the printer dialog that shows up my appletalk printer with the name I have given the printer in OSX is shown and when I select the os9 name printing is fine until classic restarts.
    How can I select the default printer from wihtin Classic?

    Guys, this should be a software problem with the system, so we should expect it would happen with all printers, with a Brother printer and also with a LaserWriter Pro (10+ years old!) but assuming that Cube does have identical symptoms to Erik there are at least two things going on here.
    What it defaults to should be quite separate from those errors for AppleEvents and desktop printing software 2.0. Those seem to be about whether something is configured corrctly, not about what's selected.
    If this is always solved by reselecting the correct printer, I'd grin and bare it.
    However, with no other symptoms, those errors suggeset a mismatch or misconfiguration.
    Some printers are much more fussy than they should be about the version of LaserWriter, and of auxilliary printing Extensions certainly including PrintingLib. The natural assumption is that the latest version will cover everything, but I've met printers which required downgrades…
    Although I haven't seen this recently, for early Classic some printers needed their 9 drivers installing once while booted in pure 9, then again while running Classic over X - and if that's your case I hope your Macs are old enough to boot in pure 9.
    With or without that, it may simply matter which order 9 and X drivers are installed in.
    Again, are you using third-party RIP software? I don't know that desktop printing software 2.0 refers to anything from Apple and some time ago there was a spate of reports by people using a third-party utility with a name too like that to ignore, which no-one could find anywhere on the web but which turned out to refer to a third-party RIP that did work with 9 but never with Classic.
    Meanwhile my Classic 9.2.2 over 10.4.4 on my G4 DP 1K defaults to the X printer but so does Classic 9.2.2 over 10.4.3 on my Titanium lappie, which seems to indicate this is not a 10.4.4 thing though I don't remember how the G4 behaved on 10.4.3 (and if I'd seen Cube's message one minute later, I would already have started the 10.4.4 updater running on the lappie. Phew!)
    I very much doubt that can be solved: I suspect it's a design fault in the way Classic and X communicate and in my case I change printers so often that again, checking Chooser one extra time is hardly noticable.

  • How to get add/edit button in classic report

    Hi,
    Iam trying to built a classic report,but here i need to have add/edit button.How can i achieve this in classic reports?
    I know this add/edit button with a pencil on note will come through the interactive report.
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page.Here he created a classic report with alternating rows but has an add/edit button to it.How could that be achieved??
    Can Anyone help me in this regard to built the My orders page including the add/edit navigation getting to order for items.How can tat sample application of My orders built?
    TIA,
    Regards,
    Kranthi.
    Edited by: Kranthi.K on Sep 29, 2009 12:38 AM

    One more doubt is
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page and when we hit add/edit image it directs us to the My orders info and order items.
    How can we build that page of My orders info and order items.Can anyone guide me through the steps the sample is created.
    I tried many times with master detail,but dint achieve what the default Sample Application has been done.
    Thanks in Advance
    Edited by: Kranthi.K on Sep 29, 2009 4:54 AM

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
    I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
    for jquery selector. Would appreciate any help or direction???

    Thank you for your response. I am very new to Jquery so don't understand all that well.
    What I did:
    I created a dynamic action
    Event: Click
    Selection Type: jQuery Selector
    jQuery Selector: tdheaders
    Created True Actions
    I created an alert to see if this is being executed.
    Alert 'I made it here'
    What I have:
    I created a report region with the following query:
    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    I created 'SELECT' column as Link Column
    Report Attributes
    Link Text Select
    Target Page in this Application
    Page 2
    Region Header
    <div id="ModalForm2" title="Employee List" style="display:none">
    Region Footer
    </div>
    This report is displayed in a modal form when a button is clicked.
    Code for modal window in Page Header
    <script type="text/javascript">
    $( function() {
    $('#ModalForm2').dialog(
    { modal : true ,
    autoOpen : false ,
    buttons : {
    Cancel : function() {
    closeForm2();
    function openForm2()
    $('#ModalForm2').dialog('open');
    function closeForm2()
    $('#ModalForm2 input[type="text"]').val('');
    $('#ModalForm2').dialog('close');
    </script>
    I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
    back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
    If I let the submit to happen, all other entered fields are cleared on my main form.
    Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.

  • Classical Report on clicking button on ALV Report

    I have a requirement where I have to display a classical report based on the user-click on a "custom button" on my ALV. I am unable to display the classical report. Please help with code example..

    Hi,
    See the example.Change the code according to your requirement.
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 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.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Pls. reward if useful...

  • Print Logo in Classic Report (Write Method,Not ALV)

    Hi All,
    I'm currently doing conversion of the All the Classic Report with addition of Header with 'LOGO'.
    I'm willing to find out that Function (CALL FUNCTION 'WWW_GET_MIME_OBJECT') is only able for display but not show out during printing.
    Is that any method, I can do it(Print with Logo) without conversion to SAP Script or Smartform that was exhausted.
    *Please take note is Classic Report with Write Method (Line by Line), Not ALV.
    Thank you all in advance
    Regards,
    Trevor Wong.

    Hi,
    It is possible to include logo in classical report but its not possible to print logo in classical report. It can be done in ALV's.
    Write  the code in Top-of-page event in ALV.
    The following is the code for inserting the logo in ALV.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
               I_LOGO             = 'ENJOYSAP_LOGO'
                IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.
    Regards
    Purnand

  • How to Link column header only in classic Report in APEX 4.1

    Hello Everybody,
    Probably there is a simpler way to do this, but I am not sure. I want a link on column header in Report on a specific column. The link will take me to new region or a page.
    How to achieve this in APEX 4.1
    Theme : Blue 2
    Database 11g
    I see there is a column link opiton, but that creates link for every row in that column on a specific icon, I just want link on a title of the column in Classic Report.
    For Example,
    if there are two columns Name and Client ID, which has 10 records to display on a classic report. I wan the link on Client ID on header only not on the records.
    Can anybody provide some simple solution for this.
    Thanks,
    --CP
    Edited by: cpora007 on Jun 22, 2012 10:38 AM

    Hello,
    I didn't understand, what do you mean by default it is going to sort popup. I have a classic report based on SQL, which generates a report with static header, there is no sort or any other link on that.
    I added a link in column header name with an anchor. It works and takes to the new page.
    But it is not a proper solution. A solution based on Jquery dynamic action is preferable. Also the preferred option is that the link opens a hidden region of the same page at the same location of the report and the report gets hidden. after the procession on the form region and submitting the update/ insert process. the report region shows up with the change data.
    Moving on to new page is 2nd option, if the first do not work.
    In the JavaScript, put: apex.submit("GO_TO_MY_OTHER_PAGE");
    On the page, create a Branch to the Second page. Set the condition to Request=Expression 1. Set the request to "GO_TO_MY_OTHER_PAGE"
    On which page I need to create a branch?, Is it on the report page or the form page.
    Thanks a lot for the response. I appreciate your kind efforts in this regard.
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Triggering END_OF_PAGE IN CLASSIC REPORT

    Hi Experts,
                          I have one classical reporting in that END_OF_PAGE is not Triggered At last Page due to Less No of Records in last Page,can anyone
    tell me how to trigger END_OF_PAGE  . i want to display the page total for every page but for last page i cant display Page total Due To Less
    No Of Records can any one suggest how  to solve this problem.
                                                                                                                                                                      Thanks in advance.

    Hello,
    If you read F1 help, it is mention as below.
    Effect
    This statement defines an event block that is raised by the ABAP-runtime during creation of a basic list, if there is a line reservation in the addition LINE-COUNT of the initiating statement for a page footer, which was reached while writing to this page. A list output that takes place in the event block, is placed in this area. Output statements that exceed the reserved area will be ignored.

  • Checkbox in classic report

    I have question about checkbox in classic report.
    I need to choose only one checkbox in every row, hot to ensure that only one checkbox can be checked at same time?
    Checkboxes are defined in SQL query as:
    apex_item.checkbox(1,msisdn,'UNCHECKED') as clear,
    apex_item.checkbox(2,msisdn,'UNCHECKED') as to_analysis,
    apex_item.checkbox(3,msisdn,'UNCHECKED') as to_barring
    here is the picture:
    http://www.deviantpics.com/images/mNgGR.jpg
    Tnx!

    amend your api calls to add onclick event to every checkbox column
       apex_item.checkbox(1,msisdn,'UNCHECKED onclick="chkckbox(1,this);"' ) as clear,
       apex_item.checkbox(2,msisdn,'UNCHECKED  onclick="chkckbox(2,this);"') as to_analysis,
       apex_item.checkbox(3,msisdn,'UNCHECKED  onclick="chkckbox(3,this);"') as to_barringCreate a javascript function in your page header > Javascript
    function chkckbox(pId, pThis) {
    //get current row index
        var currIndex = $('input[name="f0'+pId+'"]').index(pThis);
         if (pThis.checked) {
       //simply uncheck other check boxes
              if (pId == 1) {
                   $('select[name="f02"]')[currIndex].checked = false;
                   $('select[name="f03"]')[currIndex].checked = false;
              } else if (pId == 2) {
                   $('select[name="f01"]')[currIndex].checked = false;
                   $('select[name="f03"]')[currIndex].checked = false;
              } else if (pId == 3) {
                   $('select[name="f02"]')[currIndex].checked = false;
                   $('select[name="f03"]')[currIndex].checked = false;
    }Please note that I have not tested this code but it should work, if you have any problem just try debugging using console.log

  • How to Get checkbox value when List value changed in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    regards
    Ahmed

    Hi Ahmed,
    >
    i worked with apex 4.2 and i create normal classic report with one checkbox column and one column change it to select list(named loved) now i want when user change list
    take value of checkbox item and show it in message .
    SQL for report
    SELECT
    '<INPUT TYPE="checkbox" NAME="f01" VALUE="'
    ||SEQ
    ||'">' SEQ,
    ID,
    DEPT_NO,
    EMP_NAME} i change the column attributes of Dept_NO to Display as Select list of department name (named lov).
    >
    You should not create checkboxes like this. Either use the APEX_ITEM.CHECKBOX2 API or change the Column Type to Simple Checkbox.
    >
    now i want when user change name of department the value of SEQ SHOW IN ALERT MESSAGE
    i create JavaScript on the page
    function test(pThis) {
    var f01_value = $('select[name="f01"]').value;
    alert('#SEQ : '+ f01_value);
    </script>
    >
    name="f01" returns an array, what you need is single element value.
    Try
    <script type="text/javascript>
    function test(pThis) {
      var f01_value = $v(pThis);
       alert('#SEQ : '+ f01_value);
    </script>
    {code}
    {quote}
    I call this javascript function when list change but the value undefined..
    My Question :
    How can get this value Or any value of item in reports
    {quote}
    Depends in how you are invoking/triggering the change event. Are you using DA or have you written an "onchange" event on the element?
    Cheers,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need help on classical report

    hi friends i need help on classical reports,
    sold-party,
    material
    sales and distrubitutation channel ,division,
    incoming orders,order number,invoice ,credit,
    i need sub totals and final total of invoice and each customer should display in new page .

    Hi
    Use the Tables KNA1,VBAk,VBAP,VBRK and VBRP and design the report
    see the sample report using KNA1,VBAK and VBAP.
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for