The event   PRINT_END_OF_PAGEnot work

In my alv report the event PRINT_END_OF_PAGE not work. Thisis my code:
REPORT ZDEMO_ALVGRID2_SEMIAUTOMATIC.
*-- Global data definitions for ALV
*--- ALV Grid instance reference
DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
*--- Name of the custom control added on the screen
DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
*--- Custom container instance reference
DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
*--- Field catalog table
DATA gt_fieldcat TYPE lvc_t_fcat.
*--- Layout structure
DATA gs_layout TYPE lvc_s_layo.
*--- Internal table holding list data
DATA BEGIN OF gt_list OCCURS 0.
        INCLUDE STRUCTURE SFLIGHT.
        DATA field1(1).
   --In further sections, some additional fields will added here
   --for some functionality
DATA END OF gt_list.
*---Printing structure
DATA gs_print TYPE lvc_s_prnt.
gs_print-grpchgedit = 'X'.
gs_print-no_colwopt = 'X'.
gs_print-prntlstinf = 'X'.
gs_print-prnt_title = 3.
gs_print-reservelns = 2.
CALL SCREEN '0100'.
CLASS events DEFINITION                                              *
This class contains the methods responding to                        *
event PRINT_TOP_OF_PAGE                                              *
of the ALV Grid Controls                                             *
CLASS events DEFINITION.
  PUBLIC SECTION.
    METHODS:
                 print_top_of_page
                 FOR EVENT PRINT_TOP_OF_PAGE OF
                 cl_gui_alv_grid,
                 print_end_of_page
                 FOR EVENT PRINT_END_OF_PAGE OF
                 cl_gui_alv_grid.
ENDCLASS.
CLASS events IMPLEMENTATION                                          *
CLASS events IMPLEMENTATION.
  METHOD print_top_of_page.
    WRITE: / 'Grid Title after event PRIN_TOP_OF_PAGE parameter'.
    WRITE: ' gs_print-prnt_title = 3.'.
  ENDMETHOD.
  METHOD print_end_of_page.
    WRITE: 'The event PRINT_END_OF_PAGE has 2 rows reserved'.
  ENDMETHOD.
ENDCLASS.
DATA mlistener TYPE REF TO events.
MODULE display_alv OUTPUT
MODULE display_alv OUTPUT.
  PERFORM get_selection.
  PERFORM display_alv.
ENDMODULE.                    "display_alv OUTPUT
*&      Form  display_alv
      text
FORM display_alv.
  IF gr_alvgrid IS INITIAL.
  ----Creating custom container instance
    CREATE OBJECT gr_ccontainer
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5
        others                      = 6.
    IF sy-subrc <> 0.
    --Exception handling
    ENDIF.
  ----Creating ALV Grid instance
    CREATE OBJECT gr_alvgrid
      EXPORTING
        i_parent          = gr_ccontainer
      EXCEPTIONS
        error_cntl_create = 1
        error_cntl_init   = 2
        error_cntl_link   = 3
        error_dp_create   = 4
        others            = 5.
    IF sy-subrc <> 0.
    --Exception handling
    ENDIF.
  ----Preparing field catalog.
    PERFORM prepare_field_catalog CHANGING gt_fieldcat.
  ----Preparing layout structure
    PERFORM prepare_layout CHANGING gs_layout.
  ----Here will be additional preparations
  --e.g. initial sorting criteria, initial filtering criteria,
  --excluding functions
    CALL METHOD gr_alvgrid->set_table_for_first_display
      EXPORTING
        I_BUFFER_ACTIVE               = 'X'
      I_CONSISTENCY_CHECK           =
      I_STRUCTURE_NAME              = 'SFLIGHT'
      IS_VARIANT                    = <structure of type DISVARIANT>
      I_SAVE                        = 'A'
      I_DEFAULT                     = 'X'
        is_layout                     = gs_layout
        IS_PRINT                      = gs_print
       IT_SPECIAL_GROUPS             = i_fgroup
      IT_TOOLBAR_EXCLUDING          = <internal table of type
                                      UI_FUNCTIONS >
      IT_HYPERLINK                  = <internal table of type
                                      LVC_T_HYPE>
      IT_ALV_GRAPHICS               = <internal table of type DTC_T_TC
      CHANGING
        it_outtab                     = gt_list[]
        it_fieldcatalog               = gt_fieldcat
      IT_SORT                       = Ver en reporte ZRESD001
      IT_FILTER                     =
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
    IF sy-subrc <> 0.
    --Exception handling
    ENDIF.
    CREATE OBJECT mlistener.
    SET HANDLER mlistener->print_top_of_page FOR gr_alvgrid.
    SET HANDLER mlistener->print_end_of_page FOR gr_alvgrid.
  ELSE.
    CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
      IS_STABLE      = <structure of type LVC_S_STBL >
      I_SOFT_REFRESH = <variable of type CHAR01>
    EXCEPTIONS
      finished = 1
      OTHERS   = 2.
    IF sy-subrc <> 0.
    --Exception handling
    ENDIF.
  ENDIF.
ENDFORM.                    "display_alv
Extracts the necessary info for the layout
FORM get_selection.
  SELECT *
  INTO   gt_list
  FROM   SFLIGHT.
    APPEND gt_list.
    CLEAR  gt_list.
  ENDSELECT.
ENDFORM.                    "get_selection
Preparing field catalog manually
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
  DATA ls_fcat type lvc_s_fcat.
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
          i_structure_name = 'SFLIGHT'
      CHANGING
          ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
  IF sy-subrc <> 0.
Exception handling
  ENDIF.
  LOOP AT pt_fieldcat INTO ls_fcat.
      CASE ls_fcat-fieldname.
          WHEN 'CARRID'.
              ls_fcat-outputlen = '10'.
              ls_fcat-coltext   = 'Airline Carrier ID'.
              MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'PAYMENTSUM'.
              ls_fcat-no_out    = 'X'.
              MODIFY pt_fieldcat FROM ls_fcat.
      ENDCASE.
  ENDLOOP.
  CLEAR ls_fcat.
  ls_fcat-fieldname = 'FIELD1'.
  ls_fcat-coltext = 'Field 1'.
  ls_fcat-col_pos = 20.
  APPEND ls_fcat to pt_fieldcat.
ENDFORM.                    "prepare_field_catalog
Filling layout structure
FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
  ps_layout-zebra = 'X'.
  ps_layout-grid_title = 'Flights'.
  ps_layout-smalltitle = 'X'.
in the print my event PRINT_END_OF_PAGE does not have effect. How can i make to work this alv effect?
Thanks

Hello,
To print end_of_page please check whether you are
doing or not.
*===============================================================
* LOCAL CLASSES: Definition
*===============================================================
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
* § 2. Define a method for each print event you need.
    METHODS:
     handle_top_of_page
        FOR EVENT print_top_of_page OF cl_gui_alv_grid,
  handle_end_of_list
        FOR EVENT print_end_of_list OF cl_gui_alv_grid.
  PRIVATE SECTION.
ENDCLASS.
* LOCAL CLASSES: Implementation
*===============================================================
* class c_event_receiver (Implementation)
CLASS lcl_event_receiver IMPLEMENTATION.
*§ 3.Implement your event handler methods. Use WRITE to provide output
  METHOD handle_top_of_page.
*  Print Top-of-page
    PERFORM print_top_of_page.
  ENDMETHOD.                           "handle_top_of_page
ENDCLASS.
*&      Form  PRINT_TOP_OF_PAGE
*       To print top-of-page
FORM print_top_of_page.
* Report header
  write : 'Top-Of-Page'.
ENDFORM.                    " PRINT_TOP_OF_PAGE
* Registering events
    CREATE OBJECT dg_event_receiver.
       SET HANDLER dg_event_receiver->handle_top_of_page FOR dg_grid1.
Try this and let me know if you have any isues.
Thanks&Regards,
Siri.

Similar Messages

  • How does the event structure work & ...

    How does the event structure work & and how to modify the case example if you want to change the name of the case? I haven't a look at the manual but nothing about event structure is mentioned.

    I know how it works.. =P

  • Does the Event Structure work with cRIO?

    Basic question, I know, but I did search.  Honest!  LabVIEW lets me drop an Event Structure in code targeted for cRIO, but so far it's not working.  Is there a secret?  Or is it that event structures don't work with cRIO?  TIA!
    Jeff

    Jeff,
    According to these two NI documents,  RT targets support the Event Structure only with dynamic events.
    http://zone.ni.com/reference/en-XX/help/370622F-01​/lvrtconcepts/rt_unsupportedets/
    http://zone.ni.com/reference/en-XX/help/370622F-01​/lvrtconcepts/rt_unsupportedvxworks/

  • Does the EVENTS link work for anyone else?

    SInce this weekend, I can no longer go the events page (e.g. to register for "NI week".). Is it just me?
    ... and yes, I tried deleting the NI cookies....
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    EventRedirectLoop.png ‏46 KB

    Here's the error I just got using Firefox.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Help need on the event count parameter of signatures

    hi all i have a little confusion abt the event count parameter in the signatures.
    i am not sure whether this parameter is for firing the signatures or for writing the events to the event store.
    by default the event count is set to 1.
    if i set the event count to 5 for a particular signature.
    say for icmp echo request. if i set the signature event count to 5 within 10 seconds interval. and the signature action is to deny the packet inline.
    then when the first icmp echo request is send will the signature be fired i mean will the packet be dropped.
    or the packet will be dropped only if 5 icmp echo requests are send within 10 seconds.
    can someone pls clear my doubt.
    regards
    sebastan

    You can configure the sensor as like you want the sensor to send an alert only if the same signature fires 5 times for the same address set. This is how the event count works.
    http://www.cisco.com/en/US/products/hw/vpndevc/ps4077/products_configuration_guide_chapter09186a00803eb031.html#wp1049108

  • Publish for Flash Player 11, video events not working

    I have a Flash project that I'm publishing in Flash Player 11 in hopes having better animation results with Flash Player 11's better rendering capabilites.
    However, my AS3 Video Events are now throwing errors. These two Event listeners throw the error.
    "Access of possibly undefined property COMPLETE through a reference with static type Class"
    "Access of possibly undefined property PLAYING_STATE_ENTERED through a reference with static type Class."
    videoOverlay_mc.video_mc.addEventListener(VideoEvent.COMPLETE, fnc_endOfVideo)
    videoOverlay_mc.video_mc.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, fnc_videoStart);
    If I publish as Flash Player 10.x the events & listeners work fine.
    I've been trying to find documentation on Flash Player 11 and what video events to use. Does anyone know where I can find this?
    The API's still shows the videoEvents, http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/VideoEvent.htm l
    Thanks in advance for your reply,
    Zak

    Kglad,
    My apologies. I rushed my reply.
    This worked:
    videoOverlay_mc.video_mc.addEventListener(fl.video.VideoEvent.COMPLETE, fnc_endOfVideo);
    videoOverlay_mc.video_mc.addEventListener(fl.video.VideoEvent.PLAYING_STATE_ENTERED, fnc_videoStart);
    function fnc_videoStart(evt:fl.video.VideoEvent):void {
    function fnc_endOfVideo(evt:fl.video.VideoEvent):void {
    I had to put the full event path in the function parameter as well otherwise I got a "Ambiguous reference to VideoEvent compile error".
    Thanks a lot for your help.
    Zak

  • Using multiple Google calendars through my iPhone, my work calendar treats my personal calendar like a separate account and won't let me modify the events from my phone.

    I have multiple calendars on my Google account, though I mostly use my work calendar and my personal calendar. The personal calendar is the main one attached to my Gmail account. My problem is that when I create an event on my work calendar, it registers it weirdly: it says that my work calendar invited "me" (my personal calendar) to attend. This means that I'm left with limited options, either to "accept" the event, which copies it from my work calendar to my personal calendar (not what I want, since I have two separate calendars for a reason), or "decline," which makes the event visible on my computer, but invisible on my iPhone.  I also can't modify any of these events from my phone - all I can do is RSVP. Since my schedule changes day to day and I need to add notes and constantly modify the events, this is a huge inconvenience and is having a negative effect on my work because it has led to my messing up appointments.
    Events have also been disappearing from my phone, despite the fact that they're visible on my computer, and I think that's because they're events of that type, where my work calendar somehow invited "me" to them, but they are hidden on my phone.  I have changed sharing permissions so that I am allowed to modify events in every way from every side, though it's really all on the same account, so I don't understand why this is happening.
    Has anyone been through a similar situation?

    Whenever a menu choice is grayed out, that is because you have Restrictions turned on in Settings.  Be sure to turn it off.
    You are confusing an itunes store account with an icloud account.  You two can continue using the same ID for itunes (thus sharing purchased music, apps, etc.), but you really should have separate accounts (different IDs) for icloud, since an account is intended for one user to keep his/her devices in sync.
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/
    Then go to Settings>icloud and scroll to the bottom of the screen and tap Delete Account.  (have restrictions turned off)  That will disconnect the device from the account but will not delete data in icloud or other devices.  Then sign in using the new ID.

  • Music in the event browser but it is not working in my video, can someone please explain this to me?

    Hi I've been working on a Mac fir less than a week now and I'm using Final Cut Pro X.
    For some odd reason my music isnt picking up in the timeline correctly, but is showing the audio file in the Event Library.
    There are to Macs where I work and they are copies of each other; so what happens on the one happens on the other. With this in mind  I duplicated the project and copied it onto the other Mac.
    The odd thing about it is that 3 out of the 5 audio clips just dont pick up in the timeline that it is in the event library but you can manually find them there.
    I would just like to know as how you can fix this, as I am working on a small project at the moment and if the project was bigger I would be in searious trouble.

    Please give the exact specifiations of the audio you're talking about? Is it compressed audio? It probably needs to be converted.

  • Play back video clip is not working in the event browser...

    Hello,
    I have a problem in the event browser only. If I place the skimmer in any clip and press the space bar, nothing happen. If I press the "play" arrow" it does not work neither nor through the presentation menu.
    The space bar shortcut to play works perfectly fine in the timeline, but not in the event browser.
    In order to preview a clip at normal speed (100%), I have to drag it in the timeline and play it wich is rather anoying.
    Any idea on how to correct this issue would be very much welcome.
    Thank you very much for your help.

    I was having this exact same problem.  I tried deleting the preferences, however that didn't work.  But, yes, when I switched the view from 'show viewers on second display', back to 'show on main display'... the spacebar worked again... then I switched back to showing the viewers on my second display, the original circumstance  (which is definitely my preference)... and so far it is working again.. doesn't seem like anything has been 'fixed', but hopefully this doesn't happen often.
    So thanks to this thread, as I had no idea what to do, and it was getting very annoying.

  • File history stopped working after a warning message in the event log

    I have encountered this twice that File history stopped working, the event log says:
    Unusual condition was encountered during finalization of a backup cycle for configuration C:\Users\xxxx\AppData\Local\Microsoft\Windows\FileHistory\Configuration\Config
    If I re-run it, it consumes the backup disk space but still failed to backup.
    I have to manually delete all backup, turn off File History and re-configure it again to make it work.
    This happened twice already, so all my file history lost after re-config.
    Anyone encounter the same situation?

    MICROSOFT is plagued by idiots!!!!
    - Just turn it off
    - then click  "select drive"
    - and when it asks you the retarded question... just click >>>>>"NO"<<<<<<<    -_-
    Seriously... this is the answer.... frigging retards at microsoft... to think it takes an army of programmers and billions of dollars to create such idiocy!
    http://answers.microsoft.com/en-us/windows/forum/windows_8-performance/cannot-change-drive-in-file-history-windows-8/6dbeca54-d05e-4f93-9262-45a56d6a82d1?page=2&msgId=f1792c5e-c5d0-4163-b449-c7165d72f88d&tab=question&status=AllReplies&status=AllReplies%2CAllReplies
    I cant believe these morons put everyone through such hell and then don't even bother to follow up with the correct solution.
    To top it of the moron moderator marks this as an answer??!!!
    What a pathetic joke - I hope everyone reads this message before being punished by the miles of bullcrap in this thread -_-
    Microsoft = ridiculous
    Thanks! I guess the TL;DR version is "to change your file history drive you need to discard the current temp files."
    Exactly :)
    It's the bad wording in the messages.
    the first message (which I can only vaguely remember so can't quote exactly) that gives you the impression you can continue
    something but doesn't make clear that to so will need the "old drive" configured the way the "old drive" was.
    Then the next message is just confusing:
    “we can't copy files to this location.  Your current File History drive is disconnected.  Reconnect the drive and try again” 
    sounds like 
    “we can't copy files to this location. [because there's a problem with the new location]
    Your current File History drive is disconnected. [the new location is disconnected]
    Reconnect the drive and try again [reconnect your new location and try again]” 
    When it should be reworded to say something along the lines of (in more formal language):
    "You asked us to continue...give us the drive you were previously using...or if it's no longer available, click here to start from scratch"
    (I know that's all the opposite of tldr but I'm trying again to put into words what I think was happening).

  • I imported about 300 RAW images yesterday and worked with them for about an hour. iPhoto locked up on me and I rebooted. After I did the event icon is now gray and it says there are no photos. I know the photos are there. Any idea how I can recover them?

    I imported about 300 RAW images yesterday and worked with them for about an hour. iPhoto locked up on me and I rebooted. After I did the event icon for that event is now gray and it says there are no photos. I know the photos are there. Any idea how I can recover them?

    a best practice to is to never have any computer program (including iPhoto) delete the photos from the card but to import the photos and keep them and then after at least one successful backup cycle has completed and then reformat the card --  I use three very large (32 GB) cards in rotation so I do not reformat for typically a year or more giving me one more long term backup of my photos
    Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library database
    LN

  • How the callback works in the events?

    Hi,
    I am in doubt that how the callback will occur internally?
    Consider i am having one delegate and one static event for it. 
    Ex:
    public delegate void raiseDelegate(String someDesc);
    public static event raiseDelegate callComlpetedEvent;
    And also Consider i am having 2 projects namely BMLayer and UILayer and all these above delegate and events are declared in the BMLayer and i having the reference to the BMlayer in the UILayer and "not vice versa".
    Now i am subscribing to that event in one of the class which resides in the UILayer. And i am raising the callCompletedEvent somewhere in the BMLayer
    and i am having the hit in the UILayer where i have subscribed.
    My question is:
    1. Whether the BMLayer's event will keep track the list of the subscriprions in the UILayer. If yes my another question is,
    i did not add any ref of the UILayer in the BMLayer. Then how the BMLayer will communicate back or how it will keep track of those callls.
    2. Or simply the UILayer will have the eye on that event which is in the BMLayer and automatically call the callback method.?
    Or any other point is happening?
    May i kindly know how it is working.!?
    Thanks in advance,
    NANDAKUMAR.T

    1. Yes BMLayer event will keep track of the list of subscriptions. It need not to know about the subscribers as only way UILayer or any other dependent layer can subscribe is to provide method with same signature of "raiseDelegate" delegate. So
    it always know how to call.
    You can assume event as list of method which BMLayer will call once the event is raised
    2. UILayer will no have eye on event, BMLayer automatically calls the callback method.

  • Serious problem: Imovie is working from the event but not from the project

    Hi,
    Related to my other post, I have discovered that Imovie seems to be working fine in the event library, but not in the project library.
    If I use the spacebar or play buttons in the event part, it shows the film in the right top screen or even in full screen mode.
    But if I click on my project, nothing works anymore.
    Sjoerd

    Hi
    Try to make a new User/account. Log into this. Have a re-try.
    How does it work now ?
    If OK. Go back to Your first account, Take move out iMovie pref file to the desktop
    Re.start iMovie.
    Works OK ?
    iMovie pref file resides:
    Mac Hard Disk (start-up HD)/Users/"Your account"/Library/Preferences and is named: com.apple.iMovie.plist
    While iMovie is NOT RUNNING - move this file out to desk-top.
    Now restart iMovie.
    Yours Bengt W

  • Is it possible to make is so that, immediately after I import a new clip into FCP, the file is automatically selected in the Event Library? (Similar to how After Effects and Premiere work).

    Is it possible to make is so that, immediately after I import a new clip into FCPX, the file is automatically selected in the Event Library? (Similar to how After Effects and Premiere work). Right now, after I import a new file, I have to then go searching for it amid all the other files in my project. It would be extremely helpful if the file I just imported was already highlighted and selected after import, making it instantly "locatable" and ready to go.

    Kryan73 wrote:
    …  after I import a new file, I have to then go searching for it amid all the other files…
    in a perfect world, you do know the recording date, and you simply scroll to that date.
    in a very perfect world, all your other imports are already tagged, so just have to create a smart list 'unrated' ...
    (I know those messy Events… a friend of mine constantly ignores my advice to check the time/date on his camera; on every battery swap, the cam creates a very erratic timestamp ... his actual recordings are listed as made in "2004" or in "2020" .... )

  • Developerproblem: i cant get the onkeyup event to work on the body tag in firefox how can i do this? this used to work in previous versions of firefox

    i made an application using DOM and i am using extensively keyup events in the body tag
    in previous versions of firefox this was working fine
    but now it doesnt
    events that do not work for body tags that i have used are
    onKeypress
    onKeydown
    how ever the event does fireup if the html element are of input types (e.g. textboxes, images, etc)
    how do i address this problem?

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

Maybe you are looking for

  • Windows 8 Consumer Preview and Adobe CS4

    I know this is pre-release, but am hopeful anyway. I've installed CS4 onto my Windows 8 CP installation but am having problems with several programs: Dreamweaver has a problem with 'Dreamweaver encountered problems while constructing the menus from t

  • Ipad sudden signal drop

    Hi suddenly just this week my iPad 2 seems to struggle getting a decent wifi signal, while my MacBookPro seems fine in the same location. So for example I get the full four bars on the MBP and just the one on iPad, side by side . This has never happe

  • Getting error in TNS connection from Oracle hosted on LINUX machine

    Hello, We moved our databases from Solaris to Linux servers. I am running one multithreaded process which creates a pool of db connection which are shared by threads. On moving to Linx db I am getting below error message [SERVERERROR] ORA-12520: TNS:

  • It's very urgent(WM)

    Hi Guru,    Can we post or can we do any goods movement without TR/TO ?

  • Populating select-options in the main view

    hi i have two views. main screen and view1. in main i have created a selection screen with 6 fields. view1 also has selection screen and same fields in it. when i go to view1 and click on ok button, i need to comeback to main view and populate the se