Date type is unique by default?

Hello,
I have created a table with date data type. All records are inserted but same date records throws following error:
ORA00001-unique constraint (aa.sys_C005487) violated
Best regards

Before you blindly drop the constraint, you might want to consider a few things.
Is there a real business reason why the constraint needs to be in place?
Is the constraint actually only on the single date column, or a combination of columns? You can use the user_cons_columns view to find out.
There will be a (probably) unique index supporting the constraint. You may want to consider if you need to keep it. If so, then, if it is a unique index, you will have to rebuild it after you drop the constraint. If the index is not unique then you can use the keep index clause on the drop constraint statement.
You should also make sure that ti is actually a constraint, and not just a unique index. For example:
SQL> CREATE TABLE t (id number, descr varchar2(10));
Table created.
SQL> CREATE UNIQUE INDEX t_unq ON t(id);
Index created.
SQL> INSERT INTO t VALUES (1, 'One');
1 row created.
SQL> INSERT INTO t VALUES (1, 'Ein');
INSERT INTO t VALUES (1, 'Ein')
ERROR at line 1:
ORA-00001: unique constraint (OPS$ORACLE.T_UNQ) violated
SQL> SELECT constraint_name, constraint_type
  2  FROM user_constraints
  3  WHERE table_name = 'T';
no rows selectedJohn

Similar Messages

  • Display as is having what data type?

    Hi Friends,
    I have an item in page and i have selected that item as display as. Then what data type it contains by default.
    Regards

    Hi,
    It can be of any type and it will accept all the data types, because this item is not related to the table.
    Since this item type will be of Static text with session state substitutions and it doesnt matter of any datatypes.
    What is the necessary of this question???
    Regards,
    Mini
    Mark Answers Promptly

  • How to Get Default Value of a Data Type in SQL Query.

    Hi all,
    I am creating a procedure which will take input the table name and Column Name.
    In the Output i would like to have the data type and default value of that data type which will be used by a another procedure to blank the selected column in the database.
    I tried with SET NULL on the column but as the database is of navision the table have property set to NOT NULL.
    Here is what i have done till now.
    Create Procedure Get_Column_type
    @parm_table_name nvarchar(200),
    @parm_column_name nvarchar(20),
    @parm_result nvarchar(20)OUTPUT
    AS
    BEGIN 
    select @parm_result =
    DATA_TYPE from INFORMATION_SCHEMA.COLUMNS IC
    where TABLE_NAME = '[' + @parm_table_name +']' and COLUMN_NAME = '[' + @parm_column_name + ']'
    END
    GO
    Now instead on write a case statement for so many data types in SQL, i was thinking is it possible someway that above procedure also returns the default value which i can set in another procedure.
    Let me know if its possible or not? Thanks in advance.

    Do you looking for something like this?
    create table t10 ( c int default 1)
    SELECT so.name AS table_name, 
              sc.name AS column_name, 
              sm.text AS default_value
         FROM sys.sysobjects so
         JOIN sys.syscolumns sc ON sc.id = so.id
    LEFT JOIN sys.syscomments SM ON sm.id = sc.cdefault
        WHERE so.xtype = 'U' 
          AND SO.name = 't10'
     ORDER BY so.[name], sc.colid
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Default date type for IT0041 in action

    Hi,
    I configure feature DATAR to set 01 as default date type for IT0041, but when I do hiring action, default date type will be 01,02,12.
    Don't know where to change the default.

    Hi,
    Please verify if there is any dynamic action in table V_T588Z set-up for same which may cause override over default.
    Also, verify if your DATAR feature is set up correctly for relevant country grouping and activated.
    Thanks,
    Ameet

  • How to set a default date for a custom field of Date type in project server 2010.

    hi,
    can somebody help  me.
    How Can i set the default date for a custom field of date type in project server 2010 ?

    Dear Rohan,
    You can set default value to custom field thru Lookup table. Assign lookup table to custom field and set default value to some lookup value (Note: check the “Choose a value to use as a default when adding new item” checkbox).
    Regards,
    Avinash kumar | Blog:http://avigr8.wordpress.com | If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.

  • How to set default value to date type attribute.

    Hi,
    How to set default value to date type attribute.
    E.g I want to set u201C01/01/1999u201D to date attributes.
    First i want to set value and then i want to fetch the same & want to check equals.
    please suggest solution.
    Regards,
    Smita

    Hi,
    In wdinit() method u can set the date
    DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
    Date today = Calendar.getInstance().getTime();
    String reportDate = df.format(today);
    wdContext.currentContextElement().setFromDate(reportDate);
    Another way you have set the this formate like that
    1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
    2. Select the type as "date"
    3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
    4.Bind the context attribute to the type created now.
    Hope this helps u.
    Best Regards
    Vijay K

  • Default values for data types

    what are default values for all the data types that exist  in abap
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    For CHAR data type default is SPACE
    for INTEGER,PACK and FLOAT types it is ZERO '0'
    for NUMERIC also so many Zeros
    for Time(TIMS) it is 6 zeros and Date(DATS) it is 8 zeros
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • Defaulting Date Types in IT0041

    Hi All,
    I have a issue in defaulting Date Types in IT0041,
    There is a feature DATAR for defaulting Date Types in IT0041. When I create new IT0041 by PA30, values from feature DATAR is getting defaulted.
    But, when i run Hiring Action and at that time vaules from feature DATAR is not being called, its defaulting some other date types.
    Is there any other place where Date Types are defaulted?
    Please let me know if you want any more information
    With Regards
    Shyam

    Hi All,
    Current problem is rectified,
    Solution : I have used INSS instead of INS. In this case values from DATAR is getting defaulted
    New issue is there,
    Some dynamic action is automatically updating with Date Types those which are not there in DATAR. I dont know from where these values are being picked....
    I will continued my research and let you guys know the status.
    I request others to share their thoughts..
    Regards
    Shyam V

  • [Access 2010] Change default formats for data types

    Whenever I import data, the default format for Boolean data types is "-1,0." I know how to subsequently change this format to "Yes/No," but I'd like to change the default
    setting to "Yes/No." Is this possible?
    Thanks in advance.

    Hi,
    I found you post the same question in other place and got the advice. I agree with Mr. Kees suggestion. The data type is a build-in default setting with Access, we can't change it. We may try the workaround via VBA to test.
    http://forums.cnet.com/7723-6129_102-627633/access-2010-change-default-formats-for-data-types/#message5617496
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Have a good time.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Migrating Sybase "timestamp" data type to Oracle DB

    Hi,
    We are migrating huge Application currently running on Sybase database
    to Oracle 10.2.0.3 (500+ Tables and Stored Procedures).
    Have following questions regarding this Migration.
    1) Many of the Sybase Tables have column which is of Sybase data type "timestamp".
    Do you have any recommendation what is the data type to be used in Oracle for
    migrating "timestamp" data type in Sybase?
    2) How should we migrate existing data and business logic residing in Sybase for
    data columns of Sybase data type "timestamp" ?
    Given below are details on how we use Sybase timestamp Column in our Application
    and we are trying to arrive at the best Solution that is possible for migrating
    all those Tables and related business logic to Oracle.
    We have following Control Table in Sybase which has column of timestamp data type and
    some other Business keys.
    sp_help EQP_IES_CRE_TIMESTAMP (This is similar to desc <table> command in Oracle)
    EQP_IES_CRE_TIMESTAMP,dbo,user table
    default,Nov 14 2001 10:39AM
    CRE_TIMESTAMP ,timestamp,8,,,0,,,,0
    REF_NUM ,char,30,,,0,,,,0
    REC_UPD_DT ,datetime,8,,,1,,,,0
    EQP_IES_CRE_TIMESTAMPI1,clustered, unique located on default, CRE_TIMESTAMP, REF_NUM, REC_UPD_DT,0,0,0,
    Following is the overall logic used in Sybase
    -- Step 1: Based on Event, populate Control Table with new Row.
    -- CRE_TIMESTAMP timestamp Column gets auto-populated by Sybase
    insert EQP_IES_CRE_TIMESTAMP (REF_NUM, REC_UPD_DT)
    values (@uuid_ref_num, @event_cre_dt)
    Since CRE_TIMESTAMP is auto-populated, it does not appear in above INSERT statement.
    -- Step 2: Store timestamp value populated by Sybase in previous step,
    -- to variable @event_timestamp. This value would be referenced
    -- later in other SQL statements
    select @event_timestamp = CRE_TIMESTAMP
    from EQP_IES_CRE_TIMESTAMP
    where REF_NUM = @uuid_ref_num
    and REC_UPD_DT = @event_cre_dt
    -- Sample value for @event_timestamp could be '001c0000182f2089'
    -- It is not very readable or understandable
    -- Step 3: Delete Control Table entry made in Step 1
    delete EQP_IES_CRE_TIMESTAMP from EQP_IES_CRE_TIMESTAMP
    where CRE_TIMESTAMP = @event_timestamp
    -- Step 4: Make use of saved timestamp value from Step 2 to trigger queries
    -- against other Tables that have timestamp Columns
    -- Some sample queries are as shown below
    delete eqp_staging
    where event_timestamp > @event_timestamp;
    insert into eqp_movement values(@event_timestamp, ......other columns) ;
    Any idea how above Table and logic could be migrated to Oracle DB
    We would also like to know how data values that currently exist
    in Sybase Tables should be populated in Oracle .
    Any suggestions or tips would be greatly appreciated
    Thanks
    Auroprem

    Hi All,
    Thanks for your responses.
    We have decided on Solution to migrate "timestamp" Column from Sybase to Oracle, that is
    specific to our Application needs.
    Following is what we decided:
    1) Create RAW Column in Oracle which would contain data Replicated from Sybase "timestamp" Column as is.
    2) Create additional Column of INTEGER data type to store number equivalent of Sybase "timestamp" column
    which would be more usable and consummable in Oracle as compared to RAW datatype.
    3) Write Row-Level INSERT/UPDATE Trigger on migrated Oracle Table to populate INTEGER Column using
    SQL Function TO_NUMBER(<raw_column_value>, 'xxxxxxxx').
    4) Applications that access this Table, upon migration to Oracle, will now start referencing INTEGER Column
    newly defined, and populated via Trigger.
    Please let us know if you see any issues with this approach
    Thanks
    user641521

  • Data types in internal tables.

    Examples for LINE & KEY.

    Mithun,
    Internal Tables as Data Types
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    Line type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    Pls. reward if useful

  • 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

  • Data typs

    hi
    dEFINE
    C,P,F,X,N,I DATA TYPES
    GIVE ME EXP. ALSO

    U can check this
    <b>ABAP/4 Data Types</b>
    There are two main categories of data in ABAP/4: character and numeric. Variables receive special treatment by the ABAP/4 processor based on their category that goes beyond the usual treatment given by other languages. Therefore, it is especially important for you to be able to recognize and distinguish between the character and numeric data types.
    Character Data Types
    The character data types are shown in Table 7.2. Notice that they include type n. Internal lengths are given in bytes. A dash in the Max length column appears for fixed length data types.
    Table 7.2  List of Character Data Types
    Data
    Type Internal
    Description  Default
    Internal
    Length Max
    Internal
    Length
    Valid
    Values  Default
    Initial
    Value
    c character  1 65535 Any char Blank
    n numeric text  1 65535 0-9 0
    d date  8 (fixed) - 0-9 00000000
    t time  6 (fixed) - 0-9 000000
    x hexadecimal  1 65535 Any
    The Default Initial Value column indicates the value given to the variable by default if you do not specify one using the value addition.
    Internal Representation of Variables
    Numeric text variables are called numeric character variables and hold unsigned positive integers. Each digit occupies one byte, and internally each is stored as a character. This is a character data type. It can only contain the characters 0-9.
    Use numeric text to hold numbers that are used as unique identifiers, such as document numbers, account numbers, and order numbers. Also, use it for variables that hold a numeric extracted from a character data type. For example, if you were to extract the two-character month from a date field and needed a variable to store it, you should use a type n field.
    Date and time are fixed length data types. You should not specify a length on the data statement for them. Values for date and time variables are always stored internally as YYYYMMDD and HHMMSS, respectively. The current date is available in the system field sy-datum and the current time in sy-uzeit.
    NOTE
    The values of sy-datum and sy-uzeit are set at the beginning of program execution and do not change until the program ends. If you need access to the most current date and time during execution of a long-running pro-gram, use the statement get time. It updates the values of sy-datum and sy-uzeit to reflect the current date and time. 
    Absolute time values that have millisecond precision are not used in R/3. However, relative time values are available to millisecond precision. To obtain these, use the get run time statement and store them using data type i. See the chapter on runtime analysis for more details.
    Numeric Data Types
    The numeric data types are shown in Table 7.3. A dash in the Max Length column indicates the length cannot be changed. An asterisk indicates the attribute is machine-dependent.
    Table 7.3  Numeric Data Types
    Data
    Type
    Description  Default
    Internal
    Length
    Max
    Length
    Max
    Decimals 
    Valid
    Values Default
    Initial
    Value 
    i integer  4(fixed) - 0 -231 to +231  0
    p packed decimal  8 16 14 0-9 . 0
    f floating-point  8 8 15* -1E-307 to 1E308  0.0
    All of the variables in Table 7.3 are signed. In floating-point variables, the exponent is also signed.
    Use integers for variables that will be involved in simple computations or when no decimal points are required. Variables such as counters, indexes, positions, or offsets are good examples.
    A decimal variable stores (L*2)-1 digits, where L is the length of the variable in bytes. Decimal values are stored two digits per byte, except the end byte, which contains a single digit and a sign. The decimal point itself is not stored; it is an attribute of the definition. For example, data f1(4) type p defines a variable f1 that is four bytes long and can hold seven digits (plus a sign), as shown in Figure 7.2. data f2(3) type p decimals 2 defines a variable f2 that is three bytes long and can hold five digits (plus a sign). The definition data f3 type p defines a variable f3 capable of holding 15 digits because the default length for type p is 8.
    Refer this link for the above and some sample programs
    http://cma.zdnet.com/book/abap/ch07/ch07.htm

  • Error while transporting a data type

    Hello all SAP PI Experts,
    I'm trying to transport a data type but I'm getting the below mentioned error.
    This is happening even when I gave the proper name of SWCV that contains this data type.
    Please suggest how this problem can be solved.
    Thanks,
    Ajeya G V

    Hi Ajeya,
         An easy trick is to open the DataType on your Enterprise Service Builder, and once it is opened,  (not edit, just open) go to Tools --Export Design Object
    The correct SC will be filled as default.

  • Issue when SelectOneChoice is used with Domain data type in JDev 11.1.2.0.0

    Hi,
    I am facing one issue while working with SelectOneChoice along with Custom Domain data type. Sample app to simulate the issue is available at http://www.filejumbo.com/Download/6FDF6ECF2922BD24
    Issue Details.
    Base view object’s attribute is of type CustomString, for which another static VO’s attribute is attached as LOV. LOV attribute is of type String. Because of this data type mismatch between LOV VO attribute and Base VO attribute, while working in screen, initially we were facing Class cast exception.
    Cannot convert <<LOV Attr. Val.>> of type class java.lang.String to class model.domain.common.CustomString This is not only for this type of SelectOneChoice but also for InputText field whose underlying VO attribute is of type CustomString (i.e. any Custom Domain type)
    On raising this in Jdeveloper forum, I came to know that adding a default oracle converter against the UI Component will take care of converting to respective data type. After added the converter for InputText and SelectOneChoice components, this issue got resolved. This was our lesson while working in Jdeveloper version 11.1.1.3.0. Converter we used,
    <f:converter converterId="oracle.genericDomain"/> When we try the same scenario in Jdev Version 11.1.1.4.0, without having the oracle converter itself, SelectOneChoice started working fine!! (i.e. it is able to set the base attribute with LOV attribute’s value but with proper base attribute’s domain data type). Anyhow, converter is required for InputText.
    When we try the same scenario in Jdeveloper new version 11.1.2.0.0, it started giving class cast exception when we don’t have oracle converter for SelectOneChoice. But by adding it, though it didn’t give such class cast exception message, though a selection is made in SelectOneChoice, VO attribute has not been updated with the new value. Instead it is updated with null value (Checked the setter method of view row impl by having break point) . Because of this, after a selection is made, when we try to read the attribute value from VO on button click, VO attribute always returns null.
    We have also tried our own converters but there is no change in the behavior.
    The above misbehavior can be tested either by having SOP programmatically or by refreshing the SelectOneChoice by giving its id as Partial trigger to itself with autosubmit set to true, so that the selected value will be reset to null irrespective of the selection made.
    For convenience, Issue details with Sample application is shared. Shared link : http://www.filejumbo.com/Download/6FDF6ECF2922BD24
    Shared folder contains
    1. Sample App developed on Jdev 11.1.1.4.0 to ensure it didn’t give this error.
    2. Sample App developed on Jdev 11.1.2.0.0 to simulate this error.
    3. Error details in a document.
    Can anybody have a look at this and tell me why this misbehavior and is it a bug? If so, any workaround available to continue the development?
    Thanks in Advance.
    Raghu
    Edited by: Raguraman on Sep 10, 2011 10:31 AM

    Sorry for the late reply John and Frank. Ya i did. Thank you.
    One more detail:
    I tested the behavior in Jdeveloper 11.1.2.0.0. The recent surprise is Select One Choice is behaving perfectly when it used in Grid layout and fail to work when it is form layout. I am getting surprised why behavior of component varies based on the way it refers the binding.
    for form layout,
    value=#{bindings.
    for grid layout,
    value=#{row.bindings.
    The bug details (#/title) are Bug 12968871 - RUNTIME CONVERSION FAILURE WHEN USING CUSTOM DOMAIN OBJECT VALIDATION IN EO
    Edited by: Raguraman on Sep 12, 2011 8:23 PM
    Edited by: Raguraman on Sep 12, 2011 8:31 PM

Maybe you are looking for