Do we write classes in abap seperately from the main program

For instance following class is designed to capture the click of hotspot and double clicks from a screen layout.  immediately I need it.Thanks everyone.
Where should I put such a code?
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
*--Hotspot click control
handle_hotspot_click
FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id e_column_id es_row_no ,
*--Double-click control
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column es_row_no.
PRIVATE SECTION.
ENDCLASS.
CLASS lcl_event_handler IMPLEMENTATION .
*--Handle Hotspot Click
METHOD handle_hotspot_click .
PERFORM handle_hotspot_click USING e_row_id e_column_id es_row_no .
ENDMETHOD .
*--Handle Double Click
METHOD handle_double_click .
PERFORM handle_double_click USING e_row e_column es_row_no  .
ENDMETHOD .
ENDCLASS .
FORM CREATEOBJECT.
DATA gr_event_handler TYPE REF TO lcl_event_handler .
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
SET HANDLER gr_event_handler->handle_hotspot_click FOR gr_alvgrid .
ENDFORM.
FORM handle_hotspot_click USING i_row_id TYPE lvc_s_row
i_column_id TYPE lvc_s_col
is_row_no TYPE lvc_s_roid.
READ TABLE zbficheentry_list2 INDEX is_row_no-row_id .
IF sy-subrc = 0." AND i_column_id-fieldname = 'SEATSOCC'.
CALL SCREEN 200 . "Details about passenger-seat matching
ENDIF .
ENDFORM .
FORM handle_double_click USING i_row TYPE lvc_s_row
i_column TYPE lvc_s_col
is_row_no TYPE lvc_s_roid.
READ TABLE zbficheentry_list2 INDEX is_row_no-row_id .
IF sy-subrc = 0." AND i_column-fieldname = 'SEATSOCC' .
CALL SCREEN 120 . "Details about passenger-seat matching
ENDIF .
ENDFORM .

Hi,
Check the link,
Re: hotspot
Regards,
Azaz Ali.

Similar Messages

  • Accessing Classes From the Main Program:

    Hey Guys if you want to take a crack at this: I'm not sure how to exaclty get the classes read into my program and stuff. So I dunno if not don't worry. And Also ther'es no need to insult me.
    * just copy this into any editor
    import java.io.*;
    import java.text.*;
    class Liststuff
    public class Node
    char info;
    Node next;
    public class listException extends Exception
    public listException(String message)
    super(message);
    class Queue
    private Liststuff.Node front;
    private Liststuff.Node rear;
    public Queue()
    front = null;
    rear = null;
    public boolean isEmpty()
    return (front == null);
    public void insert(char v)
    Liststuff.Node n = new Liststuff.Node();
    n.info = v;
    n.next = front;
    if (rear == null)
    front = n;
    else
    rear.next = n;
    public char Remove() throws Liststuff.listException
    char v;
    if (isEmpty())
    throw new Liststuff.listException("Nothing in OrigQue.");
    else
    v = rear.info;
    rear = rear.next;
    return (v);
    class Stack
    Liststuff.Node top = new Liststuff.Node();
    public Stack()
    top = null;
    public void push(char v)
    Liststuff.Node n = new Liststuff.Node();
    n.info = v;
    n.next = top;
    top = n;
    public char pop() throws Liststuff.listException
    char v;
    if (isEmpty())
    throw new Liststuff.listException("Stack underflow.");
    else
    v = top.info;
    top = top.next;
    return (v);
    public boolean isEmpty()
    return (top == null);
    class Deque
    private Liststuff.Node front = new Liststuff.Node();
    private Liststuff.Node rear = new Liststuff.Node();
    private Liststuff.Node f = new Liststuff.Node();
    public Deque()
    front = null;
    f = null;
    rear = null;
    public void insert(char v)
    Liststuff.Node n = new Liststuff.Node();
    n.info = v;
    n.next = front;
    if (rear == null)
    front = n;
    else
    rear.next = n;
    public char remove(char side) throws Liststuff.listException
    char v;
    if (isEmpty())
    throw new Liststuff.listException("Nothing in OrigQue.");
    else
    f = rear;
    if (side == 'R')
    while (f.next != front)
    f = f.next;
    v = front.info;
    front = f;
    else
    v = rear.info;
    rear = rear.next;
    return (v);
    public boolean isEmpty()
    return (front == rear);
    public class Prog8
    public static void main(String args[]) throws IOException, Liststuff.listException
    String line;
    int i;
    char t;
    Liststuff s = new Liststuff();
    BufferedReader br = new BufferedReader(new FileReader("numbers.txt"));
    line = br.readLine();
    StringCharacterIterator c = new StringCharacterIterator(line);
    while (line != null)
    for (i = 0; i <= c.getEndIndex(); i++)
    Liststuff.Queue Orig = new Liststuff.Queue();
    Liststuff.Stack Evenstk = new Liststuff.Stack();
                   Liststuff.Deque Oddque = new Liststuff.Deque();
                   Liststuff.Queue Final = new Liststuff.Queue();
    t = c.current();
    char v = (t);
    c.next();
    Orig.insert(v);
    line = br.readLine();
    if ((v % 2) == 0)
    Evenstk.push(v);
    else
    Oddque.insert(v);
    Final.insert(Evenstk.pop());
    while (!Oddque.isEmpty())
    Final.insert(Oddque.remove('R'));
    Final.insert(Oddque.remove('L'));
    System.out.print("Original Sequence: ");
    while (!Orig.isEmpty())
    System.out.print(Orig.Remove());
    System.out.print("New Sequence: ");
    while (!Final.isEmpty())
    System.out.print(Final.Remove());
    }

    hi mate
    System.out.print("Original Sequence: ");
    while (!Orig.isEmpty())
    System.out.print(Orig.Remove());
    System.out.print("New Sequence: ");
    while (!Final.isEmpty())
    System.out.print(Final.Remove());
    thats you wacky code remember its insult free comments
    well here the best way to do it
    for Final.insert(Oddque.remove('R'));
    System.out.print("Original Sequence: ");
    while (!Orig.isEmpty())
    System.out.print(Orig.Remove());
    while Final.insert(Oddque.remove('L'));
    System.out.print("New Sequence: ");
    while (!Final.isEmpty())
    System.out.print(Final.Remove());
    else bla bla bla
    hope it cann hep though i dont whats is the problem
    and be clear you question.

  • How to call a function in a class from the main timeline?

    Hey Guys
    I have a project in Flash with four external AS files, which are linked to items in the library using AS linkage.
    What I want to do is call a function in one of these files from the main timeline, how would I go about doing this? I'm not currently using a document class, most of the code is in Frame 1 of the main timeline.
    Thanks

    // change type to the class name from the instance
    ClassNameHere(this.getChildByName('instance_name')).SomeFunction();

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • Accessing properties of loaded WindowedApplication from the Main WindowedApplication.

    Hi Friends.
    I am trying a project and according to my plans I am trying
    for some thing but don't know is it possible..
    I am compiling multiple air applications and One of them will
    be the main application. and another will not be actually *.air but
    the compiled swf file.
    In my final Air package I am going to package the Main
    application withe the other swf file too.
    So the main application will load the second swf file on
    requirement.
    Now my issue is i am able to access properties/functions of
    main application from the loaded WindowedApplication but I am not
    getting the idea how to access the loaded WindowedApplication
    properties/function from the MAIN application..
    This i am doing Because I can later Modify only the other
    application with out EFFECTING the MAIN.. like software updates..
    But getting the issue... Local Connection is Success. but
    still I want to establish a direct connection between the two
    WindowedApplications so to avoid lots of code what we write for
    LocaConnection objects.
    Please Give me any idea.

    I'm not sure how successful you will be with this in the long
    run. The WindowedApplication component is meant to be used as a
    singleton.
    If your goal is simply to modularize your code, you might be
    better off creating components that your main application loads,
    rather than trying to create multiple separate AIR applications and
    then combining them.

  • After updating my iphone 5 of ios 7, I delete or trash my emails rorm my inbox and they pop back up in my inbox.  How do I fix this?  They are deleted from the main server but show up in my email on my phone and will not stay deleted.

    I recently updated my iphone 5 to IOS 7 and since doing this, i cannot get my email messages to stay deleted when I trash them.  They have been deleted from the main mail server but show up on my phone.  When I trash them, they disappear for a few seconds and then re-appear in the inbox. I tried deleted my mail account from my phone and re-adding it, but this worked for about 12 hours and now its doing it again. I also have shut my phone off and rebooted it but this did not work.  How do I fix this?

    Have you tried restarting or resetting your iPhone?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).
    Also consider deleting and reinstalling the Mail Account in question.

  • Mac won't take power from the mains

    Hi,
    I just bought my MacBook two days back. I'm already finding a few things crashing, but my main headache is that its currently refusing to take power from the mains. I take out the power chord and put it back in... nothing. I've tried restarting - no go. I've changed socket, no difference (the sockets are working fine). I noticed that the MagSafe Power Adaptor was pretty hot when I first spotted this problem. Any ideas?
    Cheers,
    Robin

    Hi robin
    All I can offer is to keep doing what you're doing that's kept it going up till now - whatever that is? As soon as you've got time take it back.
    I find it slightly strange that you're prepared to risk 'some urgent work' using something that's clearly having a problem? However if it's all you have then I suppose you have no choice? If there's enough 'juice' to let you complete whatever it is you need to do and if you've a memory stick or can burn a CD/DVD then I would look at those options once you've done the work.
    You never know?
    Tony

  • I have 2 Macs - an iMac that holds my entire iPhoto library and a Mac Book Pro that I use to hold a subset of the main library - how can I transfer photos and their metadata from the main library of the iMac to my Mac Book?

    I have 2 Macs - an iMac which holds my main iPhoto library and a Mac Book Pro which holds a subset of the library. How can I transfer photos and their metadata from the main library to the smaller 1 on the Mac Book Pro?

    Link the two Macs together and use iPhoto Library Manager
    Regards
    TD

  • How can I delete an item from the main left column of iTunes?

    I'd like to delete an item from the main left hand column in iTunes (the column containing the main headings LIBRARY, STORE, SHARED, PLAYLISTS etc etc). Under the first heading 'LIBRARY' appear the items Library, Music, Movies, iTunes U, Books, Apps and Ringtones. I'd like to remove the item "Library" from that list - it appears immediately after the heading "LIBRARY" and serves no purpose whatsoever. (Neither does it appear to cause any harm, I must say, just a nuisance.) This item does not appear in any of the iTunes viewing options or controls lists. Neither does it appear in iTunes in the other accounts on my Mac and I have yet to see it any other iTunes on any other Mac.
    I've upgraded since about iTunes 8 assuming the problem would eventually disappear through the upgrades but it hasn’t, even through all the providedupgrade increments available for iTunes.
    I'm assuming it's from something I've installed in my main user account at some stage and it entered this item in the iTunes app. But I can't see how to remove it. The only things I can remember installing are "iTunes Batch Column Renamer" and "Join Together", both if which are just Scripts and which I use fairly regularly, but I don't recall either of them installing that particular item.
    Is there any folder I can navigate to to edit the list of items in that main left hand column of iTunes?
    Many thanks in advance for any help offered.

    on second thought, that you have an item "library" is indeed odd - there shouldn't be.
    suggest you try removing iTunes completely (click here and follow the instructions), then reinstall it using the standalone installer from here: http://www.apple.com/itunes/download/.
    note this will not do anything to your media files, playlists, ratings, etc.
    btw, you didn't install any 3rd party tools like this script:
    Change Hidden iTunes Preferences v2.4 
    This application will allow you to invoke hidden iTunes preferences:
    Show "Library" playlist
    Changing view setting is global
    Allow half-stars in ratings
    Hide "Ping" buttons
    Show/hide arrow links -- to either search the iTunes Store or search your library
    Load complete iTunes Store preview before playing
    Create playlists for purchased song collections
    Play songs while importing or converting
    Create file names with track number
    Maintain grid view for Search results
    Option-click zoom button for Mini Player&
    Show buttons horizontally
    Message was edited by: Jolly Giant

  • How to add a privacy page and exclude it from the main menu, but include in links at the base

    adding a privacy statement page and excluding it from the main menu, but including in links at the base of site

    Right click on the page in Plan view and choose to exclude from menus. This will take it off your main nav.
    For your bottom nav, change the menu to manual and add the privacy page manually.

  • Get data in a subreport based on a shared variable from the main report.

    Goodd morning,
    My question/problem is how to manage this scenario.
    I am transfering 2 shared variables (pereiod from /period To, ) from the main report to a subreport and now  i would like to get data in this subreport based on these 2 variables...
    The problem is that i can not find the shared one in select expert icon...
    Could anyone point me to solve this issue?
    Thks for any help.
    Jose Marin
    Crystal Report XI SR3

    Hello Jos,
    I recommend to post this query to the [Crystal Reports Design|SAP Crystal Reports; forum.
    This forum is dedicated to topics related to the creation and design of Crystal Report documents. This includes topics such as database connectivity, parameters and parameter prompting, report formulas, record selection formulas, charting, sorting, grouping, totaling, printing, and exporting but also installation and registering.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports Design queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • I have the latest version of Itunes downloaded and installed to my computer.  I have a music library already created for my replaced Ipod Nano.  I've just purchased a new Nano.  When I try to access the Itunes store from the Itunes program, it gets hung u

    I have tried uninstalling and reinstalling Itunes, but it still gets hung up when trying to access the Itunes Store from the Itunes program.
    I've been unable to register the new Nano or sync it with my library.

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • When I tgry to drop a video from the main screen to a time line with no secuence i receive an error with no number, just tell me the progran stop working and the program closes can you help me please

    please someone who help me please
    when I tgry to drop a video from the main screen to a time line with no secuence i receive an error with no number, just tell me the progran stop working and the program closes

    You need to help us first ...
    Computer specs:
    OS, CPU, RAM, GPU, vRAM ... and also disc layout & connections can be useful (as in, "2 internal hard-drives and an external on Thunderbolt connection for exports")
    Program specs:
    Specific build of Premier Pro from the bottom of the "About" splash screen off the "Help" menu is best.
    Footage file type: MXF, AVCHD, MOV, m2s, what?
    Even the camera it was shot on can be of interest at times.
    And did you use media browser to import, then project panel to drag & drop?
    Neil

  • The bottom rubber case of my macbook 13" late 2009 has expanded and has detached from the main body..As i'm not presently under warrantty i wanted to know will the repair be free of charge for me. I had once got it replaced for free but in warranty.

    The bottom rubber case of my macbook 13" late 2009 has expanded and has detached from the main body..As i'm not presently under warranty i wanted to know will the repair be free of charge for me. I had once got it replaced for free but in warranty. As i read some where in the support that apple had agreed with the defect and had decided to replace the bottom covers without any charge. And even if i'm charged for it what will be the amount  will hav to pay for it..
    Thankx

    Hi,
    Here's the Bottom Case Replacement Link
    http://www.apple.com/support/macbook-bottomcase/
    It doesn't answer your specific questions about cost... but it does advise to contact an Apple Store or an AASP...
    Anyway have a look at it... if you haven't already..
    Cheers and Good Luck...

  • I'm using a Dell Inspiron 7520 ... pretty new. Sometimes when I download a CD / album to my library acouple of tracks get separated away from the main group. I've tried to click and drag the stragglers over to the main group but it doesn't work. Any Ideas

    .When installing a CD/album into my library some of the tracks get separated away from the main group of tracks. I try to click and drag the stragglers to the main group but it doesn't work. My laptop is using Windows 8. My old XP laptop didn't have this problem. I'm not sure if that has any thing to do with it. Any ideas would be appreciated. It's more of an irritation than a problem but if it can be solved, it would be a good thing. Thanks!         Paul 

    Hey Paul,
    If I understand correctly, it sounds like iTunes is not grouping the songs from a particular CD together. The cause could be something as minor as a misspelling or slight variations. For more information, see the following resource:
    Why aren't songs with the same album art grouped together?
    http://support.apple.com/kb/TS1468
    Thanks,
    Matt M.

Maybe you are looking for

  • Safari in Lion keeps crashing when selecting a tab...

    Hi =) My Safari keeps crashing. I have two tabs open, just normal advertising websites for Amnesty. Everytime I try to select these tabs or when I quit these tabs or when I quit Safari (and Safari quits these tabs) it crashes.. And they keep coming b

  • Monthly Sales Order query Doc Status problem

    Hi Experts, I am having an problem while making a total monthly sales order query in which I am not getting the document status which are Open - Printed. Also note that these document which are open printed are not having any target document. SELECT

  • OBIEE 11g reports!

    Hello everyone! Can I get some help with the following scenario? My analysis show only first 500 rows. If I export the report to Excel then all the rows are exported. Is there a way I could increase the rows to be displayed in the analysis. Thanks fo

  • I can not update Elements 11 camera raw  8, , I said that already updated

    I see that Photoshop is updated camera raw (to 8), but  is camera raw 7.4 elements 11. I bought a new camera and I do not recognize the raw, however comes in the list of camera raw 8. Do I have a problem in my program to update?

  • ABAP certification exam...

    Hi SAP Experts Could any of u give any sample questions & answers for ABAP certification....please also let me know how to prepare for taking up ABAP certification exam... Or if u have any documents Do send it to this ID [email protected] Any general