Application Development 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: 

How to default a value for a field in a table

Former Member
0 Kudos

Hi All,

I need to default some value to the field say:

field: INDICATOR

default value: X (always) in custom table say Y_TEST for the field INDICATOR.

The data should be defaulted to all the records in the table for the field.

How can this be acchieved ? Using EVENTS in table or any other method.

Thanks & regards,

Mars

9 REPLIES 9

Former Member
0 Kudos

Hii,

Check whether table maintenance ggenerator is created for this table.

If yes,then go to sm30 in change mode and change the field value.

regards,

Archana

Former Member
0 Kudos

Hi,

At table level in the Entry help/check tab you can set defaults tab value as checked

and in the domain of the field in the value range tab

set the fixed value as 'x' or watever the value is.

hope this fulfills your reqmnt.

tc

sajimon chandran

Edited by: Sajimon Chandran on Aug 26, 2009 9:11 AM

Edited by: Sajimon Chandran on Aug 26, 2009 9:11 AM

Edited by: Sajimon Chandran on Aug 26, 2009 9:11 AM

0 Kudos

Hi Sajimon,

In Entry help/check tab am not able to check the Default value tab as it is always in Non-Editable mode. Can you let me know how can i check it (make it to editable mode). Do we need to have TMG created for this?

Thanks,

Mars

0 Kudos

Hi Sajimon,

In Entry help/check tab am not able to check the Default value tab as it is always in Non-Editable mode. Can you let me know how can i check it (make it to editable mode). Do we need to have TMG created for this?

Thanks,

Mars

0 Kudos

Hi Sajimon,

In Entry help/check tab am not able to check the Default value tab as it is always in Non-Editable mode. Can you let me know how can i check it (make it to editable mode). Do we need to have TMG created for this?

Thanks,

Mars

0 Kudos

Hi Sajimon,

In Entry help/check tab am not able to check the Default value tab as it is always in Non-Editable mode. Can you let me know how can i check it (make it to editable mode). Do we need to have TMG created for this?

Thanks,

Mars

Former Member
0 Kudos

Hi,

If you have a table maintainece generator where are using SM30 to maintain value you can go to the maintainence and go to environment modifications and events there you can create an entry for event 5 and assign a subroutine and add code in the subroutine to default the value.

Search SCN there are several threads on how to use events for default values.

Regards,

Himanshu

Former Member
0 Kudos

Hi,

Always remember, whenever you are using event in the Table Maint. Gen. , Take care that the Table is not edited any time, else, whenever the Table Maint is regenerated, all the events will be deleted.

Regards

Krunal Raichura

Former Member
0 Kudos

Hi,

under the domain of INDICATOR field, assign 'X' in fixed values, so that, while you try to enter data into this table,

INDICATOR field will nt accept any other data other than 'X'.

So you need to enter only 'X', all other values will nt be accepted & if you try to save with any other value, if gives error message, hence you can prevent entering other values, 'X' vl be the only value for that field

Hope this helps

-Sujatha