Frequency of use for an ABAP object  ?

Hi all,
i need in ABAP to get the frequency of use for an ABAP object like a program or function module. For example, for a program i would like if it's used often (by week, by month, day) or not.
Cheers.

Hi,
You can use transaction STAT or STAD for finding the statistics of usage regarding report or transaction.
You can also use the Function module <b>SAPWL_WORKLOAD_GET_STATISTIC</b> for getting the statistics of reports executed.
You need to get the dir from Function module <b>SAPWL_WORKLOAD_GET_DIRECTORY</b> and loop through the dir returned by the and pass the dir(internal table ) fields to the Function module SAPWL_WORKLOAD_GET_STATISTIC for getting the details
Hope this helps.

Similar Messages

  • 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 giri

    Hi 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.

  • Transport request no for the abap object

    Hi experts,
                      I want to know the transport request numbers for the abap objects. Can anybody tell me the procedure of how to know the transport request number?
    My approach : I want the transport request number for the function module.Open the functional module. go to Object Directory Entry and click on Lock Overview.
    it is displaying the 1.Request   2.User   3.Task/request   4.Object.      What is the main difference between Request and Task/request.
    For some programs it is not displaying the request number. Instead it is displaying the request locks.
    Thanks and regards.
    Murali Krishna T

    Hi tajuddin,
                         Thanks for your prompt reply. Problem solved.
    Also please make me clear ---  In object directory entry ---> lock overview, I want to know the difference between the Request and Task/request.

  • Using new namespace for existing abap objects

    Hi,
    We have just reserved a namespace and want to move existing code (tabels, data-elements, ...) to this namespace. The issue we notice is that the namespace is added to the name of the abap-object, so that every code-reference to that object must be changed. This leads to a lot of work. Can this somehow be avoided?
    Regards,
    Jurgen

    Hi Jurgen!
    This can't be avoided, that's the very core of the names. Different question is: can this be automated. Not completely.
    Fastest way (and it's really not so terrible as it seems):
    - copy the objects to new names
    - make where-used list to all objects (e.g. table name)
    - search and replace in each object (e.g. include)
    - generate new version
    - delete old object
    - check all objects for missed references
    Still will take several days for one person. For very large developments you can think about a program to do the mentioned list - but this will take a lot of time to program, too.
    Regards,
    Christian

  • 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

  • Link for studing ABAP objects

    hi all,
        i know the concept of object . can any once send some demo programs of ABAP object (showing  how to implement )also please send some good links for ABAP objects.
    send to e-mail : [email protected]
    cheers
    senthil

    Create a program (e.g. an executable or a subroutine pool) in SE38.
    Write the following code:
    <b>PROGRAM my_oo_test.
    CLASS my_first_class DEFINITION.
      PUBLIC SECTION.
        METHODS main.
    ENDCLASS.
    CLASS my_first_class IMPLEMENTATION.
      METHOD main.
        MESSAGE 'Hello World!' TYPE 'I'.
      ENDMETHOD.
    ENDCLASS.</b>
    Create a transaction code in SE93 and choose OO-Transaction there. Switch of "OO transaction model", enter the name of your class, method, and program in the fields and save.
    Now you can call the transaction. It shows "Hello World".

  • What is MI-Mobile infrastructure how it is useful for an ABAPer

    Hi All,
            What is MI-Mobile Infrastructure how it is userful for an ABAPer  according to carrer wise. What will be the position in future if an ABAPer choose MI. ASAP.
    Thanks&Regards.
    Bharat Kumar

    MI client development is a purely Java skill set(JSP or AWT) this is where the bulk of the development work will be carried out, although there are some middle ware developments and may also be some back end BAPI developments required in ABAP.
    Regards
    Carl

  • What are some uses for the aggregate object and definition file?

    Can anyone share some examples for using the aggregate object in a Lookout process file? I've spent only a little bit of time with it, but I can't see how it provides any useful functionality. I guess I'm open to suggestions--thanks in advance! JT
    John T. Sampson

    If you want to reuse code in a modular sence than the Aggregate object will work. Although it works best to start the development with the intent to reuse that segment of code.
    Look at the Sequencer Object Example from the Developer Zone. Follow the README file to copy all files into the Lookout/Examples folder. The Help_Template is an Aggregate process that was used many times in different examples for the web. The state file, .l4t, holds the text that gives further details on the development of the example. The Sequencer process has an Aggregate object used in it to open the Help_template.
    Sequence Example

  • What's the best FM frequency to use for the Transm...

    Hi all,
    I'm having difficulty in getting my iPod car kit set up, so I am using my n900 for in car entertainment for the time being.  Problem is that I can't seem to find a clear frequency to set the phone to use, so it doesn't keep picking up other stations whilst I am driving around.
    I have just read that 87.5 is a good choice, as not many stations go that low.  Problem is the n900 won't go that low, as far as I can tell.
    Any suggestions?
    If tnis post is a cure to your issue, please MARK IT AS SOLUTION.
    If this post has helped anyone in any way, PLEASE SHARE YOUR KUDOS, by clicking on the GREEN STAR.

    The lower transmit frequency limit is in there to make the device meet FCC regulations.. that is a regulation imposed of US regions and, to a lesser extent, Latin american regions that border with the US.
    In addition, you'll be pleased to know that the N900 will not use certain European WiFi channels if a) the sim card is removed or b) the phone has a sim card but is OUT of 3G coverage.. again, to make the device meet FCC regulations.. (seriously.. when you go out of 3G coverage, the kernel reports it is switching from EU wifi to US wifi!!)
    Let me put this into perspective..
    From: http://www.nokia.com/results/Nokia_results2009Q3e.pdf
    Nokia sold 3.1million handsets in the US 2009 Q3
    Nokia sold 27.1million handsets in Europe during the same period.. That is 9 times as many.
    The USA has its OWN firmware
    and yet ALL versions of the firmware (including the UK specific one) are crippled to meet the requirements of a region that produces the lowest sales figures by a factor of 3 (Latin America produced 9.7 million units in 2009Q3)
    Why the HELL are we suffering because of US restrictions..
    That's like saying you can't use bluetooth because it isn't allowed on the Christmas islands.. (it is allowed.. not picking on you, Christmas Islands, but you are small!)
    If the FCC wants a phone that doesn't allow broadcasts on sub 88Mhz frequences, and doesn't want certain Wifi channels to be used, the ALTER THE US FIRMWARE..
    What next, BMWs have with left hand steering in the UK because the US drives on the Left?
    Phillips TVs that only work on 120V because the US uses 120V..
    I don't give a **** what the FCC say.. I'm not in the US and I have my own european and UK legislation to adhere to..
    For a company that INSISTS on having a billion regional firmware versions, they don't appear to be able to get that right either!!! The UK version lacks UK specific restrictions such as the ability to us UK frequencies for wifi and FM transmission!!
    Crazy and very very irritating

  • Which function to use for labeling 3D objects? (Acrobat 3D or Acrobat 9 Pro Extended)

    I want to label parts of a 3D model (e.g. "Rough finish", "Glossy" etc.). I want the labels to be present even when the model is rotated, zoomed and turned etc. I tried using the comment feature (text box with a line) in Acrobat 3D (v. 8) but the problem is that the labels disappear as soon as the model is turned or zoomed. They reappear only when the saved "view" is "on".
    Any suggestions on how this can be done, preferably using Adobe Acrobat 8 (or toolkit)? If its absolutely impossible in this version of Adobe I will try to use trial version of Adobe 9 Pro Extended.
    Please advise.
    Thank you.

    Hello,
    You can create 3D comments linked to the geometry within Acrobat Pro Extended 9
    - Import your 3D model
    - Activate 3D then right click and select Tools/Add 3D comment
    - Pick an element on your 3D Part (insert your text) then press ok
    Hope it helps
    Best Regards
    William Gallego

  • Major global classes used in abap objects

    Hi,
    I am new to the abap objects and till now i am to understand that the role of the global classes are important in the abap object program. I had tried to search on the net but i was not able to get the desired result.
    I want to know which are the major global classes which are used in the ABAP objects.
    Plzz provide me guidelines for it.

    Ricx,
       It depends on your requirement.
    For alv's we use these global classes. For Webdynpro related alv we use different global classes.
    CL_GUI_ALV_GRID (List Viewer)
    CL_GUI_ALV_GRID_BASE (Basis Class for ALV grid)
    CL_GUI_ALV_TREE (ALV Tree Control)
    CL_GUI_ALV_TREE_SIMPLE (Simple ALV Tree)
    CL_ALV_TABLE_CREATE (Dynamic Creation of ALV Data Table)
    CL_ALV_TREE_BASE (Basis Class ALV Tree Control)
    CL_CK_ALVTREE_NKEY_2_OBJECT (Converter Node Key Object)
    CL_ALV_EVENT_DATA (Changing Data Container for Events)
    CL_ALV_EVENT_TOOLBAR_SET (ALV Context menu)
    Regards,
    Arun.

  • 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&regards
    vamsi n

    Hello,
    <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

  • Abap objects and selection screen

    Hello everybody,
    I am interested in your ways of implementing selection-screens in the style of ABAP Objects.
    In earlier times (when I used to implement ABAP objects in a procedural way) I just put the selection-screen commands in an include or a form routine of my ABAP report. So it was possible to run the report in background.
    Now I read something about selection-screens/dynpros and "separation of concerns" in the book "ABAP Objects" written by Keller. He advises using function groups to encapsulate presentation from logical matters. (Selection-screen commands are in an automatically generated include now). I implemented this way. (ABAP report with a local class, which has a main method, where function module of the function group is called). It works, but i see no chance to run my report in background now.. but I need to run the report in background.
    Does anybody know a solution without deleting function group?
    What do you think is the best way of using selection-screen-commands and ABAP Objects, especially regarding running in background?
    Thx for your advise in advance.
    Kind regards,
    Anne

    Hi Naimesh,
    thx for explanation. I am not sure, if I understood everything in the right way.
    Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
    If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
    Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
    Mh.. another question - have you ever combined MVC with object services?
    At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
    I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
    In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
    Thx in advance,
    Anne

  • Undesratsnding abap objects

    hi
    can any one provide basic material for underatanding object oriented in abap...with many sample programs(preferably)....u can also provide me links....
    thank you,
    Ginni

    Methods in ABAP Objects - Example
    The following example shows how to declare, implement, and use methods in ABAP Objects.
    Overview
    This example uses three classes called C_TEAM, C_BIKER, and C_BICYCLE. A user (a program) can create objects of the class C_TEAM. On a selection screen, the class C_TEAM asks for the number of members of each team.
    Each object in the class C_TEAM can create as many instances of the class C_BIKER as there are members in the team. Each instance of the class C_BIKER creates an instances of the class C_BICYCLE.
    Each instance of the class C_TEAM can communicate with the program user through an interactive list. The program user can choose individual team members for actions. The instances of the class C_BIKER allow the program user to choose the action on a further selection screen.
    Constraints
    The ABAP statements used for list processing are not yet fully available in ABAP Objects. However, to produce a simple test output, you can use the following statements:
    WRITE [AT] /<offset>(<length>) <f>
    ULINE
    SKIP
    NEW-LINE
    Note: The behavior of formatting and interactive list functions in their current state are not guaranteed. Incompatible changes could occur in a future release.
    Declarations
    This example is implemented using local classes, since selection screens belong to an ABAP program, and cannot be defined or called in global classes. Below are the definitions of the two selection screens and three classes:
    Global Selection Screens
    SELECTION-SCREEN BEGIN OF: SCREEN 100 TITLE TIT1, LINE.
      PARAMETERS MEMBERS TYPE I DEFAULT 10.
    SELECTION-SCREEN END OF: LINE, SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 TITLE TIT2.
      PARAMETERS: DRIVE    RADIOBUTTON GROUP ACTN,
                  STOP     RADIOBUTTON GROUP ACTN,
                  GEARUP   RADIOBUTTON GROUP ACTN,
                  GEARDOWN RADIOBUTTON GROUP ACTN.
    SELECTION-SCREEN END OF SCREEN 200.
    Class Definitions
    CLASS: C_BIKER DEFINITION DEFERRED,
           C_BICYCLE DEFINITION DEFERRED.
    CLASS C_TEAM DEFINITION.
      PUBLIC SECTION.
      TYPES: BIKER_REF TYPE REF TO C_BIKER,
             BIKER_REF_TAB TYPE STANDARD TABLE OF BIKER_REF
                                               WITH DEFAULT KEY,
             BEGIN OF STATUS_LINE_TYPE,
               FLAG(1)  TYPE C,
               TEXT1(5) TYPE C,
               ID       TYPE I,
               TEXT2(7) TYPE C,
               TEXT3(6) TYPE C,
               GEAR     TYPE I,
               TEXT4(7) TYPE C,
               SPEED    TYPE I,
             END OF STATUS_LINE_TYPE.
      CLASS-METHODS: CLASS_CONSTRUCTOR.
      METHODS: CONSTRUCTOR,
               CREATE_TEAM,
               SELECTION,
               EXECUTION.
      PRIVATE SECTION.
      CLASS-DATA: TEAM_MEMBERS TYPE I,
                  COUNTER TYPE I.
      DATA: ID TYPE I,
            STATUS_LINE TYPE STATUS_LINE_TYPE,
            STATUS_LIST TYPE SORTED TABLE OF STATUS_LINE_TYPE
                                          WITH UNIQUE KEY ID,
            BIKER_TAB TYPE BIKER_REF_TAB,
            BIKER_SELECTION LIKE BIKER_TAB,
            BIKER LIKE LINE OF BIKER_TAB.
      METHODS: WRITE_LIST.
    ENDCLASS.
    CLASS C_BIKER DEFINITION.
      PUBLIC SECTION.
      METHODS: CONSTRUCTOR IMPORTING TEAM_ID TYPE I MEMBERS TYPE I,
               SELECT_ACTION,
               STATUS_LINE EXPORTING LINE
                           TYPE C_TEAM=>STATUS_LINE_TYPE.
      PRIVATE SECTION.
      CLASS-DATA COUNTER TYPE I.
      DATA: ID TYPE I,
            BIKE TYPE REF TO C_BICYCLE,
            GEAR_STATUS  TYPE I VALUE 1,
            SPEED_STATUS TYPE I VALUE 0.
      METHODS BIKER_ACTION IMPORTING ACTION TYPE I.
    ENDCLASS.
    CLASS C_BICYCLE DEFINITION.
      PUBLIC SECTION.
      METHODS: DRIVE EXPORTING VELOCITY TYPE I,
               STOP  EXPORTING VELOCITY TYPE I,
               CHANGE_GEAR IMPORTING CHANGE TYPE I
                           RETURNING VALUE(GEAR) TYPE I
                           EXCEPTIONS GEAR_MIN GEAR_MAX.
      PRIVATE SECTION.
      DATA: SPEED TYPE I,
            GEAR  TYPE I VALUE 1.
      CONSTANTS: MAX_GEAR TYPE I VALUE 18,
                 MIN_GEAR TYPE I VALUE 1.
    ENDCLASS.
    Note that none of the three classes has any public attributes. The states of the classes can only be changed by their methods. The class C_TEAM contains a static constructor CLASS_CONSTRUCTOR. C_TEAM and C_BIKER both contain instance constructors.
    Implementations
    The implementation parts of the classes contain the implementations of all of the methods declared in the corresponding declaration parts. The interfaces of the methods have already been defined in the declarations. In the implementations, the interface parameters behave like local data.
    Methods of Class C_TEAM
    The following methods are implemented in the section
    CLASS C_TEAM IMPLEMENTATION.
    ENDCLASS.
    CLASS_CONSTRUCTOR
      METHOD CLASS_CONSTRUCTOR.
        TIT1 = 'Team members ?'.
        CALL SELECTION-SCREEN 100 STARTING AT 5 3.
        IF SY-SUBRC NE 0.
          LEAVE PROGRAM.
        ELSE.
          TEAM_MEMBERS = MEMBERS.
        ENDIF.
      ENDMETHOD.
    The static constructor is executed before the class C_TEAM is used for the first time in a program. It calls the selection screen 100 and sets the static attribute TEAM_MEMBERS to the value entered by the program user. This attribute has the same value for all instances of the class C_TEAM.
    CONSTRUCTOR
      METHOD CONSTRUCTOR.
        COUNTER = COUNTER + 1.
        ID = COUNTER.
      ENDMETHOD.
    The instance constructor is executed directly after each instance of the class C_TEAM is created. It is used to count the number of instance of C_TEAM in the static attribute COUNTER, and assigns the corresponding number to the instance attribute ID of each instance of the class.
    CREATE_TEAM
      METHOD CREATE_TEAM.
        DO TEAM_MEMBERS TIMES.
          CREATE OBJECT BIKER EXPORTING TEAM_ID = ID
                                        MEMBERS = TEAM_MEMBERS.
          APPEND BIKER TO BIKER_TAB.
          CALL METHOD BIKER->STATUS_LINE IMPORTING LINE = STATUS_LINE.
          APPEND STATUS_LINE TO STATUS_LIST.
        ENDDO.
      ENDMETHOD.
    The public instance method CREATE_TEAM can be called by any user of the class containing a reference variable with a reference to an instance of the class. It is used to create instances of the class C_BIKER, using the private reference variable BIKER in the class C_TEAM. You must pass both input parameters for the instance constructor of class C_BIKER in the CREATE OBJECT statement. The references to the newly-created instances are inserted into the private internal table BIKER_TAB. After the method has been executed, each line of the internal table contains a reference to an instance of the class C_BIKER. These references are only visible within the class C_TEAM. External users cannot address the objects of class C_BIKER.
    CREATE_TEAM also calls the method STATUS_LINE for each newly-created object, and uses the work area STATUS_LINE to append its output parameter LINE to the private internal table STATUS_LIST.
    SELECTION
      METHOD SELECTION.
        CLEAR BIKER_SELECTION.
        DO.
          READ LINE SY-INDEX.
          IF SY-SUBRC <> 0. EXIT. ENDIF.
          IF SY-LISEL+0(1) = 'X'.
            READ TABLE BIKER_TAB INTO BIKER INDEX SY-INDEX.
            APPEND BIKER TO BIKER_SELECTION.
          ENDIF.
        ENDDO.
        CALL METHOD WRITE_LIST.
      ENDMETHOD.
    The public instance method SELECTION can be called by any user of the class containing a reference variable with a reference to an instance of the class. It selects all of the lines in the current list in which the checkbox in the first column is selected. For these lines, the system copies the corresponding reference variables from the table BIKER_TAB into an additional private internal table BIKER_SELECTION. SELECTION then calls the private method WRITE_LIST, which displays the list.
    EXECUTION
      METHOD EXECUTION.
        CHECK NOT BIKER_SELECTION IS INITIAL.
        LOOP AT BIKER_SELECTION INTO BIKER.
          CALL METHOD BIKER->SELECT_ACTION.
          CALL METHOD BIKER->STATUS_LINE IMPORTING LINE = STATUS_LINE.
          MODIFY TABLE STATUS_LIST FROM STATUS_LINE.
        ENDLOOP.
        CALL METHOD WRITE_LIST.
      ENDMETHOD.
    The public instance method EXECUTION can be called by any user of the class containing a reference variable with a reference to an instance of the class. The method calls the two methods SELECT_ACTION and STATUS_LINE for each instance of the class C_BIKER for which there is a reference in the table BIKER_SELECTION. The line of the table STATUS_LIST with the same key as the component ID in the work area STATUS_LINE is overwritten and displayed by the private method WRITE_LIST.
    WRITE_LIST
      METHOD WRITE_LIST.
        SET TITLEBAR 'TIT'.
        SY-LSIND = 0.
        SKIP TO LINE 1.
        POSITION 1.
        LOOP AT STATUS_LIST INTO STATUS_LINE.
          WRITE: / STATUS_LINE-FLAG AS CHECKBOX,
                   STATUS_LINE-TEXT1,
                   STATUS_LINE-ID,
                   STATUS_LINE-TEXT2,
                   STATUS_LINE-TEXT3,
                   STATUS_LINE-GEAR,
                   STATUS_LINE-TEXT4,
                   STATUS_LINE-SPEED.
        ENDLOOP.
      ENDMETHOD.
    The private instance method WRITE_LIST can only be called from the methods of the class C_TEAM. It is used to display the private internal table STATUS_LIST on the basic list (SY-LSIND = 0) of the program.
    Methods of Class C_BIKER
    The following methods are implemented in the section
    CLASS C_BIKER IMPLEMENTATION.
    ENDCLASS.
    CONSTRUCTOR
      METHOD CONSTRUCTOR.
        COUNTER = COUNTER + 1.
        ID = COUNTER - MEMBERS * ( TEAM_ID - 1).
        CREATE OBJECT BIKE.
      ENDMETHOD.
    The instance constructor is executed directly after each instance of the class C_BIKER is created. It is used to count the number of instance of C_BIKER in the static attribute COUNTER, and assigns the corresponding number to the instance attribute ID of each instance of the class. The constructor has two input parameters - TEAM_ID and MEMBERS - which you must pass in the CREATE OBJECT statement when you create an instance of C_BIKER.
    The instance constructor also creates an instance of the class C_BICYCLE for each new instance of the class C_BIKER. The reference in the private reference variable BIKE of each instance of C_BIKER points to a corresponding instance of the class C_BICYCLE. No external user can address these instances of the class C_BICYCLE.
    SELECT_ACTION
      METHOD SELECT_ACTION.
        DATA ACTIVITY TYPE I.
        TIT2 = 'Select action for BIKE'.
        TIT2+24(3) = ID.
        CALL SELECTION-SCREEN 200 STARTING AT 5 15.
        CHECK NOT SY-SUBRC GT 0.
        IF GEARUP = 'X' OR GEARDOWN = 'X'.
          IF GEARUP = 'X'.
            ACTIVITY = 1.
          ELSEIF GEARDOWN = 'X'.
            ACTIVITY = -1.
          ENDIF.
        ELSEIF DRIVE = 'X'.
          ACTIVITY = 2.
        ELSEIF STOP = 'X'.
          ACTIVITY = 3.
        ENDIF.
        CALL METHOD BIKER_ACTION( ACTIVITY).
      ENDMETHOD.
    The public instance method SELECT_ACTION can be called by any user of the class containing a reference variable with a reference to an instance of the class. The method calls the selection screen 200 and analyzes the user input. After this, it calls the private method BIKER_ACTION of the same class. The method call uses the shortened form to pass the actual parameter ACTIVITY to the formal parameter ACTION.
    BIKER_ACTION
      METHOD BIKER_ACTION.
        CASE ACTION.
          WHEN -1 OR 1.
            CALL METHOD BIKE->CHANGE_GEAR
                              EXPORTING CHANGE = ACTION
                              RECEIVING GEAR = GEAR_STATUS
                              EXCEPTIONS GEAR_MAX = 1
                                         GEAR_MIN = 2.
            CASE SY-SUBRC.
              WHEN 1.
                MESSAGE I315(AT) WITH 'BIKE' ID
                                      ' is already at maximal gear!'.
              WHEN 2.
                MESSAGE I315(AT) WITH 'BIKE' ID
                                      ' is already at minimal gear!'.
            ENDCASE.
          WHEN 2.
            CALL METHOD BIKE->DRIVE IMPORTING VELOCITY = SPEED_STATUS.
          WHEN 3.
            CALL METHOD BIKE->STOP IMPORTING VELOCITY = SPEED_STATUS.
        ENDCASE.
      ENDMETHOD.
    The private instance method BIKER_ACTION can only be called from the methods of the class C_BIKER. The method calls other methods in the instance of the class C_BICYCLE to which the reference in the reference variable BIKE is pointing, depending on the value in the input parameter ACTION.
    STATUS_LINE
      METHOD STATUS_LINE.
        LINE-FLAG = SPACE.
        LINE-TEXT1 = 'Biker'.
        LINE-ID = ID.
        LINE-TEXT2 = 'Status:'.
        LINE-TEXT3 = 'Gear = '.
        LINE-GEAR  = GEAR_STATUS.
        LINE-TEXT4 = 'Speed = '.
        LINE-SPEED = SPEED_STATUS.
      ENDMETHOD.
    The public instance method STATUS_LINE can be called by any user of the class containing a reference variable with a reference to an instance of the class. It fills the structured output parameter LINE with the current attribute values of the corresponding instance.
    Methods of Class C_BICYCLE
    The following methods are implemented in the section
    CLASS C_BICYCLE IMPLEMENTATION.
    ENDCLASS.
    DRIVE
      METHOD DRIVE.
        SPEED = SPEED  + GEAR * 10.
        VELOCITY = SPEED.
      ENDMETHOD.
    The public instance method DRIVE can be called by any user of the class containing a reference variable with a reference to an instance of the class. The method changes the value of the private attribute SPEED and passes it to the caller using the output parameter VELOCITY.
    STOP
      METHOD STOP.
        SPEED = 0.
        VELOCITY = SPEED.
      ENDMETHOD.
    The public instance method STOP can be called by any user of the class containing a reference variable with a reference to an instance of the class. The method changes the value of the private attribute SPEED and passes it to the caller using the output parameter VELOCITY.
    CHANGE_GEAR
      METHOD CHANGE_GEAR.
        GEAR = ME->GEAR.
        GEAR = GEAR + CHANGE.
        IF GEAR GT MAX_GEAR.
          GEAR = MAX_GEAR.
          RAISE GEAR_MAX.
        ELSEIF GEAR LT MIN_GEAR.
          GEAR = MIN_GEAR.
          RAISE GEAR_MIN.
        ENDIF.
        ME->GEAR = GEAR.
      ENDMETHOD.
    The public instance method CHANGE_GEAR can be called by any user of the class containing a reference variable with a reference to an instance of the class. The method changes the value of the private attribute GEAR. Since the formal parameter with the same name obscures the attribute in the method, the attribute has to be addressed using the self-reference ME->GEAR.
    Using the Classes in a Program
    The following program shows how the above classes can be used in a program. The declarations of the selection screens and local classes, and the implementations of the methods must also be a part of the program.
    REPORT OO_METHODS_DEMO NO STANDARD PAGE HEADING.
    Declarations and Implementations
    Global Program Data
    TYPES TEAM TYPE REF TO C_TEAM.
    DATA: TEAM_BLUE  TYPE TEAM,
          TEAM_GREEN TYPE TEAM,
          TEAM_RED   TYPE TEAM.
    DATA  COLOR(5).
    Program events
    START-OF-SELECTION.
      CREATE OBJECT: TEAM_BLUE,
                     TEAM_GREEN,
                     TEAM_RED.
       CALL METHOD: TEAM_BLUE->CREATE_TEAM,
                   TEAM_GREEN->CREATE_TEAM,
                   TEAM_RED->CREATE_TEAM.
      SET PF-STATUS 'TEAMLIST'.
      WRITE '                   Select a team!             ' COLOR = 2.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'TEAM_BLUE'.
          COLOR = 'BLUE '.
          FORMAT COLOR = 1 INTENSIFIED ON INVERSE ON.
           CALL METHOD TEAM_BLUE->SELECTION.
        WHEN 'TEAM_GREEN'.
          COLOR = 'GREEN'.
          FORMAT COLOR = 5 INTENSIFIED ON INVERSE ON.
           CALL METHOD TEAM_GREEN->SELECTION.
        WHEN 'TEAM_RED'.
          COLOR = 'RED '.
          FORMAT COLOR = 6 INTENSIFIED ON INVERSE ON.
           CALL METHOD TEAM_RED->SELECTION.
        WHEN 'EXECUTION'.
          CASE COLOR.
            WHEN 'BLUE '.
              FORMAT COLOR = 1 INTENSIFIED ON INVERSE ON.
               CALL METHOD TEAM_BLUE->SELECTION.
              CALL METHOD TEAM_BLUE->EXECUTION.
            WHEN 'GREEN'.
              FORMAT COLOR = 5 INTENSIFIED ON INVERSE ON.
               CALL METHOD TEAM_GREEN->SELECTION.
              CALL METHOD TEAM_GREEN->EXECUTION.
            WHEN 'RED '.
              FORMAT COLOR = 6 INTENSIFIED ON INVERSE ON.
               CALL METHOD TEAM_RED->SELECTION.
              CALL METHOD TEAM_RED->EXECUTION.
          ENDCASE.
      ENDCASE.
    The program contains three class reference variables that refer to the class C_TEAM. It creates three objects from the class, to which the references in the reference variables then point. In each object, it calls the method CREATE_TEAM. The method CLASS_CONSTRUCTOR of class C_TEAM is executed before the first of the objects is created. The status TEAMLIST for the basic list allows the user to choose one of four functions:
    When the user chooses a function, the event AT USER-COMMAND is triggered and public methods are called in one of the three instances of C_TEAM, depending on the user’s choice. The user can change the state of an object by selecting the corresponding line in the status list.

  • Significance of Interfaces in ABAP Objects

    Hi Guys, here I have a query -
    Why do we use Interfaces in ABAP Objects?, and what is the significance of Interfaces in ABAP Objects?
    Please clarify the above with a suitable example.

    Moderator message - Welcome to SCN.
    But
    Moderator message - But this isn't a training forum. Please ask a specific question - post locked

Maybe you are looking for

  • How to specify the webLogic server startup script to use different config.xml  file ??

    Hi, I have 2 weblogic startup scripts (startWebLogic.sh and startWebLogic_recovery.sh) for the same domain. startWebLogic.sh uses config.xml file. I would like to use config_recovery.xml as the configuration file for startWebLogic_recovery.sh How wou

  • Link in Crystal report to view on Mobile or Ipad

    Dear Expert ,  I created simple list of Purchase order  Pending approval report from draft table (ODRF). I want to create hyperlink in crystal report which should to go to approval list in mobile application. kindly let me know is it possible or not?

  • Cannot open pdf files

    I cannot open pdf files from the internet.  I just get a small white cross in a black background in the top left hand corner of the screen.  This is not just from one website but happens with all.  Advice please.  I am using Windows 7 Home Premium an

  • Sony Bravia KDL-32L5000 or Samsung LN32B460?

      I'm getting a 32" HDTV and these are my options Sony Bravia KDL-32L5000 or Samsung LN32B460 I will be using this tv for sd/hd channels,PS3 gaming,and blu-ray Thanks in advance

  • Is there a Driver for Dymo Discpainter?

    Hi everyone, I upgraded to 10.7 a while ago but hadn't used my Dymo DiscPainter to sadly see now there is no driver for 10.7. Please tell me there is something I can do to utilize this great printer again. I have a Mac Pro 1st Gen and an MacBook Pro