‎2006 May 26 10:42 AM
hi,
i require to create one custom table with two key, in which one key field could be initial, even i am cheking checkbox for intial , but as soon as i am acting table both key fields are getting checked for intial automatically ,can any body suggest.
‎2006 May 26 10:46 AM
Hi Gud,
1. This is the default and appropriate behaviour.
2. If we specify any field as primary key,
(it cannot be NULL in physical database table)
3. Hence, INITIAL means,
SPACES for charcter field
ZERO for numeric field.
4. So Its ok what is happening.
5. We cannot do what u are trying to do.
regards,
amit m.
‎2006 May 26 10:46 AM
Hi Gud,
1. This is the default and appropriate behaviour.
2. If we specify any field as primary key,
(it cannot be NULL in physical database table)
3. Hence, INITIAL means,
SPACES for charcter field
ZERO for numeric field.
4. So Its ok what is happening.
5. We cannot do what u are trying to do.
regards,
amit m.
‎2006 May 26 10:53 AM
Hi Gud,
for more info
Indicator that NOT NULL is forced for this field
Use
Select this flag if a field to be inserted in the database is to be
filled with initial values. The initial value used depends on the data
type of the field.
Please note that fields in the database for which the this flag is not
set can also be filled with initial values.
When you create a table, all fields of the table can be defined as NOT
NULL and filled with an initial value. The same applies when converting
the table. Only when new fields are added or inserted, are these filled
with initial values. An exception is key fields. These are always filled
automatically with initial values.
Restrictions and notes:
o The initial value cannot be set for fields of data types LCHR, LRAW,
and RAW. If the field length is greater than 32, the initial flag
cannot be set for fields of data type NUMC.
o If a new field is inserted in the table and the initial flag is set,
the complete table is scanned on activation and an UPDATE is made to
the new field. This can be very time-consuming.
o If the initial flag is set for an included structure, this means
that the attributes from the structure are transferred. That is,
exactly those fields which are marked as initial in the definition
have this attribute in the table as well.
‎2006 May 26 1:37 PM
Hi Gud,
I feel this is the default behaviour in SAP and moreover it's in line with the basic Database requirement that a key field can't be NULL. Hence SAP, by default, fills the Key fields with INITIAL values as appropriate in accordance with the datatype of the field.
Anyway, you can still keep a check, programatically, on NULL/INITIAL values for the corresponding Key fields in your Table Maintenance Dialogs screens or Custom upload/update programs.
Regards,
Roopesh.