‎2010 Nov 01 9:23 AM
Hello Experts,
I would like to know whether a MODIFY statement has updated the entry or it created a new entry based in one line or by any one variable.
Kindly suggest me the shortest way of finding it.
counting the number of entries is big process as i need to repeat this for 15 times in my program.
Thank you,
Viswanath A.
‎2010 Nov 01 9:42 AM
Hi
Set a flag variable where you use MODIFY statement. Have a IF statement for that flag, if the status is 'x' then insert the data and have a write statemnt to display or set a status information that created a new entry. Similarly if the flag value is ' ' then it means it is going to update the data. Just have your code like this..
WHEN action.
IF AFLAG = 'X'.
INSERT ZVX_TCURT INTO TABLE TCURT_TAB.
NO_ROWS = NO_ROWS + 1.
// HAVE YOUR WRITE TSTAEMENT HERE OR STATUS INFORMATION FOR INSERTION
AFLAG = ' '.
ELSE.
MODIFY TCURT_TAB INDEX ROW_NO FROM ZVX_TCURT.
ENDIF.
MODIFY YCL_TCURT.
// HAVE YOUR WRITE TSTAEMENT HERE OR STATUS INFORMATION FOR UPDATION
Regards
Vinodh
‎2010 Nov 12 12:21 PM