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 maintenance events

Former Member
0 Likes
859

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!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
754

same thread..\

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!

5 REPLIES 5
Read only

Former Member
0 Likes
755

same thread..\

Read only

Former Member
Read only

Former Member
0 Likes
754

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

Read only

0 Likes
754

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?

Read only

Former Member
0 Likes
754

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.