10-16-2007 5:51 AM
hi all,
please suggest me a event in table maintenance to have a check for preventing the entry into the table. i tried event 18 but wen the error msg is displayed it comes out of record entry window which is to be avoided.
regards
Madhu
10-16-2007 6:28 AM
My friend it is not
18
. it is05
-> Creating New Entry.so that you can validate with the User and do the validation and update the table .
"Below is the code for it
Select 05 for an event for Creating a new entry.
This event will be triggered while creating a new entry in SM30 or using the TCODE.
Form Name: AT_NEWENTRY (Enter key)
Double Click on the editor.
form at_newentry.
Ztab-ZCOUNTRY = India.
Ztab-ZCREATEDATE = sy-datum.
Ztab-ZCREATETIME = sy-uzeit.
endform.
Create another event: 02 for After Save
FORM after_save.
Ztab-mandt = extract+0(3).
Ztab-ZCOUNTRY = extract+3(3)..
Ztab-ZCREATEDATE = sy-datum.
Ztab-ZCREATETIME = sy-uzeit.
MODIFY ztab.
ENDFORM. "after_save
Step 4: Create Transaction Code.
Go to SE93.
Transcation code: ZTAB
Transaction text Test Table Maintenance Events
Transaction: SM30, Skip first Screen
Default Values:
VIEWNAME ZTAB
UPDATE X
Reward points if it is usefull....
Girish
10-16-2007 5:54 AM
Hi Madhu,
What is your need? You want to restrict the new entries to table on what basis?
Can you explain in more detail.
Regards,
Atish
10-16-2007 6:28 AM
My friend it is not
18
. it is05
-> Creating New Entry.so that you can validate with the User and do the validation and update the table .
"Below is the code for it
Select 05 for an event for Creating a new entry.
This event will be triggered while creating a new entry in SM30 or using the TCODE.
Form Name: AT_NEWENTRY (Enter key)
Double Click on the editor.
form at_newentry.
Ztab-ZCOUNTRY = India.
Ztab-ZCREATEDATE = sy-datum.
Ztab-ZCREATETIME = sy-uzeit.
endform.
Create another event: 02 for After Save
FORM after_save.
Ztab-mandt = extract+0(3).
Ztab-ZCOUNTRY = extract+3(3)..
Ztab-ZCREATEDATE = sy-datum.
Ztab-ZCREATETIME = sy-uzeit.
MODIFY ztab.
ENDFORM. "after_save
Step 4: Create Transaction Code.
Go to SE93.
Transcation code: ZTAB
Transaction text Test Table Maintenance Events
Transaction: SM30, Skip first Screen
Default Values:
VIEWNAME ZTAB
UPDATE X
Reward points if it is usefull....
Girish
10-16-2007 8:20 AM
Hi all,
Events 01 & 05 r not getting triggered when i try to make a new entry in sm30. can pls tell me the exact scenario at when it gets triggered. my case is that i just want to show a error message to user and prevent the entry being posted.
regards
Madhu
10-16-2007 9:11 AM
yes, i just saw that Madhu.
But once the user clicks on "SAVE" or comes out without saving the entires or tries to enter a data and delete and clicks on "BACK" the event will get triggerd.
If u dont want a user to edit/enter new data u can do it without the "EVENTS" part itself.
u can do it by specifying the Authorization group for the table itself.
y do u want to go for events?
10-16-2007 9:52 AM
Thanks for all ur inputs,
i hav used event 05 for error msg display - thats seems ok, but how can i identify which is the newly entered entry in this event ? i c no flag in total...r can u pls giv me some other event whr i can see the newly entered values - i have error msg probs in event before save and after data change...kindly suggest other event
regards
Madhu
10-16-2007 10:07 AM
Hi,
use the stmnt - break-point in the events and test. u will understand when the events are triggered.
event for 'before save'- 01
event for after data change- chk 08.
<i>but how can i identify which is the newly entered entry in this event ?</i>
- need to check.
- waiting for other SAP Gurus inputs...
10-16-2007 10:26 AM
In after data change '08' am able to get modified values - but i have problems with error msg display.
10-16-2007 11:34 AM
10-16-2007 12:49 PM
Hi all,
Problem solved !! event used '05'
i was able to capture the modified value in screen field name as it loops for all new entry entered. (anjali this is wat u were lookin for...
Note: in this event table total will not be populated with new entries.
points awarded to all valuable answers. am closing the thread
Thanks for ur ideas.
10-16-2007 12:53 PM
10-16-2007 7:11 AM
Hi,
Use the event '05'. Creating a new entry.
Give your message in the coding section, with Authorization chks or as per ur requirement.
(Also try 01, incase the above dosn't work).
Thanks & Regards,
Anjali