‎2009 Jun 23 2:29 PM
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.
‎2009 Jun 23 4:44 PM
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.
‎2009 Jun 23 4:49 PM
Hi ,
Try Event 18 .
If not check the even 01 ... before saving the data .
‎2009 Jun 26 11:09 AM
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.
‎2009 Jun 26 12:12 PM
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]
‎2009 Jun 28 9:42 AM
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.