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 Events

Former Member
0 Likes
643

Hi Gurus,

1. I have created a Z-table. I have used 05 event and did some validation while a new entry is added to the table.

2. My doubt is, when the already available record is changed(particularly a field), how to validate the changed field ?... which event should i use?.. Any sample codes available for this?

Thanks in advance.

Prakash.

5 REPLIES 5
Read only

Former Member
0 Likes
609

hi,

you can use field statement for field checking and with that you need to use the "module on request".

thats for checking whether new entry has been done or not.

check out the sap link :

http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm

hope this will help you!!

Thanks & Regards,

Punit Raval.

Read only

Former Member
0 Likes
609

Hi ,

Try Event 18 .

If not check the even 01 ... before saving the data .

Read only

Former Member
0 Likes
609

Hi,

Check the event 01 which will triggers before saving the data to the datatbase. Here you can validate the existing data also.

DATA: f_index LIKE sy-tabix, "Index to note the lines found

lv_value TYPE c.

LOOP AT total.

READ TABLE extract WITH KEY total.

IF sy-subrc EQ 0.

f_index = sy-tabix.

ELSE.

CLEAR f_index.

ENDIF.

lv_value = total+55(1).

IF NOT ( lv_value = space OR lv_value = 'D' ).

*validation will take place *

MODIFY total.

ENDIF.

CHECK f_index GT 0.

extract = total.

MODIFY extract INDEX f_index.

ENDLOOP.

sy-subrc = 0.

Thanks,

Jayasree.

Read only

Former Member
0 Likes
609

Hi,

Event 08: After Correcting the Contents of a Selected Field .This event occurs after the 'Change field contents' function

Link: [Table Events|http://help.sap.com/saphelp_nw2004s/helpdata/EN/91/ca9f0ea9d111d1a5690000e82deaaa/content.htm]

Read only

Former Member
0 Likes
609

Hi,

Use event 01.

In extract or Total table in event, last character ( 56) of the record contains 'U' which means that record is updated.

you can read that record and validate the newly changed field value.

regards,

Bhavana.