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 create a table which have always only one entry inside it?

Former Member
0 Kudos

Hi Experts,

Is it possible to create a table in data dictionary which have always only one entry inside it. If we insert another entry, then it should throw an error.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

if you want to maintain only one data in that ... then

first time for making one data entry in the <b>Delivery & maintaince </b> tabstrip in the table have an option <b>Display /maintaince Allowed ...</b>

after that

change it to <b>Display/maintianance allowed Restrictions .</b> ... so that table will not allow to insert the entries .

reward points if it is usefull ....

Girish

7 REPLIES 7

Former Member
0 Kudos

if you want to maintain only one data in that ... then

first time for making one data entry in the <b>Delivery & maintaince </b> tabstrip in the table have an option <b>Display /maintaince Allowed ...</b>

after that

change it to <b>Display/maintianance allowed Restrictions .</b> ... so that table will not allow to insert the entries .

reward points if it is usefull ....

Girish

0 Kudos

Hi Girish,

I tried. But It still allows to insert another entry. The table has a maintenance view. Using that view I am able to Insert one more entry to that table.

Regards

Saroj

0 Kudos

Hi Saroj,

Try as I said. it will work.

Regards,

Atish

0 Kudos

Hi Saroj,

Why is the table having only 1 entry and then in that case why a maintenance view?

BTW you can use events as mentioned by somebody above.

Try writting your code in EVENT 01 or EVENT 05 and you can give Message of TYPE 'E'.

It should work. Or even if it's still making the entry clear the row having the entry . Simple !!

Hope this helps

Regards

Nishant

Former Member
0 Kudos

Hi Saroj,

In the events of table maintainance generator you can check if there is new entry, thorough an error message.

Regards,

Atish

Former Member
0 Kudos

then in the table maintaince view ... write the logic for the create icon ok_code .

if it is create ..

message .

endif .

reward points if it is usefull ...

Girish

uwe_schieferstein
Active Contributor
0 Kudos

Hello Saroj

Create your table and maintenance view and enter a single entry. Next restrict the access in tabstrip "Maintenance Status" of the maintenance view:

-Choose option "<b>Reading and Changing</b>" for <i>access</i>

There is no further need to restrict the display/maintenance of the view.

Regards

Uwe