Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table issue

Former Member
0 Likes
497

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
467

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.

3 REPLIES 3
Read only

Former Member
0 Likes
468

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.

Read only

Former Member
0 Likes
467

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.

Read only

Former Member
0 Likes
467

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.