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 maintainace view

Former Member
0 Likes
354

i have created one ztable.for that in table maintainance how to validate table entries using events.for that table i had Added pushbuttons u2018Add Accountsu2019 and u2018Delete Accountsu2019 to the maintenance screen of custom table in layout in se80.for pushbuttons whether we can write code in events.

i want code for

1)When user choose the pushbutton u2018Add Accountsu2019, make a new row input enabled.

2)When user press the pushbutton u2018Delete Accountsu2019, selected accounts should be deleted. If no record is selected, then provide an information message saying u2018Please select at least one row for deletionu2019. And the corresponding record(s) should be deleted from the DB.

3 REPLIES 3
Read only

Former Member
0 Likes
331

Hi,

there are certain events value given by SAP which you can find on maintenance screen. There in the menu bar under utilities ( most likely ) you can find the events.

There you can chosee the appropriate one and write the code in that event as per your requirement.

Hopefully this should be of some help to you.

Regards,

Lalit Kabra

Read only

Former Member
0 Likes
331

Hi,

You don't need to separately add buttons to Create or delete entries when you create a Table Maintenance fro any table. This basic functionality is already provided by SAP.

regards,

Advait Gode.

Read only

Former Member
0 Likes
331

hi,

As said by the other person u dont have to create buttons for deleting and creating data ....coz when u generate table maintenance it gives u the functionality.........

and abt the events

se11 -->

enter the table name in edit mode

then

UTILITIES ---> TABLE MAINTENANCE GENERATOR

Provide all the values and create TM for the table

Then

ENVIRONMENT ---> MODIFICATIONS ---> EVENTS

Here add new rows

then select the event

eg.

'01'--- is the event which will get triggered everytime before the saving takes place.....so ur validation br saving can be done here.....

Then u have to declare a form routine inside which ur validation code will come....eg ....any anme u want like "F_B4_SAVING".

then u double click on that and define it in any include and write the validation code in that.....

so now whenever u try to save any entry the form will get executed b4 saving......

same way u can use '03' event to be triggered b4 deleting any entry from display.

jst do F4 and u will get to see various events provided ......

reward points if useful