Event for ABAP Objects
Dear All,
Would you mind tell me the concept of the event in the ABAP objects.
Regards,
Luke
hI
Triggering and Handling Events
In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods - the handlers - react. This means that the handler methods are executed when the event occurs.
This section contains explains how to work with events in ABAP Objects. For precise details of the relevant ABAP statements, refer to the corresponding keyword documentation in the ABAP Editor.
Triggering Events
To trigger an event, a class must
· Declare the event in its declaration part
· Trigger the event in one of its methods
Declaring Events
You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement:
EVENTS ) TYPE type ..
To declare static events, use the following statement:
CLASS-EVENTS ... ...
It links a list of handler methods with corresponding trigger methods. There are four different types of event.
It can be
· An instance event declared in a class
· An instance event declared in an interface
· A static event declared in a class
· A static event declared in an interface
The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies.
For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler. You can either specify a single instance as the trigger, using a reference variable ...
The registration applies automatically to the whole class, or to all of the classes that implement the interface containing the static event. In the case of interfaces, the registration also applies to classes that are not loaded until after the handler has been registered.
Timing of Event Handling
After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling). If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
Handler methods are executed in the order in which they were registered. Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Similar Messages
-
What is the equivalent for 'On Change of' Event in ABAP OBJECTS?
What is the equivalent for 'On Change of' Event in ABAP OBJECTS? and how to use it in LOOP control?
hi,
There is no such Equivalent in OO ABAP.
You have to Raise your own Event within tha class checking the value of the field whose value is changing.
Regards
Sumit Agarwal -
Why and how to use events in abap objects
Dear all,
Please explain me why and how to use events in abap objects with real time example
regards
pankaj giriHi Pankaj,
I will try to explain why to use events... How to use is a different topic.. which others have already answered...
This is same from your prev. post...
Events :
Technically speaking :
" Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
Lets say you have an ALV - An editable one ...
Lats say - Once you press some button you want some kind of validation to be done.
How to do this ?
Raise an Event - Which is handled by a method and write the validation code.
Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
Where is the function code here ? No function code... But there is an event here - The data changed event.
So you can raise a data changed event that can be handled and will do the validation.
It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
Advantage with events : Event handlers can be in a separate class also.
e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
And these different classes for different Operation systems will have different code to raise a pop-up.
Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac they will catch this event and process accordingly.
May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
Cheers.
Varun. -
Hi,
Plz any one can send the materail for ABAP objects.hi,
ABAP OBJECTS :
check out this link
http://help.sap.com/saphelp_erp2005vp/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Please check this online document (starting page 1291).
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Also check this links as well.
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.futureobjects.de/content/intro_oo_e.html
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
check the below links lot of info and examples r there
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
General Tutorial for OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Have a look at these links for OO ABAP.
http://www.sapgenie.com/abap/OO/
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.allsaplinks.com/
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
SDN Series: https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Basic concepts of OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
go thru these links .
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
Check this for OOPS ALV tutorial.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Check these links
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
Hve a look at below link and go to page 1291. It will give you good info abt OO ABAP.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Please do check transaction ABAPDOCU to learn more about ABAP OO. There are lots of examples and explanations there. Also, do check sapgenie.com for more examples(under their ABAP OO link).
A very good option would be "ABAP Objects" written by Horst Keller.
This link gives all the OO ABAP definitions,syntax,examples:
http://www.erpgenie.com/abap/OO/
http://www.mydatabus.com/visitor.php?pt=downloadFile&tc=bzccGknF&cl=0053&cn=000005&f=012907
http://www.geocities.com/victorav15/sapr3/abap_ood.html
OOPS ALV tutorial.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
Sample programs:
http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
-->download the PDF from following link.
www.abap4.it/download/ALV.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Some more:
http://www.sap-hefte.de/download/dateien/1025/087_leseprobe.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
http://www.alvgmbh.de/dwnload/gonio_t.pdfhttp://
You can get all demo programs for ALV:
Go to se38 and type BCALV* and press F4 for all demo porgrams. -
What are events. how to create and handle this events.
HI,
By triggering an event, an object or a class announces a change of state, or that a certain state has been achieved.Events link objects or classes more loosely than direct method calls do. Method calls establish precisely when and in which statement sequence the method is called. However, with events, the reaction of the object to the event is determined by the triggering of the event itself.
Events are most often used in GUI implementations.Other external object models, such as COM, ActiveX Controls etc, also provide events.
At the moment of implementation, a class defines its instance events (using the statement EVENTS) and static events (using the statement CLASS-EVENTS)
Classes or their instances that receive a message when an event is triggered at runtime and want to react to this event define event handler methods.
Statement : (CLASS-)METHODS | FOR ALL INSTANCES.
Every object that has defined events has an internal table: the handler table. All objects that have registered for events are entered in this table together with their event handler methods.Objects that have registered themselves for an event that is still live also remain live. The methods of these objects are called when the event is triggered, even if they can no longer be reached using main memory references.
If several objects have registered themselves for an event, then the sequence in which the event handler methods are called is not defined, that is, there is no guaranteed algorithm for the sequence in which the event handler methods are called.
If a new event handler is registered in an event handler method for an event that has just been triggered, then this event handler is added to the end of the sequence and is then also executed when its turn comes.
If an existing event handler is deregistered in an event handler method, then this handler is deleted from the event handler method sequence.
Events are also subject to the visibility concept and can therefore be either public, protected or private. Visibility establishes authorization for event handling :
all users
only users within that class or its subclasses
only users in that class.
Event handler methods also have visibility characteristics. Event handler methods, however, can only have the same visibility or more restricted visibility than the events they refer to.
The visibility of event handler methods establishes authorization for SET-HANDLER statements: SET HANDLER statements can be made
anywhere
in that class and its subclasses
only in that class
Regards,
Balaji Reddy G
**Rewards if answers are useful -
Find the Wait events for an objects.
Hi Gurus.
I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
Below are the steps i have done.
1. find object_id for a table finding the wait events to that object_id.
SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
DATA_OBJECT_ID
82646
88518
84184
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
no rows selected
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
no rows selected
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
no rows selected
2. find the object id for the index of that table and finding the wait events to that object_id.
SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
DATA_OBJECT_ID
88655
SID EVENT WAIT_CLASS WAIT_CLASS#
1 rdbms ipc message Idle 6
2 heartbeat monitor sleep Idle 6
3 rdbms ipc message Idle 6
4 wait for unread message on broadcast channel Idle 6
6 SQL*Net message from client Idle 6
7 SQL*Net message from client Idle 6
8 SQL*Net message from client Idle 6
9 SQL*Net message from client Idle 6
10 SQL*Net message from client Idle 6
11 SQL*Net message from client Idle 6
12 SQL*Net message from client Idle 6
13 SQL*Net message from client Idle 6
1876 SQL*Net message from client Idle 6
1877 VKTM Logical Idle Wait Idle 6
1878 rdbms ipc message Idle 6
1879 rdbms ipc message Idle 6
1880 rdbms ipc message Idle 6
1881 SQL*Net message from client Idle 6
3200 SQL*Net message from client Idle 6
3210 SQL*Net message from client Idle 6
3212 db file sequential read User I/O 8
3213 SQL*Net message from client Idle 6
3214 SQL*Net message from client Idle 6
3216 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 SQL*Net message from client Idle 6
3757 SQL*Net message from client Idle 6
1326 SQL*Net message from client Idle 6
1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
1877 VKTM Logical Idle Wait Idle 6
1878 rdbms ipc message Idle 6
1879 rdbms ipc message Idle 6
1880 rdbms ipc message Idle 6
1882 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 rdbms ipc message Idle 6
3758 SQL*Net message from client Idle 6
3759 PX Deq: Execution Msg Idle 6
3200 SQL*Net message from client Idle 6
3210 SQL*Net message from client Idle 6
3212 db file sequential read User I/O 8
3213 SQL*Net message from client Idle 6
3214 SQL*Net message from client Idle 6
3216 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 SQL*Net message from client Idle 6
3757 SQL*Net message from client Idle 6
3786 SQL*Net message from client Idle 6
3787 SQL*Net message from client Idle 6
1 heartbeat monitor sleep Idle 6
2 wait for unread message on broadcast channel Idle 6
314 rdbms ipc message Idle 6
315 Streams AQ: qmn coordinator idle wait Idle 6
627 pmon timer Idle 6
628 rdbms ipc message Idle 6
629 Streams AQ: waiting for messages in the queue Idle 6
940 Streams AQ: waiting for time management or cleanup tasks Idle 6
941 VKTM Logical Idle Wait Idle 6
942 rdbms ipc message Idle 6
1253 rdbms ipc message Idle 6
1254 rdbms ipc message Idle 6
1256 Space Manager: slave idle wait Idle 6
1566 DIAG idle wait Idle 6
1567 rdbms ipc message Idle 6
1568 Streams AQ: qmn slave idle wait Idle 6
1879 rdbms ipc message Idle 6
1880 smon timer Idle 6
1881 rdbms ipc message Idle 6
2192 PING Idle 6
2193 rdbms ipc message Idle 6
2194 rdbms ipc message Idle 6
2505 rdbms ipc message Idle 6
2506 rdbms ipc message Idle 6
2818 rdbms ipc message Idle 6
2819 rdbms ipc message Idle 6
2821 PX Deq: reap credit Other 0
3131 DIAG idle wait Idle 6
3132 jobq slave wait Idle 6
3444 rdbms ipc message Idle 6
3445 jobq slave wait Idle 6
3757 ges remote message Idle 6
3758 rdbms ipc message Idle 6
3759 VKRM Idle Idle 6
4070 gcs remote message Idle 6
4072 rdbms ipc message Idle 6
4383 gcs remote message Idle 6
4385 PX Deq: Execution Msg Idle 6
4696 rdbms ipc message Idle 6
4697 rdbms ipc message Idle 6
1 rdbms ipc message Idle 6
2 heartbeat monitor sleep Idle 6
3 rdbms ipc message Idle 6
4 wait for unread message on broadcast channel Idle 6
6 SQL*Net message from client Idle 6
From this output, what are the waits events i need to take into consideration.
Is this the right approach to follow?
Please let me know.
Thanks in advance.user13162661 wrote:
Hi Gurus.
I need you help to find out the wait events for a particular table and index when batch export job running from the application. I have done some work around to to find out, but i am not able to figure out the issue or what are the wait events. i am working on linux 4node rac 11gR2.
Below are the steps i have done.
1. find object_id for a table finding the wait events to that object_id.
SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='ACCOUNT_DETAIL_DENORM';
DATA_OBJECT_ID
82646
88518
84184
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=82646;
no rows selected
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=88518;
no rows selected
SYS@ccmintpt1 SQL>select w.sid,w.event,w.wait_class,w.wait_class# from gv$session s,gv$session_wait w where s.row_wait_obj#=84184;
no rows selected
2. find the object id for the index of that table and finding the wait events to that object_id.
SYS@ccmintpt1 SQL>select data_object_id from dba_objects where object_name='XAK2ACCOUNT_DETAIL_DENORM';
DATA_OBJECT_ID
88655
SID EVENT WAIT_CLASS WAIT_CLASS#
1 rdbms ipc message Idle 6
2 heartbeat monitor sleep Idle 6
3 rdbms ipc message Idle 6
4 wait for unread message on broadcast channel Idle 6
6 SQL*Net message from client Idle 6
7 SQL*Net message from client Idle 6
8 SQL*Net message from client Idle 6
9 SQL*Net message from client Idle 6
10 SQL*Net message from client Idle 6
11 SQL*Net message from client Idle 6
12 SQL*Net message from client Idle 6
13 SQL*Net message from client Idle 6
1876 SQL*Net message from client Idle 6
1877 VKTM Logical Idle Wait Idle 6
1878 rdbms ipc message Idle 6
1879 rdbms ipc message Idle 6
1880 rdbms ipc message Idle 6
1881 SQL*Net message from client Idle 6
3200 SQL*Net message from client Idle 6
3210 SQL*Net message from client Idle 6
3212 db file sequential read User I/O 8
3213 SQL*Net message from client Idle 6
3214 SQL*Net message from client Idle 6
3216 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 SQL*Net message from client Idle 6
3757 SQL*Net message from client Idle 6
1326 SQL*Net message from client Idle 6
1876 Streams AQ: waiting for time management or cleanup tasks Idle 6
1877 VKTM Logical Idle Wait Idle 6
1878 rdbms ipc message Idle 6
1879 rdbms ipc message Idle 6
1880 rdbms ipc message Idle 6
1882 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 rdbms ipc message Idle 6
3758 SQL*Net message from client Idle 6
3759 PX Deq: Execution Msg Idle 6
3200 SQL*Net message from client Idle 6
3210 SQL*Net message from client Idle 6
3212 db file sequential read User I/O 8
3213 SQL*Net message from client Idle 6
3214 SQL*Net message from client Idle 6
3216 SQL*Net message from client Idle 6
3751 rdbms ipc message Idle 6
3752 gcs remote message Idle 6
3754 rdbms ipc message Idle 6
3756 SQL*Net message from client Idle 6
3757 SQL*Net message from client Idle 6
3786 SQL*Net message from client Idle 6
3787 SQL*Net message from client Idle 6
1 heartbeat monitor sleep Idle 6
2 wait for unread message on broadcast channel Idle 6
314 rdbms ipc message Idle 6
315 Streams AQ: qmn coordinator idle wait Idle 6
627 pmon timer Idle 6
628 rdbms ipc message Idle 6
629 Streams AQ: waiting for messages in the queue Idle 6
940 Streams AQ: waiting for time management or cleanup tasks Idle 6
941 VKTM Logical Idle Wait Idle 6
942 rdbms ipc message Idle 6
1253 rdbms ipc message Idle 6
1254 rdbms ipc message Idle 6
1256 Space Manager: slave idle wait Idle 6
1566 DIAG idle wait Idle 6
1567 rdbms ipc message Idle 6
1568 Streams AQ: qmn slave idle wait Idle 6
1879 rdbms ipc message Idle 6
1880 smon timer Idle 6
1881 rdbms ipc message Idle 6
2192 PING Idle 6
2193 rdbms ipc message Idle 6
2194 rdbms ipc message Idle 6
2505 rdbms ipc message Idle 6
2506 rdbms ipc message Idle 6
2818 rdbms ipc message Idle 6
2819 rdbms ipc message Idle 6
2821 PX Deq: reap credit Other 0
3131 DIAG idle wait Idle 6
3132 jobq slave wait Idle 6
3444 rdbms ipc message Idle 6
3445 jobq slave wait Idle 6
3757 ges remote message Idle 6
3758 rdbms ipc message Idle 6
3759 VKRM Idle Idle 6
4070 gcs remote message Idle 6
4072 rdbms ipc message Idle 6
4383 gcs remote message Idle 6
4385 PX Deq: Execution Msg Idle 6
4696 rdbms ipc message Idle 6
4697 rdbms ipc message Idle 6
1 rdbms ipc message Idle 6
2 heartbeat monitor sleep Idle 6
3 rdbms ipc message Idle 6
4 wait for unread message on broadcast channel Idle 6
6 SQL*Net message from client Idle 6
From this output, what are the waits events i need to take into consideration.
Is this the right approach to follow?
Please let me know.
Thanks in advance.what actual problem are you trying to solve?
post SQL & results that have you concerned about wait events -
Need to know how to find the name of the classes for ABAP Objects
Hi Experts,
I am new in ABAP Objects. I do not now the best way to find the class which I want to use. Shall I search it using F4 search help, but many of the classes does not have a description with them.
I want to create a text field on my splitter container. Can anybody please tell me the class-name for the text field.
Regards,
Saurabh A. BukshHi,
Thank you for the helping me. But, I actually want something which we call a Text Box. I do not require a Text Edit Control.
Please tell me if you know any classes related to it and the parameters that I need to pass into it.
Thanks & Regards,
Saurabh A. Buksh -
Request for abap objects tutorial with examples
hi,
i am new to <b>abap objects</b>,
please send me a good tutorial for <b>abap objects</b> which contain good explanation with
good examples.
please send the tutorials to
<b>[email protected]</b>
thanks®ards
vamsi nHello,
<b>General Tutorial for OOPS</b>
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
<b>Have a look at these links for OO ABAP.</b>
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
<b>SDN Series:</b>
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
<b>Basic concepts of OOPS</b>
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
Regards,
Beejal
**Reward if this helps -
Create new event for BOR object for vendor creation
Hello,
I AM working on workflow.. Requrement is that , when a vendor is created I wanted the workflow to be triggered..
But I dont find any bussiness object for this...
Then I have created customized BOR object super type as LFA1. And created new event. Now I need to assign functionlity to this event, that is As soon as the vendor is created this event should be triggered so that I can use this as the start event for the workflow..
Plz guide me ...
Regards and Thanks,
Poornima...Hi Poornima,
Create a subtype and add the event in the BOR.
Now call the FM Userexit / BADI.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZKNA1'
OBJECT_KEY = OBJECT_KEY
EVENT = 'ONSAVE'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
INPUT_CONTAINER = IT_CONTAINER
* MESSAGE_LINES =
* MESSAGE_STRUCT =
IF SY-SUBRC <> 0.
ENDIF.
&******************Reward Point if helpful*************************& -
Why we are going for ABAP Objects?
Why should we use ABAP Objects instead of Function Group(in Function Module)?
Moderator message: please search for available information/documentation before asking.
locked by: Thomas Zloch on Oct 4, 2010 1:09 PMBefore your thread will land on pile of locked ones, I would like you read [EIGHT REASONS WHY EVERY ABAP DEVELOPER SHOULD GIVE ABAP OBJECTS A SECOND LOOK|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15]
Regards
Marcin -
Listen for an events for Swing objects in a separate class?
Hi all, sorry if this is in the wrong section of the forum but since this is a problem I am having with a Swing based project I thought i'd come here for help. Essentially i have nested panels in separate classes for the sake of clarity and to follow the ideas of OO based development. I have JPanels that have buttons and other components that will trigger events. I wish for these events to effect other panels, in the Hierachy of my program:
MainFrame(MainPanel(LeftPanel, RightPanel, CanvasPanel))
Sorry I couldnt indent to show the hierarchy. Here LeftPanel, RightPanel and CanvasPanel are objects that are created in the MainPanel. For example i want an event to trigger a method in another class e.g. LeftPanel has a button that will call a method in CanvasPanel. I have tried creating an EventListner in the MainPanel that would determine the source and then send off a method to the relevant class, but the only listeners that respond are the ones relevant to the components of class. Can I have events that will be listened to over the complete scope of the program? or is there another way to have a component that can call a method in the class that as an object, it has been created in.
Just as an example LeftPanel has a component to select the paint tool (its a simple drawing program) that will change a color attribute in the CanvasPanel object. Of course I realize i could have one massive Class with everything declared in it, but I'd rather learn if it is possible to do it this way!
Thanks in advance for any help you can offer
Lawrence
Edited by: insertjokehere on Apr 15, 2008 12:24 PMThanks for the response, ive added ActionListneres in the class where the component is, and in an external class. The Listeners work inside the class, but not in the external class
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
public class LeftPanel extends JPanel implements ActionListener {
/* Constructing JButtons, null until usage of the constructor */
JButton pencilBut;
JButton eraserBut;
JButton textBut;
JButton copyBut;
JButton ssincBut;
JButton ssdecBut;
ActionListener a = new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.print("\nNot supported yet.");
/* The Top Panel contains the title of program */
public LeftPanel(Dimension d){
/* Sets up the layout for the Panel */
BoxLayout blo = new BoxLayout(this,BoxLayout.Y_AXIS);
this.setLayout(blo);
/* Sets Up the Appearance of the Panel */
this.setMinimumSize(d);
this.setBackground(Color.RED);
this.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
/* Pencil Tool */
pencilBut = new JButton("Pencil");
pencilBut.setAlignmentX(Component.CENTER_ALIGNMENT);
pencilBut.setActionCommand("pencil");
pencilBut.addActionListener(a);
this.add(pencilBut);
/* Eraser Tool */
eraserBut = new JButton("Eraser");
eraserBut.setAlignmentX(Component.CENTER_ALIGNMENT);
eraserBut.addActionListener(a);
this.add(eraserBut);
/* Text Tool */
textBut = new JButton("Text");
textBut.setAlignmentX(Component.CENTER_ALIGNMENT);
textBut.addActionListener(a);
this.add(textBut);
/* Copy Previous Page */
copyBut = new JButton("Copy Page");
copyBut.setAlignmentX(Component.CENTER_ALIGNMENT);
copyBut.addActionListener(a);
this.add(copyBut);
/* Stroke Size Increase */
ssincBut = new JButton("Inc");
ssincBut.setAlignmentX(Component.CENTER_ALIGNMENT);
ssincBut.addActionListener(a);
this.add(ssincBut);
/* Stroke Size Decrease */
ssdecBut = new JButton("Dec");
ssdecBut.setAlignmentX(Component.CENTER_ALIGNMENT);
ssdecBut.addActionListener(a);
this.add(ssdecBut);
System.out.print("\nLeftPanel Completed");
public void actionPerformed(ActionEvent e) {
System.out.print("\nAction Performed");
}But this is not picked up in my external class here
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
public class MainPanel extends JPanel implements ActionListener {
/* Creates a new the main JPanel that is used in the FlipBookFrame to contain all of the elements */
public MainPanel(){
/* TopPanel constraints*/
tpcs.gridx = 1;
tpcs.gridy = 0;
tpcs.gridwidth = 1;
tpcs.gridheight = 1;
tpcs.fill = GridBagConstraints.BOTH;
tpcs.weightx = 0.0;
tpcs.weighty = 1.0;
/* LeftPanel Constraints*/
lpcs.gridx = 0;
lpcs.gridy = 0;
lpcs.gridwidth = 1;
lpcs.gridheight = 3;
lpcs.fill = GridBagConstraints.BOTH;
lpcs.weightx = 1.0;
lpcs.weighty = 1.0;
/* CentrePanel Constraints*/
cpcs.gridx = 1;
cpcs.gridy = 1;
cpcs.gridwidth = 1;
cpcs.gridheight = 1;
cpcs.fill = GridBagConstraints.NONE;
cpcs.weightx = 0.0;
cpcs.weighty = 0.0;
/* RightPanel Constraints*/
rpcs.gridx = 2;
rpcs.gridy = 0;
rpcs.gridwidth = 1;
rpcs.gridheight = 3;
rpcs.fill = GridBagConstraints.BOTH;
rpcs.weightx = 1.0;
rpcs.weighty = 1.0;
/* BottomPanel Constraints*/
bpcs.gridx = 1;
bpcs.gridy = 2;
bpcs.gridwidth = 1;
bpcs.gridheight = 1;
bpcs.fill = GridBagConstraints.BOTH;
bpcs.weightx = 0.0;
bpcs.weighty = 1.0;
this.setLayout(gblo); //Sets the Layout of the panel to a GridBagLayout
this.add(tp, tpcs); //Adds the TopPanel to the MainPanel using the TopPanel layout
this.add(lp, lpcs); //Adds the LeftPanel to the MainPanel using the LeftPanel layout
this.add(cp, cpcs); //Adds the CanvasPanel to the MainPanel using the CanvasPanel layout
this.add(rp, rpcs); //Adds the RightPanel to the MainPanel using the RightPanel layout
this.add(bp, bpcs); //Adds the BottomPanel to the MainPanel using the BottomPanel layout
gblo.layoutContainer(this); //Lays Out the Container
public PanelSizes getPanelSizes(){
return ps;
public void actionPerformed(ActionEvent e) {
System.out.print("\nExternal Class finds event!");
/*String command = e.getActionCommand();
if (command.equals("pencil")){
System.out.print("\nYESSSSSSSSSSSSSSSSSSSSS!");
/* Create of objects using the PanelSizes funtions for defining the */
PanelSizes ps = new PanelSizes(); //Creates a new PanelSizes object for sizing the panel
CanvasPanel cp = new CanvasPanel(ps.getCentrePanelDimension()); //Creates a new Canvas Panel
TopPanel tp = new TopPanel(ps.getHorizontalPanelDimension()); //Creates the TopPanel
BottomPanel bp = new BottomPanel(ps.getHorizontalPanelDimension()); //Creates the BottomPanel
LeftPanel lp = new LeftPanel(ps.getVerticalPanelDimension()); //Creates the LeftPanel
RightPanel rp = new RightPanel(ps.getVerticalPanelDimension()); //Creates the RightPanel
/* I have chosen to create individual constraints for each panel to allow for adding of all
components a the end of the constructor. This will use slightly more memory but gives clarity
in the code */
GridBagConstraints cpcs = new GridBagConstraints();
GridBagConstraints tpcs = new GridBagConstraints();
GridBagConstraints bpcs = new GridBagConstraints();
GridBagConstraints lpcs = new GridBagConstraints();
GridBagConstraints rpcs = new GridBagConstraints();
GridBagLayout gblo = new GridBagLayout();
}Any help will be greatly appreciated :-) -
GameCanvas keyPressed event for "Command" objects
Hi all,
I am currently using an instance of GameCanvas in my application. I have also added several "Command" objects to create a menu for the GameCanvas. using "addCommand" API.
Whenever I press a key within the bounds of the canvas, I am immediately taken to the "keyPressed" callback method. However, when the command menu is rendered when I click the right key on my device, the control does not come at this point. Anybody has any idea why this is so?...when the command menu is rendered when I click the right key on my device, the control does not come at this point...if you need control at this point, implement a CommandListener interface: if needed, [click here for API javadoc|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/CommandListener.html]
-
Event handling in global class (abap object)
Hello friends
I have 1 problem regarding events in abap object... how to handel an event in global class in se24 .
Regards
Reema jain.
Message was edited by:
Reema JainHello Reema
The following sample report shows how to handle event in principle (see the § marks)..
The following sample report show customer data ("Header"; KNB1) in the first ALV list and sales areas ("Detail"; KNVV) for the selected customer (event double-click) in the second ALV list.
*& Report ZUS_SDN_TWO_ALV_GRIDS
REPORT zus_sdn_two_alv_grids.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
"§1. Define and implement event handler method
" (Here: implemented as static methods of a local class)
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = '1000'.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
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.
"§2. Set event handler (after creating the ALV instance)
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1. " Or:
" SET HANDLER: lcl_eventhandler=>handle_double_click FOR all instances.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
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.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
is_layout = gs_layout
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
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.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
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.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
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.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
PERFORM entry_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM knvv INTO TABLE gt_knvv
WHERE kunnr = ls_knb1-kunnr.
ENDFORM. " ENTRY_SHOW_DETAILS
Regards
Uwe -
Looking for an ABAP Objects e-learning course
Does anyone know of any abap objects e-learning courses that are available? I checked with sap university, and they only offer the BC 401 customer course. I'm looking for a course for beginners. I found an advanced course that has been recoreded in Germany, but it is an advanced course for developers with experience in abap objects. Thanks! Allison McCloskey
Some documentation related with OOPs Abao :
ALV Gird Control (BC-SRV-ALE)
SAP Container
SAP Control Framework
or Thread New To OOPs ABAP
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
General Tutorial for OOPS
check all the below links
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
Check these links.
http://www.henrikfrank.dk/abapuk.html
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Go through the below links,
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
OO ABAP links:
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
go through these links
http://www.erpgenie.com/abap/index.htm
http://sic.fh-lu.de/sic/bic.nsf/(vJobangebote)/EC8AD2AE0349CE92C12572200026FDB8/$File/Intern%20or%20Working%20Student%20as%20ABAB%20OO%20Developer.pdf?Open
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
check the below links lot of info and examples r there
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
ALVOOPS
http://www.abap4.it/download/ALV.pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
http://www.erpgenie.com/abap/controls/alvgrid.htm
OOPS with ABAP
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
http://www.sapgenie.com/abap/OO/
For understanding COntrol Frameworks in OO ABAP, check this.
http://www.sapgenie.com/abap/controls/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com.
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
ALVOOPS
http://www.erpgenie.com/abap/controls/alvgrid.htm
OOPS with ABAP
https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
http://www.sapgenie.com/abap/OO/
For understanding COntrol Frameworks in OO ABAP, check this.
http://www.sapgenie.com/abap/controls/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com.
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.geocities.com/victorav15/sapr3/abap_ood.html
http://www.brabandt.de/html/abap_oo.html
Regarding ALV Grid Control using OOPs concepts
Regarding ALV Grid Control using OOPs concepts
OOPS OO ABAP
http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
DIRLL DOWN AND INTERACTIVE REPORT
http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
PAGE BREAK FOR ALV LIST
check out this link
http://www.abap4.it/download/ALV.pdf
good book on ABAP objects(OOPS)
http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications
How to check Cluster Table Data
https://forums.sdn.sap.com/click.jspa?searchID=5215473&messageID=3520315
http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm
http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
Check this cool weblog:
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
these links
http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
For funtion module to class
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
for classes
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
for methods
http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
for inheritance
http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
for interfaces
http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Rewards if useful...............
Minal -
Hi All,
Could anybody send me a document for ABAP Object events.
And simple programs for Events.
My id - [email protected]
Thanks,
Ponraj.s.Hi,
Go thru this basic simple program with documentation which demonstrates how to handle events, for nodes in a tree using abap objects
REPORT YLIST_TREE MESSAGE-ID ZER_INFO.
CLASS LCL_EVT_HDLR DEFINITION DEFERRED. " definition is given later
CLASS CL_GUI_CFW DEFINITION LOAD. " global class to be loaded
DATA:G_EVENT(50), " to hold the event
G_NODE_KEY TYPE TV_NODEKEY, "holds the node key
G_ITEM_NAME TYPE TV_ITMNAME,
G_KEY TYPE TV_ITMNAME.
DATA:G_EVT_HDLR TYPE REF TO LCL_EVT_HDLR,
G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
G_TREE TYPE REF TO CL_GUI_LIST_TREE,
G_OK_CODE TYPE SY-UCOMM.
TYPES:ITEM_TABLE_TYPE LIKE STANDARD TABLE OF MTREEITM
WITH DEFAULT KEY.
CLASS lcl_evt_hdlr DEFINITION
CLASS LCL_EVT_HDLR DEFINITION.
PUBLIC SECTION.
METHODS:
*---- methods for action handling for nodes
NODE_DBL_CLK
FOR EVENT NODE_DOUBLE_CLICK
OF CL_GUI_LIST_TREE
IMPORTING NODE_KEY,
HANDLE_NODE_KEY_PRESS
FOR EVENT NODE_KEYPRESS
OF CL_GUI_LIST_TREE
IMPORTING NODE_KEY KEY,
*---- methods for action handling for Items
ITEM_DBL_CLK
FOR EVENT ITEM_DOUBLE_CLICK
OF CL_GUI_LIST_TREE
IMPORTING NODE_KEY ITEM_NAME,
HANDLE_ITEM_KEY_PRESS
FOR EVENT ITEM_KEYPRESS
OF CL_GUI_LIST_TREE
IMPORTING NODE_KEY ITEM_NAME KEY,
*---- Common methods for action handling
HANDLE_RIGHT_CLICK
FOR EVENT RIGHT_CLICK
OF CL_GUI_LIST_TREE,
HANDLE_EXPAND_NO_CHILDREN
FOR EVENT EXPAND_NO_CHILDREN
OF CL_GUI_LIST_TREE
IMPORTING NODE_KEY.
ENDCLASS. "lcl_evt_hdlr DEFINITION
CLASS lcl_evt_hdlr IMPLEMENTATION
CLASS LCL_EVT_HDLR IMPLEMENTATION.
METHOD NODE_DBL_CLK.
this method handles the node double click event of the tree control
and shows the key of the double clicked node in a dynpro field
G_EVENT = 'NODE_DOUBLE_CLICK'.
G_NODE_KEY = NODE_KEY.
G_ITEM_NAME = ' '.
ENDMETHOD. "node_dbl_clk
METHOD ITEM_DBL_CLK.
G_EVENT = 'ITEM_DOUBLE_CLICK'.
G_NODE_KEY = NODE_KEY.
G_ITEM_NAME = ITEM_NAME.
ENDMETHOD. "ITEM_DBL_CLK
METHOD HANDLE_NODE_KEY_PRESS.
G_EVENT = 'NODE_KEYPRESS'.
G_NODE_KEY = NODE_KEY.
G_ITEM_NAME = ' '.
G_KEY = KEY.
ENDMETHOD. "HANDLE_NODE_KEY_PRESS
METHOD HANDLE_ITEM_KEY_PRESS.
G_EVENT = 'ITEM_KEYPRESS'.
G_NODE_KEY = NODE_KEY.
G_ITEM_NAME = ITEM_NAME.
G_KEY = KEY.
ENDMETHOD. "HANDLE_ITEM_KEY_PRESS
METHOD HANDLE_RIGHT_CLICK.
G_EVENT = 'RIGHT_CLICK'.
ENDMETHOD. "handle_right_click
METHOD HANDLE_EXPAND_NO_CHILDREN.
G_EVENT = 'EXPAND_NO_CHILDREN'.
G_NODE_KEY = NODE_KEY.
ENDMETHOD. "handle_EXPAND_NO_CHILDREN
ENDCLASS. "lcl_evt_hdlr IMPLEMENTATION
*------ start-of-selection.
START-OF-SELECTION.
*data: G_EVT_HDLR TYPE REF TO LCL_EVT_HDLR.
CREATE OBJECT G_EVT_HDLR. "create an object for the class lcl_evt_hdlr
SET SCREEN 100.
MODULE pbo_100 OUTPUT
MODULE PBO_100 OUTPUT.
SET PF-STATUS 'BUT'.
IF G_TREE IS INITIAL.
the tree control has not yet been created
create a tree control and insert nodes into it.
PERFORM CREATE_AND_INIT_TREE.
ENDIF.
ENDMODULE. "pbo_100 OUTPUT
MODULE pai_100 INPUT
MODULE PAI_100 INPUT.
DATA:RETURN_CODE TYPE I.
CL_GUI_CFW=>DISPATCH must be called if events are registered
that trigger PAI
this method calls the event handler method of an event
CALL METHOD CL_GUI_CFW=>DISPATCH
IMPORTING
RETURN_CODE = RETURN_CODE.
IF RETURN_CODE <> CL_GUI_CFW=>RC_NOEVENT.
" a control event occured => exit PAI
CLEAR G_OK_CODE.
EXIT.
ENDIF.
*at user-command.
g_ok_code = sy-ucomm.
CASE G_OK_CODE.
WHEN 'BACK'. " Finish program
IF NOT G_CUSTOM_CONTAINER IS INITIAL.
" destroy tree container (detroys contained tree control, too)
CALL METHOD G_CUSTOM_CONTAINER->FREE
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
CLEAR G_CUSTOM_CONTAINER.
CLEAR G_TREE.
ENDIF.
LEAVE PROGRAM.
ENDCASE.
CAUTION: clear ok code!
CLEAR G_OK_CODE.
ENDMODULE. "pai_100 INPUT
*& Form create_and_init_tree
text
--> p1 text
<-- p2 text
FORM CREATE_AND_INIT_TREE .
DATA:NODE_TABLE TYPE TREEV_NTAB,
ITEM_TABLE TYPE ITEM_TABLE_TYPE,
EVENTS TYPE CNTL_SIMPLE_EVENTS,
EVENT TYPE CNTL_SIMPLE_EVENT.
create a container for the tree control.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING
the container is linked to the custom control with the
name 'TREE_CONTAINER' on the dynpro
CONTAINER_NAME = 'TREE_CONTAINER'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
create a list tree control
CREATE OBJECT G_TREE
EXPORTING
PARENT = G_CUSTOM_CONTAINER
NODE_SELECTION_MODE = CL_GUI_LIST_TREE=>NODE_SEL_MODE_SINGLE
ITEM_SELECTION = 'X'
WITH_HEADERS = ' '
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CREATE_ERROR = 2
FAILED = 3
ILLEGAL_NODE_SELECTION_MODE = 4
LIFETIME_ERROR = 5.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
*------- KEY = enter
CALL METHOD G_TREE->ADD_KEY_STROKE
EXPORTING
KEY = CL_TREE_CONTROL_BASE=>KEY_ENTER
EXCEPTIONS
FAILED = 1
ILLEGAL_KEY = 2
CNTL_SYSTEM_ERROR = 3.
IF SY-SUBRC <> 0.
MESSAGE W006 WITH 'ADD_KEY_STROKE'.
ENDIF.
define the events which will be passed to the backend
node double click
EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_NODE_DOUBLE_CLICK.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_ITEM_DOUBLE_CLICK.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_NODE_KEYPRESS.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_ITEM_KEYPRESS.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
EVENT-EVENTID = LCL_EVT_HDLR=>EVENT_RIGHT_CLICK.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_EXPAND_NO_CHILDREN.
EVENT-APPL_EVENT = 'X'.
APPEND EVENT TO EVENTS.
*------ register the events
CALL METHOD G_TREE->SET_REGISTERED_EVENTS
EXPORTING
EVENTS = EVENTS
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
ILLEGAL_EVENT_COMBINATION = 3.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
assign event handlers in the application class to each desired events
SET HANDLER G_EVT_HDLR->NODE_DBL_CLK FOR G_TREE.
SET HANDLER G_EVT_HDLR->ITEM_DBL_CLK FOR G_TREE.
SET HANDLER G_EVT_HDLR->HANDLE_NODE_KEY_PRESS FOR G_TREE.
SET HANDLER G_EVT_HDLR->HANDLE_ITEM_KEY_PRESS FOR G_TREE.
SET HANDLER G_EVT_HDLR->HANDLE_RIGHT_CLICK FOR G_TREE.
SET HANDLER G_EVT_HDLR->HANDLE_EXPAND_NO_CHILDREN FOR G_TREE.
add some nodes to the tree control
PERFORM BUILD_NODE_AND_ITEM_TABLE USING NODE_TABLE ITEM_TABLE.
CALL METHOD G_TREE->ADD_NODES_AND_ITEMS
EXPORTING
NODE_TABLE = NODE_TABLE
ITEM_TABLE = ITEM_TABLE
ITEM_TABLE_STRUCTURE_NAME = 'mtreeitm'
EXCEPTIONS
FAILED = 1
CNTL_SYSTEM_ERROR = 3
ERROR_IN_TABLES = 4
DP_ERROR = 5
TABLE_STRUCTURE_NAME_NOT_FOUND = 6.
IF SY-SUBRC <> 0.
MESSAGE A000.
ENDIF.
ENDFORM. " create_and_init_tree
*& Form build_node_and_item_table
text
-->P_NODE_TABLE text
-->P_ITEM_TABLE text
FORM BUILD_NODE_AND_ITEM_TABLE USING
NODE_TABLE TYPE TREEV_NTAB
ITEM_TABLE TYPE ITEM_TABLE_TYPE.
DATA:NODE TYPE TREEV_NODE,
ITEM TYPE MTREEITM.
build the node table
node with key 'root'.
CLEAR NODE.
NODE-NODE_KEY = 'Root'. " key of the node
CLEAR NODE-RELATKEY. " root node has no parent node
CLEAR NODE-RELATSHIP.
NODE-HIDDEN = ' '. " the node is visible
NODE-DISABLED = ' '. " selectable
NODE-ISFOLDER = 'X'. " a folder
CLEAR NODE-N_IMAGE. " folder-/ leaf symbol in state "closed"
"use default.
CLEAR NODE-EXP_IMAGE. " folder-/ leaf symbol in state "open"
"use default.
CLEAR NODE-EXPANDER. " the width of the item is adjusted to its "
" content (text)
APPEND NODE TO NODE_TABLE.
node with key 'child1'.
CLEAR NODE.
NODE-NODE_KEY = 'Child1'. "key of the node
NODE-RELATKEY = 'Root'.
NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
NODE-ISFOLDER = 'X'.
APPEND NODE TO NODE_TABLE.
node with key 'Subchild1' for child1.
CLEAR NODE.
NODE-NODE_KEY = 'SubChild1'.
NODE-RELATKEY = 'Child1'.
NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
NODE-ISFOLDER = 'X'.
APPEND NODE TO NODE_TABLE.
node with key 'subchild2' for child1.
CLEAR NODE.
NODE-NODE_KEY = 'SubChild2'.
NODE-RELATKEY = 'Child1'.
NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
APPEND NODE TO NODE_TABLE.
node with key 'subchild3' for child1.
CLEAR NODE.
NODE-NODE_KEY = 'SubChild3'.
NODE-RELATKEY = 'Child1'.
NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
APPEND NODE TO NODE_TABLE.
node with key 'child2'.
CLEAR NODE.
NODE-NODE_KEY = 'Child2'. "key of the node
NODE-RELATKEY = 'Root'.
NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
NODE-ISFOLDER = 'X'.
NODE-EXPANDER = 'X'. " The node is marked with a '+', although
" it has no children. When the user clicks on the
" + to open the node, the event expand_nc is
" fired. The programmerr can
" add the children of the
" node within the event handler of the expand_nc
" event (see callback handle_expand_nc).
APPEND NODE TO NODE_TABLE.
items of the nodes
item with key 'root'.
CLEAR ITEM.
ITEM-NODE_KEY = 'Root'.
ITEM-ITEM_NAME = '1'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT. " text item
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO. "the width of the item
"is adjusted to its content
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP. "use proportional font
" for the item
ITEM-TEXT = 'object'.
APPEND ITEM TO ITEM_TABLE.
item with key 'child1'.
CLEAR ITEM.
ITEM-NODE_KEY = 'Child1'.
ITEM-ITEM_NAME = '11'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
ITEM-TEXT = 'dynpros'.
APPEND ITEM TO ITEM_TABLE.
item with key 'child2'.
CLEAR ITEM.
ITEM-NODE_KEY = 'Child2'.
ITEM-ITEM_NAME = '12'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
ITEM-TEXT = 'programme'.
APPEND ITEM TO ITEM_TABLE.
items of node with key 'Subchild1'.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild1'.
ITEM-ITEM_NAME = '111'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 11.
ITEM-TEXT = 'include'.
APPEND ITEM TO ITEM_TABLE.
items of node with key 'SubChild2'.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild2'.
ITEM-ITEM_NAME = '112'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 4. " the width of the item is 4 chars
ITEM-IGNOREIMAG = 'X'. " see documentation of structure treev_item
ITEM-USEBGCOLOR = 'X'.
ITEM-T_IMAGE = '@01@'.
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild2'.
ITEM-ITEM_NAME = '113'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 4. " the width of the item is 4 chars
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = '0100'.
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild2'.
ITEM-ITEM_NAME = '114'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 11.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = ' mueller'.
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild2'.
ITEM-ITEM_NAME = '115'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
ITEM-TEXT = ' comment to dynpro 100'.
APPEND ITEM TO ITEM_TABLE.
items of node with key 'SubChild3'.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild3'.
ITEM-ITEM_NAME = '121'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-LENGTH = 20.
ITEM-IGNOREIMAG = 'X'.
ITEM-USEBGCOLOR = 'X'.
ITEM-T_IMAGE = '@02@'.
ITEM-TEXT = ' 0200 harryhirsch'.
APPEND ITEM TO ITEM_TABLE.
CLEAR ITEM.
ITEM-NODE_KEY = 'SubChild3'.
ITEM-ITEM_NAME = '122'.
ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
ITEM-TEXT = ' comment to dynpro 200'.
APPEND ITEM TO ITEM_TABLE.
ENDFORM. " build_node_and_item_table
also i have sent a material to ur id
I hope you will get a clear idea on events
Regards,
Sowjanya
Maybe you are looking for
-
Power supply retailers near Philadelphia? G5 won't turn on anymore.
When I went to bed last night, my Mac was on and running fine. This morning, it was off, and would not turn back on. When I press the power button, absolutely nothing happens. I plan to replace the battery first, as I have seen recommended. If that d
-
How would you convert ToC links to cross references?
Hello gang, InDesign CS6 can export to ePub, and can support the exporting of one ToC to ePub hyperlinks, but cannot support two. Is there a script or plug-in that you know of that can take a second or third selected ToC generated, and convert its li
-
I am running OS 10.5.8 on an iMac. There is no security update issued for this operating system - it only covers 10.6. Is my comuter vulnerable? Do I need to do anything?
-
Hi, Can some one provide me how to use a standard User Exit. I have entered the exit number in the enchamcements and when i go to components and double click the include in the function exit, i am getting the message Program names zx...are reserved f
-
Connection keys for 2.0 users
I currently administer employees having Contribute 2, 3 and CS3. New Contribute users get CS3 but old users are still on 2 and 3. I also train users so I have all 3 versions on my PC. Since installing CS3 I can no longer send connection keys to versi