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: 

Forcing user to enter values at table level

0 Kudos

Hi,

I have created a table ztest. How to force user to enter the values for certain fields in the table which are not keys, similar to not null in RDBMS. selecting the initial values filed in SE11 populates with some default value, but it doesnt force the user to enter the value.

Regards,

Raghu

5 REPLIES 5

Former Member
0 Kudos

You do it in your coding , where you try to insert into the table.

check if not initial, proceed with the insert statement or modify statement

regards,

Sandeep Josyula

*Reward for helpful answers

Former Member
0 Kudos

hi,

In the programs which updates this particular table, logic needs to be coded to check if the particular fields are not initial and proceed with updating Database table.

Former Member
0 Kudos

Hi Raghu,

Create your own transaction for updating the database table similar to se16 and validate in PBO for Null entries

Regards:-

Shankar

Former Member
0 Kudos

Hi Raghu,

I database level, the only possibility for this is to use Foreign keys(Maintain proper entries in Check table and create a foreign key to that table). Hope your requirements is fullfilled.

Cheers..

Santosh

P.S. Mark usefull answers

Former Member
0 Kudos

Hi,

Just check out transaction code SE54 for events.

Go in SE54.

Give your table name.

Go in Environment --> Events.

Here add the Event '01' i.e. Before saving the data.

Give the name for event eg 'BEFORE_SAVE'.

Click on Editor to create an include program.

In the include program write

form before_save.

data: f_index like sy-tabix. "Index to note the lines

loop at total.

if <action> = 'N' or <action> = 'U'.

read table extract with key <vim_xtotal_key>.

if sy-subrc eq 0.

f_index = sy-tabix.

else.

clear f_index.

endif.

  • "(make desired changes to the line TOTAL)

  • "End of Modification.

**********

modify total.

check f_index gt 0.

extract = total.

modify extract index f_index.

endif.

endloop.

sy-subrc = 0.

endform.

Note here in field symbol 'Total' your workarea will be their. You can make necessary checks here.

Or else you can go for making a custom transaction for your requirement.

Regards,

Nitin

*Mark all helpful answers