Doubt in abap oo concepts

Hi,
I have created internal table based on mseg db table.can i use select query inside method implementation.how to write itab contents.please help if u know.
thanks
kavitha

Check the code
      CLASS zcl_event_handler IMPLEMENTATION
CLASS zcl_event_handler IMPLEMENTATION.
Top-of-page event
  METHOD top_of_page.
    PERFORM event_top_of_page
            USING z_dyndoc_id.
  ENDMETHOD.   "METHOD top_of_page
Change Status Button
  METHOD handle_toolbar.
    IF NOT pa_prodr IS INITIAL.
      DATA: lz_toolbar  TYPE stb_button.
      CLEAR lz_toolbar.
      MOVE    'CHANGE_STATUS'  TO lz_toolbar-function.
      MOVE    text-001         TO lz_toolbar-text.
      APPEND  lz_toolbar       TO e_object->mt_toolbar.
    ENDIF.          "IF NOT pa_prodr IS INITIAL
  ENDMETHOD.   "METHOD handle_toolbar
Handle User Command
  METHOD handle_user_command.
    CASE e_ucomm.
      WHEN 'CHANGE_STATUS'.
        LOOP AT    it_output
             INTO  wa_output.
          IF wa_output-chk_box EQ kc_x.
            z_flag = 1.
            EXIT.
          ENDIF.          "IF wa_output-chk_box EQ kc_x
        ENDLOOP.      "LOOP AT it_output INTO  wa_output
        IF z_flag EQ 1.
          PERFORM display_selected_data.
        ELSE.
          MESSAGE i001(zzrefn01)
                  WITH text-023.
        ENDIF.       "IF z_flag EQ 1
    ENDCASE.      "CASE e_ucomm
  ENDMETHOD.   "METHOD handle_user_command
ENDCLASS.   "zcl_event_handler IMPLEMENTATION

Similar Messages

  • Best Practice: Usage of the ABAP Packages Concept?

    Hi SDN folks,
      I've just started on a new project - I have significant ABAP development experience (15 years+) - but one thing that I have never seen used correctly is the Package concept in ABAP - for any of the projects that I have worked on.
    I would like to define some best practices - about when we should create packages - and about how they should be structured.
    My understanding of the package concept is that they allow you to bundle all of the related objects of a piece of development work together. In previous projects - and almost every project I have ever worked on - we just have packages ZBASIS, ZMM, ZSD, ZFI and so on. But this to me is a very crude usage of packages, and really it seems that we have not moved on passed the 4.6 usage of the old development class concept - and it means that packages do not really add much value.
    I read in the SAP PRESS Next Generation ABAP book (Thomas Ljung, Rich Hellman) (I only have the 1st edition) - that we should use packages for defining separation of concern for an application. So it seems there they are recommending that for each and every application we write - we define at the least 3 packages - one for Model, one for Controller and one for view based objects. It occurs to me that following this approach will lead to a tremendous number of packages over the life cycle of an implementation, which could potentially lead to confusion - and so also add little value. Is this really the best practice approach? Has anyone tried this approach across a full blown implementation?
    As we are starting a new implementation - we will be running with 7 EHP2 and I would really like to get the most out of the functionality that is provided. I wonder what others have for experience in the definition of packages.
    One possible usage occurs to me that you could define the packages as a mirror image of the application business object class hierarchy (see below). But perhaps this is overcomplicating their usage - and would lead to issues later in terms of transportation conflicts etc.:
                                          ZSD
                                            |
                    ZSOrder    ZDelivery   ZBillingDoc
    Does anyone have any good recommendations for the usage of the ABAP Package concept - from real life project experience?
    All contributions are most welcome - although please refrain from sending links on how to create packages in SE80
    Kind Regards,
    Julian

    Hi Julian,
    I have struggled with the same questions you are addressing. On a previous project we tried to model based on packages, but during the course of the project we encountered some problems that grew overtime. The main problems were:
    1. It is hard to enforce rules on package assignments
    2. With multiple developers on the project and limited time we didn't have time to review package assignment
    3. Devopelers would click away warnings that an object was already part of another project and just continue
    4. After go-live the maintenance partner didn't care.
    So, my experience is is that it is a nice feature, but only from a high level design point of view. In real life it will get messy and above all, it doesn't add much value to the development. On my neew assignment we are just working with packages based on functional area and that works just fine.
    Roy

  • ABAP related concepts

    Hi All
    Could any body tell me wat all ABAP related concepts should a SD consultant know when working in support and implementation projects?

    hi,
    first and foremost is you should very comfortable in understanding the SD tables and how the data flows through them. Also you must be conversant with the important fields of these tables to start with.
    check this link for SD table flows :
    [sdtables|http://www.erpgenie.com/abap/tables_sd.htm]
    the others things would be
    1) to be able to prepare a good functional spec
    2) Decision making skill whether to do somehting in config or go for customization depending on the implications of a particular scenario after discussing with abapers.
    3) Understand output related developement work, in terms of driver program and screen layouts.
    4) To be able to locate userexits for your requirements and give a proper logic to work with. Generally the problem comes when you try to hard code something which is not so advisable and to eliminate this, a good logic based on the business requirement needs to derived which you again need to translate it to the abaper.
    regards
    sadhu kishore

  • Few more basic doubts in ABAP

    Hi Floks,
    I have few doubts in ABAP programming could please clarify that ..
    1. how to handle error messages in Call transaction and Call Session method .
    2. which logic can be used to handle the table control in BDC method . when table control required ? let me give few transction related to table control of BDC.
    3. what is structure of BDC DATA ? what is diffrence between BDC Session and Call Transaction method in programming steps ?
    4.how many message types available ? what are they ?
    5.when call transction or Call session  can be used ? how to decide which method is best for requirement ?
    could you please help me out . if u have any material or links forward to [email protected]
    Good Rewards for best answers
    Thanks ,
    Sunitha

    Here are the answers to your questions.
    1. how to handle error messages in Call transaction and Call Session method .
    --> In Call transaction, if you see the command, messages are populated into an internal table. You need to read last record of this table. Using Function module FORMAT_MESSAGE, you can get details of the message. For session method, session gets created and status of session can be seen in transaction SM35. You can process erroneous sessions from here.
    2. which logic can be used to handle the table control in BDC method . when table control required ? let me give few transction related to table control of BDC.
    --> Check these links which explain in detail with examples.
    BDC - TABLE CONTROL
    In BDC table control
    3. what is structure of BDC DATA ? what is diffrence between BDC Session and Call Transaction method in programming steps ?
    -->PROGRAM - Program Name
    DYNPRO - BDC Screen number
    DYNBEGIN - BDC screen start (Flag)
    FNAM - BDC Field name
    FVAL - BDC Field value
    4.how many message types available ? what are they
    -->
    A (Abend) Termination
    E (Error) Error
    I (Info) Information
    S (Status) Status message
    W (Warning) Warning
    X (Exit) Termination with short dump
    5.when call transction or Call session can be used ? how to decide which method is best for requirement ?\
    --> These threads discuss the same
    Session Method
    Difference between Session method and Call transaction method

  • HR-ABAP-Infotypes concept

    Hi Masters,
                           Can you please let me know the perfect reason for infotypes concept in HR-ABAP.
    1 Why we are using infotypes and exactly what is purpose?
    2.Why we are using LDB's why cannot we extract data directly from database tables?
    3.Can you please give me clear explanations about these infotypes.

    Hi
    Infotype(s) are used in the Personnel Management (PA) module primarily. This is where personnel master data is stored. Data is grouped according to subject matter. The Human Resources component aims to enable the user to process employee data in an effective structure in accordance with business requirements. The data structure of infotypes mirrors a logical set of data records. Infotypes can be identified by their four-digit keys, for example, the Addresses infotype (0006). To facilitate reporting on past employee data, infotypes can be saved for specific periods.
    Some people use the term HR ABAP to describe the method of managing the infotype data. Typically HR logical databases are used which offers more secure methods of accessing the infotype data. Once the infotypes are declared, you can use standard macros to access the data. Table TRMAC holds the macro name and the code behind it. This makes developing HR programs much quicker and easy to turn around.
    HR uses INFOTYPES instead of tables.
    There are different sub modules exist in HR.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/bb/bdb041575911d189240000e8323d3a/frameset.htm
    see this link you would get information about types of infotypes
    Logical databases are special ABAP programs that retrieve data and make it available toapplication programs. The most common use of logical databases is still to read data fromdatabase tables by linkin them to executable ABAP programs.
    Logical databases contain Open SQL statements that read data from the database.You do not therefore need to use SQL in your own programs. The logical database reads theprogram, stores them in the program if necessary, and then passes them line by line to theapplication program or the function module LDB_PROCESS using an interface work area .
    For further info
    check link http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB.
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    <b>REward fi suefull</b>

  • Doubts in ABAP WebDynpro

    Hi Experts,
    I am new to ABAP WebDynpro and self-learning going through SDN stuff and other online-help. Please provide me
    your kind explanation on below doubts.
    1. When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    2. How to read the index of a particular selected row in table?
    3. How do you change position of a particulr node dynamically?
    4. Is it possible to execute a component without a window?
    5. Is it possible to run a VIEW without embeding into a window in Webdynpro application?
    6. How to read the content entered in PARAMTER and SELECT-OPTION elements in ABAP Webdynpro? Can anybody pass code how to read entries?
    I mean GET_ATTRIBUTE or GET_STATIC_ATTRIBUTES is used for reading attribute value. 
    7. Is it possible to fix the Message window position? Show at the bottom of a screen? Please provide some code for this.
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text. Please provide me example code.
    Thanks in advance for the support and useful explanation!
    Regards,
    Meera.

    Hi
    Refer the answers inline
    1) When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    GET_ATTRIBUTE
    Method to get the values of a context attribute.
    The prerequisite for this method is that the application knows the data type of the attribute.
    The value of the given attribute is copied to the export parameter. To do this the export parameter must have a data type to which a value can be written.
    GET_STATIC_ATTRIBUTES
    This method copies the static attributes to the transferred variable. If the structure is not identical, a move-correspondingis performed, which is not as efficient as a direct move, but is still useful in many cases.
    Static attributes are those that either have been declared or that belong to the structure with which the node was declared.
    2) How to read the index of a particular selected row in table?
    data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    3) How do you change position of a particulr node dynamically?
        Explain Bit deeply
    4) Is it possible to execute a component without a window?
        No it is not possible, actually the component view can be viewed by embedding it to the window
    5) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
        No it is not possible, without window you cant run the view
    6) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
      DATA LO_ND_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA LO_EL_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA LS_MAIN_NODE TYPE WD_THIS->ELEMENT_MAIN_NODE.
      DATA LV_INP_VALUE LIKE LS_MAIN_NODE-INP_VALUE.
    navigate from <CONTEXT> to <MAIN_NODE> via lead selection
      LO_ND_MAIN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'MAIN_NODE' ).
    get element via lead selection
      LO_EL_MAIN_NODE = LO_ND_MAIN_NODE->GET_ELEMENT(  ).
    get single attribute
      LO_EL_MAIN_NODE->GET_ATTRIBUTE(
        EXPORTING
          NAME =  `INPUT_VALUE`
        IMPORTING
          VALUE = LV_INP_VALUE ).
    7) Is it possible to fix the Message window position? Show at the bottom of a screen?
        Yes it is possible to show the messages by using the message area UI element in the needed position
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you      forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text.
        Im working onit and let you know after i complete.
    Regards
    Arun.P

  • Doubt in ABAP function

    Hi,
    I have a doubt in one of the abap function module i use.
    This contain code to retrieve ,update and delete and create values in table. I am using this function  module to
    retrieve ,update and delete and create values in table.  This is the ABAP code.
    FUNCTION ZUP_DESIG12.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(DESG_CODE) TYPE  ZUP_DESIG-DESG_CODE OPTIONAL
    *"     VALUE(DESG_DESC) TYPE  ZUP_DESIG-DESG_DESC OPTIONAL
    *"     VALUE(DESG_ACT) TYPE  ZUP_DESIG-DESG_ACT OPTIONAL
    *"     VALUE(DESG_OPT) TYPE  ZUP_DESIG-DESG_OPT OPTIONAL
    *"  EXPORTING
    *"     VALUE(DESG_CODE_C) TYPE  ZUP_DESIG-DESG_CODE
    *"     VALUE(DESG_DESC_C) TYPE  ZUP_DESIG-DESG_DESC
    *"     VALUE(DESG_ACT_C) TYPE  ZUP_DESIG-DESG_ACT
    *"     VALUE(DESG_OPT_C) TYPE  ZUP_DESIG-DESG_OPT
    *"  TABLES
    *"      WA STRUCTURE  ZMSTR_DESIG
    DATA CNT TYPE I.
    SELECT MANDT DESG_CODE DESG_DESC DESG_ACT FROM ZMSTR_DESIG
      INTO TABLE WA.
    IF DESG_OPT = 'U'.
    UPDATE ZMSTR_DESIG
        SET DESG_DESC = DESG_DESC
        DESG_ACT = DESG_ACT
        WHERE DESG_CODE = DESG_CODE.
    MESSAGE 'Updated Successfully' TYPE 'I'.
    ELSEIF DESG_OPT = 'C'.
    SELECT COUNT( * ) FROM ZMSTR_DESIG INTO CNT
       WHERE DESG_CODE = DESG_CODE.
       IF CNT > 0.
       MESSAGE 'Duplicate Designation code' TYPE 'I'.
       ELSE.
      WA-DESG_CODE = DESG_CODE.
      WA-DESG_DESC = DESG_DESC.
      WA-DESG_ACT = DESG_ACT.
      MODIFY ZMSTR_DESIG FROM WA.
       MESSAGE 'Inserted successfully' TYPE 'I'.
    ENDIF.
    ELSEIF DESG_OPT = 'D'.
       DELETE FROM ZMSTR_DESIG WHERE DESG_CODE = DESG_CODE.
       MESSAGE 'Deleted successfully' TYPE 'I'.
    ENDIF.
    ENDFUNCTION.
    can any one what is  wrong in this function.
    Regards,
    H.V.Swathi

    My doubt is how to write code to insert data to table. I have written code like this.
    try{
             String str1= wdContext.currentTestElement().getCode();
              String str2= wdContext.currentTestElement().getDesc();
              boolean str3= wdContext.currentTestElement().getAct();
              String str4= wdContext.currentTestElement().getOpt();
              String str5;
              if(str3)
              str5=new String("x");
              else
              str5=new String(" ");
              Zup_Desig12_Input input=new Zup_Desig12_Input();
              input.setDesg_Code(str1);
              input.setDesg_Desc(str2);
              input.setDesg_Act(str5);
              input.setDesg_Opt(str4);
              wdContext.nodeZup_Desig12_Input().bind(input);
              wdContext.currentZup_Desig12_InputElement().modelObject().execute();
        }catch(Exception e)
             wdComponentAPI.getMessageManager().reportSuccess(e.toString());
    But i am getting      java.lang.ArrayIndexOutOfBoundsException: -1
    in line
    input.setDesg_Act(str5);
    can any one help me plz

  • Doubt about ABAP Proxies

    Hi Gurus!
    I have a simple doubt.
    Exist any difference in the name of Poxies created with SPROXY against created with SE80?
    I think "SPROXY Proxies" are named ABAP Proxies and the "SE80 Proxies" are named Client Proxies, aren´t they?
    Helpful answers will be rewarded.
    Thanks and regards,
    Manuel.

    Hi Manuel,
    SPROXY is about proxy (client or server) you generate against an SLD connection, I mean when you Business System belongs to an SLD and it is connected to it. Finally when your Bus Sys has an integration server linked.
    Via SE80 you can create also proxy related to an integration server or client proxy in order to consumer Web Servicies.
    Hope this help
    regs
    matteo

  • ABAP webdynpro concepts

    If i want to work with ABAP webdynpro,
    what are all main areas or concepts to be covered in ABAP webdynpro?

    Hi,
    Go through the below links,
    Notes:   https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9 [original link is broken]
    Wiki : https://wiki.sdn.sap.com/wiki/display/WDABAP
    https://wiki.sdn.sap.com/wiki/display/WDABAP/NewtoWebDynproABAP
    and also links,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/263c6874-0701-0010-3996-8266a631fead?prtmode=navigate
    /people/marilyn.pratt/blog/2005/12/20/web-dynpro-for-abap
    Regards,
    Azaz Ali.

  • ABAP & Java Concepts required for SAP-NW XI/PI

    Hi Experts,
        As a fresher, I want to start a career in SAP ans SAP Netweaver- XI/PI. After going through some blogs, forum, sap stuff etc, I came to know the prerequisites for XI is both ABAP and Java...
    But I am not sure which concepts in ABAP and Java are required for an SAP XI consultant, as I see SAP itself is an Ocean. So Apart from XI concepts , what are all the concepts needed in ABAP and Java.
    As for XI concepts are concerned there is a lot of stuff in SDN itself. Only thing is, one shd have patience to search and proper guidance while learning.
    Regards,
    Guru

    >
    Guru Bhai wrote:
    > Where and when do we need ABAP and Java in XI
    something quite common a question but here is a small desc.
    ABAP -
    for scenarios involving, IDoc, RFC, ABAP proxies and ABAP mappings
    Java -
    Core java - UDFs in graphical mapping
    advanced - java mapping, adapter modules, java proxies etc

  • Doubts in abap user exit and coustomer exit

    Hi every bady,
    Any one knows the different between user exit and coustomer exit please answer my question
    with regards,
    Sentha

    Hi,
    Difference between user exits & customer exits:
    User exit - A user exit is a three character code that instructs the system to access a program during system processing.
    SXX: S is for standard exits that are delivered by SAP.   XX represents the 2-digit exit number.
    UXX: U is for user exits that are defined by the user.  XX represents the 2-digit exit number
    Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    The following links are also useful:
    User Exit Vs Customer Exit
    coding in user exit in program rffous_t
    User exits
    User Exits
    Refer this link
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975e643b111d1896f0000e8322d00/frameset.htm
    Check the following links.
    For customer exits
    http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1975d943b111d1896f0000e8322d00/frameset.htm
    Difference b/w BADI and user exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    User Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    Regards,
    Rakesh

  • Doubt in  abap dictionary

    hai friends,
    i created one user defined table in abap dic, in that fields, i want u add either in or out option for one field of the table created in abap dic?
    so please send for it......
    thank u                                                                               
    suresh

    Hi Suresh
    To provide user-defined values for a field, we've to go at domain level of that field.
    As u said, for the options 'in' 'out', go to domain of that field, there u'll find value range tab, there it allows user to provide our own values.
    If this works out for u, reward me plz

  • Doubt in ABAP proxy

    Hi friends,
    I am working on ABAP Proxies in XI(Client Proxy)
    After creating the Message interface in Integration Repository ,
    I went to the ABAP proxy generation,using SPROXY.
    And went to he Message Interface (Outbound) .There its displaying
    "Proxy_intfc_OB" (this is  the message interface defined in IR)
    But when Right click on the out bound interface and press " create" .Its asking me
    "Specifications for Objects to be generated"
    under it
    Package :
    Prefix :
    whats these two and what I have to give here ....
    pls help me...

    Hello,
    When I right click  on the message Interface (OB) in SPROXY.
    I created a Package and prefix and entered.
    It showing a pop up window
    with title : Add Developer.
    Message : You are not registered as a developer .Please register in the online service system(OSS) in the OSS you will recieve an access key .
    Key
    User Name : sap1user2     
    Access key :
    Installation :  "Installation number "

  • Doubt in ABAP OOP

    CLASS SAMPLE DEFINITION.
    PUBLIC SECTION.
    DATA : PU_A TYPE I.
    METHODS : CONSTRUCTOR,MM1,MM2.
    PRIVATE SECTION.
    DATA : PR_B TYPE I.
    ENDCLASS.
    CLASS SAMPLE IMPLEMENTATION.
    METHOD CONSTRUCTOR.
    ENDMETHOD.
    METHOD MM1.
    ENDMETHOD.
    METHOD MM2.
    ENDMETHOD.
    ENDCLASS.
    DATA : OBJ_SAMPLE TYPE REF TO SAMPLE.
    <b>CREATE OBJECT OBJ_SAMPLE.</b>
    In CREATE OBJECT OBJ_SAMPLE its giving err msg that statement could not be accessible.why id it so?.plz help

    hi
    copy paste my code and check. its very simple one that ur are looking for.
    REPORT  zaaclc_report.
    *       CLASS lcl_test_class DEFINITION
    CLASS lcl_test_class DEFINITION.
      PUBLIC SECTION.
        METHODS increment_counter.
        EVENTS break_statement EXPORTING value(count) TYPE i.
      PRIVATE SECTION.
        DATA: num TYPE i,
              max TYPE i VALUE 5.
    ENDCLASS.                    "lcl_test_class DEFINITION
    *       CLASS lcl_test_class IMPLEMENTATION
    CLASS lcl_test_class IMPLEMENTATION.
      METHOD increment_counter.
        num = num + 1.
        IF num EQ max.
          RAISE EVENT break_statement  EXPORTING count = num.
        ENDIF.
        WRITE:/ num .
      ENDMETHOD.                    "increment_counter
    ENDCLASS.                    "lcl_test_class IMPLEMENTATION
    *       CLASS event_receiver DEFINITION
    CLASS event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS handler FOR EVENT break_statement OF lcl_test_class  IMPORTING count.
        endclass.
    *       CLASS event_receiver IMPLEMENTATION
    CLASS event_receiver IMPLEMENTATION.
      METHOD handler.
    *    count = count + 10.
        WRITE :/ count.
        WRITE :/ 'Event Raised'.
        endmethod.
    ENDCLASS.                    "event_receiver IMPLEMENTATION
    DATA:obj TYPE REF TO lcl_test_class,
         rec TYPE REF TO event_receiver.
    START-OF-SELECTION.
    CREATE OBJECT: obj,rec.
    set handler rec->handler for obj." for all instances.
      DO 10 TIMES.
        CALL METHOD obj->increment_counter.
      ENDDO.
    <b> hope it clears ur doubt</b>
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>
    Message was edited by:
            ravish goyal

  • Doubt in ABAP Data types

    Hi friends,
    I want a clear idea of what is the diference between data type 'f' and 'p' with examples and in what situation which should be used.
    Similary what and where is 'x' and 'xstring' is used .. In what situations we 'll handly BYTE data ?????
    Iam not at all clear ... so eagerly waiting for ur responses with sample examples and clear explanations
    thanks in advance
    Cheers,
    R.Kripa.

    Hi Kripa,
    Types X and XSTRING are for binary data. For type X, the length of the data is specified at declaration, whereas for XSTRING, it can arbitrarily grow as for STRING.
    X      binary octets                 RAW       base64 string 
    Type X is used for binary octets. The length of the octets sequence must be specified at declaration. The initial value of each octet is 0.
    The lexical representation of binary octets is a sequence of characters in the MIME base64 format.
    There are two possible representations of data of type X, namely base64 and hex. base64 is a preferred binary coding scheme in the Internet community. There are standard libraries for encoding and decoding. base64 uses about 33% less space over hex coding. Although ABAP MOVE uses hex coding for binary to character conversion, base64 will be used to represent data of this type in XML.
    Note that the sequence of octets is transformed by the base64 encoding. The result, interpreted as a sequence of US-ASCII characters, appears as a sequence of Unicode characters in the content of that element.
    Dictionary type RAW corresponds to this type.
    XSTRING variable length binary octets RAWSTRING base64 string 
    Type XSTRING is used for a variable length binary octets. The initial value is ''. The length can vary as the string grows.
    The lexical representation of this type is the same as Type X.
    This type corresponds to the binary type.
    Dictionary type RAWSTRING corresponds to this type.
    Regards,
    Raj

Maybe you are looking for

  • The computer works very bad after upgrade from 10.4.11 to 10.5

    hi, I have upgraded my powermac g5 double processor from 10.4.11 to 10.5 now the computer works very bad. If I try to launch software update the application crash, final cut pro crash, when I try to mount a disk image the application crash, firefox i

  • Visited Google Links No Longer Change Color

    On my preferred browser Safari 4.1.3, visited Google links no longer change color from blue to violet.  Any fix other than upgrading OS and Safari browser?

  • Using created JVM in C

    Hello all, I have a JavaUI containing JTextField and a method that calls setText of this field. First I brings up this UI then I want to invoke the method through C that setText the field. Can anyone help me of how to go about it. Thanks in advance,

  • How to integrate two VIs (diffserv,​intserv)

    hi  i need help in the to make  integration of two vi (DiffServ,IntServ) attached with this  email  as my topic is integration of differentiated services and Integrated services .. how i can integrates these two VIs thanks Attachments: Diffserv.vi ‏5

  • SELECT * CONNECTION not work

    Hi, It is found that SELECT * does not work with CONNECTION. For example, I use the following statement to retrieve data from another system and an error states that SQL error 207 when accessing table 'MARA'. 'Invalid column name  'ANIMAL_ORIGIN''. I