Counting Data types inside compiled objects...

Hi Gurus,
My requirment is that for any user,we create 'n' no of Functions/Procs/Packages,etc.Now, all these objects will have data-types defined in them.Can i get an overall count of data-types used in a particular user...(going inside the code and checking the data types it has & the count like
For User : Scott
COUNT(*) DATA_TYPES
10 NUMBER
4521 VARCHAR2
239 XMLTYPE..
etc..
Hope some one helps...

Query and Count using the dictionary view ALL_ARGUMENTS

Similar Messages

  • Reference data types in interface objects?

    How do you create reference data type based on data type in interface object??

    First create the reference DT1 in IR then create a new data type DT2 and if you want to create a reference to DT1 then in  the editor select Type (3rd coloum) as the DT1 which you can get by double click on Type and then you select "search help" and select DT1 from the list.
    Cheer's

  • Setting data type of an object at run time

    This is something of an advanced problem, so I hope there's
    someone out there who can speak to this. I apologize for the length
    of the post, I'm just trying to be clear about a rather unclear
    conundrum. --
    We all use arrays to hold collections of things. As you know,
    an array is its self a type (Array) and so there is no way to
    declare, for instance, an array of MovieClips or an array of
    Strings. Heres what happens: lets pretend that we have 3 movie
    clips clip1_mc, clip2_mc, and clip3_mc, and an Array called
    anArray. so we can legally do this. anArray.push( clip1_mc );
    anArray.push( clip2_mc ); anArray.push( clip3_mc );. An array of
    size 3. Now the code: trace( typeof anArray[0] ); will output
    "object." This can be a problem. If you try this: var
    newClip:MovieClip = anArray[0]; you get a type mismatch from the
    compiler. "Found Object where MovieClip is required." It
    necessitates this: var newClip:MovieClip = MovieClip( anArray[0] );
    Bummer no?
    Ok. So fast forward. Lets assume a class List that uses an
    array to hold the items in the list. So the class uses the Array
    class in "composition." So you have methods like insert( ); and
    retrieve(). Retriece() returns an item from an index in the array.
    Because of the aforementioned problem, no matter what type the
    thing was going into the list it comes out with type Object because
    the retrieve function must return an item of some type, the only
    option is to declare the return type of the retrieve() function as
    Object. Lets say you know that this is a list of Strings. You could
    write the retrieve()'s code like: return String( returnItem ); And
    type the object "on the way out" .. but what if you want the list
    to work with any type object, you would have to have a variable to
    hold the desired type of objects in the list. And then as the
    objects are being returned, you'd cast them to the type stored in
    that variable. I guess that you'd pass the type to the constructor
    of the List: var aList:List = new List( "AddressCard" ); -- That
    should declare a List (Array) of AddressCards.
    Is there a way to do this? have the type specified in casting
    be dynamic?
    And the flip-side of that is detecting the name of the class
    of an object instance. The thing here would be to try to derive a
    String from the name of the constructor function. (which is always
    the class name) In actionscript 3 there is a service package--
    mx.util -- I think, that has a function to return the qualified
    class name of an object. But is there a jimmy rig for this in AS2?
    My actual project does not use an Array to implement List. (
    or Stack ) It uses a structure called a "linked list" - which is a
    whole other topic, but same problem as with Arrays is also present
    in the linked list versions and so requires the same solution. If
    one is willing to type things explicitly when assigning an item in
    the list to a variable of some type, this thing is quite excellent.
    But I don't like it. I have the package with docs, code, sample
    fla's, diagrams and everything that I would encourage people to
    download, look at, try and whatever and then come back here with
    any thoughts on it. There is a component with Flash professional
    that is a list like structure, but it's so general that it crosses
    the line into bloat. Ie: if you are using a list as a stack, you
    only need getTop() and pop() and push() not all the other (12 or
    so) methods in the class. Mine are patterned after structures from
    the C++ standard template library. And the code style is C++, but I
    think it's actually easier to read that way.
    the files:
    http://www.null.bz/ADL_Lib/ADT_Lib.zip
    Thanks in advance, for your efforts! I really appreciate all
    of it, helpful or not.

    First reactions:
    >>var newClip:MovieClip = MovieClip( anArray[0] );
    Even though you must use a cast to prevent the compile time
    error, you don't get an error on this line because the compiler
    skips typechecking for values accessed with the [] operator.
    >>Is there a way to do this? have the type specified in
    casting be dynamic?
    Nope. You must effectively type check all objects used
    through array elements yourself.
    Reading on...

  • Basic Data Types as Class Objects

    Consider the following code using the java.lang.reflect.Method
    Class c = Class.forName("java.util.Date");
    // get all methods in Date
    Method[] c_classes = c.getMethods();
    // get the UTC method - UTC(int year, int month, int date, int hrs, int min, int sec)
    Method m = c_classes[0];
    // get the parameters (all int)
    Class[] p = m.getParameterTypes();
    This gives a Class array of basic data types (in this case int) - in debug the variable is of type "class" with value "0x16d9220:class(int)"
    How do you create a Class object of a basic data type from scratch? I've tried Class.forName("int") and get an exception.
    Cheers
    Gareth

    You could use the class literals.
    Class[] primitiveTypes = {
    boolean.class,
    byte.class,
    char.class,
    double.class,
    float.class,
    int.class,
    long.class,
    short.class,
    Cheers, that's exactly what I needed.
    Gareth

  • Data type of Souce Object Vs BW Object

    Hi All,
    Our Source system is Oracle system.We have a field 'delivered date' (Database type is 'DATE' and Type in DDIC is 'DATS').
    for example: 20.09.2005 08:17:15
    Our requirement is to display this data as it is in BW report on ODS.
    Shall go for BW infoObject with data type 'CHAR' ? does it lead to any issues while loading from oracle to BW as source data type is 'DATS' and BW Object  data type is 'CHAR'?
    Is necessary to maiantain same data types here?
    If dont go with data type 'CHAR', it is not possible to display date and time together.
    I have tested with flat file and it works fine.
    Thanks

    Hi,
    Thanks for your reply.Thats what i had thought of doing.we need not represent it as Date as its combination of date and time.This is the only way to get it i guess.(defining 'CHAR' infoObject and mapping to 'DATS' of source field ).
    Any other possibilities?
    Thanks

  • Mixing ESR Data type and XSD Objects

    Dear PI forum users,
    I have created some XSD containing complex types and thus "acting" as data types.
    I would like to use such a complex type defined in XSD in an ESR Data type object.
    But when I use the search help in the type column, i can only see other data types objects and not complex types defined in External definition objects.
    Do you know if what I want to do is possible and how ?
    Thanks a lot.
    Jean-Charles

    Hi,
    i can only see other data types objects and not complex types defined in External definition objects.
    This is because only datatypes are shown in the search help. It is not possible to reference an external definition in a data type.
    What you can do is:
    1.) Recreate the complex types found your external definition as a data type, and reference it in your main data type
    or
    2.) Encode the data types into your external definition (cleaner)
    Hope this helps,

  • To put Data type inside a table of Microsoft Access (dummy ask)

    Hi to all,
    I am new to use database in java ... (but I did it long time in Visual Basic) and I have a trivial problem...
    I try this SQL statement in different why without success...
    int clientIdKey = 3;
    Date = regneDate new Date();
    "INSERT INTO myTable (idCli, dateReg) VALUES (" + clientIdKey + ", #" + regneDate + "# )";
    The message error I get in this case is the follow:
    "java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression '#Sat Oct 20 16:54:23 PDT 2007#'".
    (I tried to format the value of regneDate in different why too... but it was not good the same...)
    I know the mine is a stupid problem .., but I am not going to get the right road, so I ask to some one that it know the whay to say it me please...
    Thank you very much
    regards
    tonyMrsangelo

    Joe's correct. Do it like this:
    int clientIdKey = 3;
    Date regneDate = new Date();
    String sql = "INSERT INTO myTable (idCli, dateReg) VALUES(?,?)";
    PreparedStatement stmt = null;
    try
        stmt = connection.prepareStatement(sql);
        stmt.setInt(1, clientIdKey);
        stmt.setDate(2, regneDate);
        int numRowsAffected = stmt.executeUpdate();
    catch (SQLException e)
        e.printStackTrace();
    finally
        try { if (stmt != null) stmt.close(); } catch (SQLException e) {}
    }    %

  • Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE

    hai
    can any one say the differences between Data type and Data Object.
    And also differences between TYPE and LIKE
    thanks
    Gani

    hi,
    _Data Types and Data Objects_
          Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
          In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
       As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
         All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b.  Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
          Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
           Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
            A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
          Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
         The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a.  Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b.  Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c.  Anonymous Data  Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d.  System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e.  Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    What is the difference between Type and Like?
    Answer1:
    TYPE, you assign datatype directly to the data object while declaring.
    LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    Answer2:
    Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Answer3:
    type refers the existing data type
    like refers the existing data object
    reward if useful
    thanks and regards
    suma sailaja pvn

  • Issue with Info Object Transport after changing Data Type

    Hi Experts,
    We have a DSO which is running past 5 years. And recently(3 days back) we added new fields into that DSO. Delta loaded for last three days and new info object (Say XXX) data populated into DSO.
    Now the problem is, We identified that, info object data type is not correct. We used data type NUMC  instead of CHAR.So Character information is missing for that field.
    Example:
    Data from ECC: ABC123
    Data Loaded to DSO: 123 (Missed character ABC)
    So we deleted data from DSO and changed the info object data type in Development system.
    And also I have deleted only last three days delta records from DSO and transported my info object to Production. But its giving error as: Info object contains data in DSO".
    But that info object field is empty in DSO. I have already deleted last three days delta.
    Do I need to Delete all 5 years data from DSO to change the data type of recently added new info object ?
    Please give me your solutions and ideas to solve this issue.
    Thank you,
    Best Regards,
    Santhosh

    Hi Raman,
    Thank you for your answer.
    When I changed the data type of info object in Dev, I deleted the content of DSO. And same thing transported to QA as well. Before importing changed info object, I just deleted the content of DSO from QA. So transport done successfully QA.
    But in Production we have a history of past 5 years. So I cant delete all contents of DSO.
    So just deleted only the delta request's which contains data for that info object(3 days back, we moved that info object(NUMC data type) to production,So last 3 days delta only loaded for that info object). And tried to transport it. But it was failed. I am sure we need to drop all data from DSO, if I am interested to go with same info object.
    I have some comments on your first approach,
    1. If we delete info objects from Dev DSO and transport to Production will give transport failure, Why because, my previous transports errors clearly saying that info object contains data in DSO . So it wont allow to remove that info object from DSO.
    2.We are using same info object technical name in BO Data federator also. So if we change add new info objects again we need to make changes with BO as well. I am thinking this point as my last option if i cant find any other solution.
    Thank you.
    Best Regards.

  • Issue with the Data Type 'Number' in Business Objects

    Hi,
    I have an Object in the Universe where the Data Type of the Object is a number. This Column pertaining to this Object has certain values in the database out of which there is a 17 Digit Value which is 00000000031101165.
    Now, when trying to retreive the same value through Business Objects it is getting rounded off to 00000000031101200 automatically when trying to view in Webi and when trying to retreive the same in Designer/Deski, it displays as 0.000000003110116E+16.
    So, I would like to know if there is any other alternative in trying to retreive the Original Value that would not round off. Also, do we have any Limitation for the Data Type Number in Business Objects? The Version we are on is XI3.1.
    Note: There are no functions that are used on this Object at the Universe Level and would not like to use any functions here.

    What is the underlying database?
    It looks like the data is considered to have two decimals, but is rounded to zero decimals.
    Only you don't see the number formatting.
    Is this a BW query?
    Is this a calculated keyfigure?
    In the query you can specify the rounding you want and it is also possible to specify it on an infoobject level.
    Check those settings...
    Hope this helps,
    Marianne
    PS. Oh, and about the formatting, you can specify a default object format in the universe and override it on the final client (WebI, Crystal)

  • Data types and data objects

    diff b/w data types and data objects

    hi prasanth,
    Data Types and Data Objects
    Programs work with local program data – that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and – as a further attribute – by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
    In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
    Data Types
    Data types are templates for creating data objects. Data types can be defined independently in the ABAP program or in the ABAP Dictionary. As attributes of a data object, data types can also exist in a non-independent state. Data types do not use any memory space for work data, but may require memory for administration information.
    As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
    All programming languages distinguish between various types of data with various uses, such as ….. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
    Data types can be divided into elementary, reference, and complex types.
    a. Elementary Types
    These are data types of fixed or variable length that are not made up of other types.
    The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
    Predefined and User-Defined Elementary Data Types
    You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
    b. Reference Types
    Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
    c. Complex Data Types
    Complex data types are made up of other data types. A distinction is made here between structured types and table types.
    Data Objects
    A data object is an instance of a data type and occupies as much memory space as its type specifies. An ABAP program only works with data that is available as content of data objects. Data objects are either created implicitly as named data objects, or exanonymous data objects using CREATEDATA.
    Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
    Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
    A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
    Declaring Data Objects
    Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
    The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
    ABAP contains the following kinds of data objects:
    a. Literals
    Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
    b. Named Data Objects
    Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
    Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
    Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
    Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
    c. Anonymous Data Objects
    Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
    d. System-Defined Data Objects
    System-defined data objects do not have to be declared explicitly - they are always available at runtime.
    e. Interface Work Areas
    Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
    regards,
    sravanthi

  • Assigning Data-Type Select-Option from Report to Method

    Hi Specialists,
    How can I solve the following task smart?  It’s a quiet simple task. In my Report I’ve some Select-Option-Data-Types and I want to assign this data-type an Abpab-Object-Method. Is it possible to do this in a smart fashion. I’ve fight with the Abap-Syntax und at the end I’ve found a tricky way of assigning the Select-Option parameter to the Abap-Object-Method.
    If somebody have a smart idea for this problem, pleas let me know.
    Thankx.
    Hallo Spezialisten,
    ich hätte da eine Frage wie man folgende Aufgabe elegant lösen kann.
    Es ist ganz einfach, ich möchte von einen Report einen Select-Option-Datentyp an eine Abapobject Methode übergeben. Ich hatte sehr lange gekämpft bis ich ein umständlichen weg gefunden habe die parameter vom reprot an die mehtode zu übergen.
    Falls jemand da eine gut Idee hätte wäre mir das nächste mach sehr geholfen.
    Danke

    Hi 
    Here is the Program with  Selection screen and   the Class & Methods.
    REPORT demo_abap_objects_methods NO STANDARD PAGE HEADING.
    * 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.
    * Class Implementations
    CLASS c_team IMPLEMENTATION.
      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.
      METHOD constructor.
        counter = counter + 1.
        id = counter.
      ENDMETHOD.
      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.
      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.
      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.
      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.
    ENDCLASS.
    CLASS c_biker IMPLEMENTATION.
      METHOD constructor.
        counter = counter + 1.
        id = counter - members * ( team_id - 1 ).
        CREATE OBJECT bike.
      ENDMETHOD.
      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.
      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.
      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.
    ENDCLASS.
    CLASS c_bicycle IMPLEMENTATION.
      METHOD drive.
        speed = speed  + gear * 10.
        velocity = speed.
      ENDMETHOD.
      METHOD stop.
        speed = 0.
        velocity = speed.
      ENDMETHOD.
      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.
    ENDCLASS.
    * 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) TYPE c.
    * 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.
    Reward  points if it is usefull ....
    Girish

  • Conversion data type error at universe level

    Hi Friends,
    I am trying to convert a object datatype from number to char by using cast function in Universe Designer. I am getting bellow error. Help me on this.
    Thanks
    Riaz

    Hi,
    Try changing the data type of the object at business layer by selecting the related object instead of changing the data type at data foundation layer.
    Hope it helps.
    Grtz
    -Anila.

  • How to Find the Data Type of the Field In a Database Table

    Hi Experts,
    I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
    Thanks a lot.

    Hi,
    Use this..
    DESCRIBE FIELD dobj  TYPE typ.
    write typ.
    type will contain the data type of the object.
    and check this thread also....
    Re: How to get datatype of fields in dynamic structures
    Cheers,
    Simha.
    Reward all the helpful answers..

  • 'DATE' type in SQL converting to a 'STRING' in CR2008.

    Help!
    We have just installed the stand-alone version of CR2008 and running against a SQL db back end. The newest version of SQL consists of a data type, 'DATE' that's being recognized in CR as a 'STRING' when the stored procedures are accessed. However, I am converting it back to a 'DATE' data type inside the report and everything looks fine in the CR viewer.
    Our concern:
    Could this be an issue when the .rpt files are called via an ASP page?
    Thanks,
    Tony

    Hi Tony,
    I just checked by adding a Date field type into my 2K8 server and you are correct if you use the Native SQL Server driver. CR does see it only as a string. By default and to handle new types that DB makers can add, CR will convert any type is doesn't recognize into a string.
    However if you install SQL Server Client 10 driver and use it then you will see the Date field as a date type.
    So, if you are using MS SQL Server 2008 then simply install the Client and then you can use the SP.
    You can install it off the MS CD or use this link to their tools:
    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
    Look for the Client install only, 32 or 64 bit.
    Thank you
    Don
    Edited by: Don Williams on Nov 20, 2010 12:39 PM

Maybe you are looking for

  • IPhone 3G - email works in wifi; doesn't work over 3G or Edge

    Anyone else experienced this problem? Since the middle of this past week, my iPhone 3G cannot send or receive email from my POP account over the 3G or EDGE network. It works fine over WiFi however. I took it to the Apple Store where they were able to

  • Urgent...Firmware error?

    I've had my iPod mini since march of this year. Up until this new update it has been working just fine. Now, however, it has decided not to work for me at all. So, first I downloaded new iTunes new iPod software, it said it needed to be updated. I go

  • Transfer app from one iPhone to another - no longer in App store

    I have just received my iPhone 5s. On my 4s I have an app (American Heritage Dictionary) that is no longer available in the App store, so it's no longer listed among my purchased apps, even though it cost $30. Any idea how I can transfer it from the

  • Java TV 1.1 License for Maven

    Hello, there. Can anybody tell me whether I can or not upload Java TV 1.1.1 sources (and recompiled classes) to Maven Central Repository? I'm a TV application developer. And I want to make a JavaTV artifact for development. I read the license text, b

  • Upgrading Windows XP to Windows 8 on my Mac

    I currently run Windows XP on my Mac.  I recently upgraded to Mountain Lion, only to discver that Windows XP doesn't work with Mountain Lion.  My question:  Am I able to upgrade to Windows 8?  Or will it not recognize that I already have Windows XP t