cancel
Showing results for 
Search instead for 
Did you mean: 

Coding in Table maintenace generator

Former Member
0 Kudos

Requirement - when creating new entries in to the table, i need to check if there is any record with the same key.

If exists, delimit the existing entry before saving the new one.

I am using the event Before saving entries into Data base table.

But i am not able to see the values of new record in this event.

Ex: table name is ZOVRD.

when i write

SELECT SINGLE *

FROM zovrd

into wa_zovrd

WHERE begda EQ zovrd-begda

AND endda EQ zovrd-endda.

In debugging there are no values populated for zovrd.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

lko;

Former Member
0 Kudos

Hi Lavanya,

I am not sure why you arent able to see the values of ZOVRD.

Alternatively you can try doing the following.

Activate the code in the event and then save the FM. Then goto table and 'activate and readjust the database' by going to database utility. Try logging out of the session and relogin and try doing your tests again.

Or change the event fro 01 to 05 'Creating a new entry'.

Please let me kow if this works.

Regards

Nanda

former_member226519
Active Contributor
0 Kudos

you can have this done automatically.

Specify ENDDA as key field and before generating the maintenace view go to Environment->Generate Time-Dep.

Former Member
0 Kudos

But i have an additional requirement - it should not allow to create a new record if the begin date is before the begin date of an existing reocrd for the same key

Former Member
0 Kudos

Generate Time Dep option is disabled for me. I made ENDDA a key field