2006 Nov 24 10:28 AM
Hello,
Does anyone has a code example of table maintenance events?
I have a custom table ( zitab ) , with a maintenance view in SM30. I would like to use the table maintenance events for some authorisation check before the data is displayed, then, depending on the authorisation, display what the user is authorised to see. After data input, perform validation, if errors occur, inform the user what the problem is, if not, save in tha z table.
Can this be done in sm30 or I need to write a new program?
Thank you!
2006 Nov 24 10:31 AM
2006 Nov 24 10:31 AM
2006 Nov 24 10:31 AM
Hi George,
Please check the following links
Have a look at SAP help on generating a table maintenance dialog.
http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
http://help.sap.com/saphelp_webas630/helpdata/en/06/395e3c80530f6be10000000a11405a/frameset.htm
Reward points if this helps.
manish
2006 Nov 24 10:34 AM
hi,
chk out tis,
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc</a>
nice document ,hope this help u lot
-shan
2006 Nov 24 11:33 AM
I saw that document, but I have troubles accesing the data in my table. I don't really understand how can I acces the records from my internal table. I have samples in that document for events 05 and 02. those events work fine, but when I try to use event 01 and to loop trough my table, for example, i have an error that the table fields are not character type. How can I compare different fields from my internal table? Also, what event do you recommend for authorisation check and how to display only the authorised data?
2006 Nov 24 12:27 PM
Can someone please explain me why I have this short dump (before save event)?
Error analysis
The statement
"MOVE src TO dst"
requires the operands "dst" and "src" to be comvertible.
Since this statement occurs in a Unicode program, the special
convertibility rules for Unicode programs apply. In this case, the
following rules have been broken:
Source Code Extract
Line SourceCde
1 ----
2 ***INCLUDE LYTableF04 .
3 ----
4
5 form before_save.
6
7 DATA: l_field_is_blank.
8 DATA: BEGIN OF s_ytable.
9 INCLUDE STRUCTURE ytable.
10 INCLUDE STRUCTURE vimtbflags.
11 DATA: END OF s_ytable.
12
13 LOOP AT total.
14 CLEAR s_ytable.
>>>>> MOVE total TO s_table.
16
17 ENDLOOP.
18
19 endform.
In all examples that i read on this forum this code works, I don't know why it fails for me.