cancel
Showing results for 
Search instead for 
Did you mean: 

ZTABLE CREATION

Former Member
0 Kudos

Hi All,

I have a requirement to create a ztable which consists of fields From Date & To Date.

I had created the ztable with the table maintanance generator.

But when i am entring the values for from date and to date it should raise an error if to date is less than the from date at data base level only.

But in my table its taking all the entries irrespective of dates.

thanks & regards,

aarthi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You have to validate the dates by writing events in maintenance generator

Regards

Shiva

Former Member
0 Kudos

Hi,

Yeah thats great.

I tried it with events in Table Maintanance Generator, but i am not getting it,

Please can u help me out.

thanks & regards,

aarthi.

Answers (2)

Answers (2)

Former Member
0 Kudos

hi aarthi,

While creating a custom table, if u have referred a standard field of standard table,

then by default, it will have a validation check.

If u haven't referred so and in case, if u r using a user-defined table, then u have to validate using the event named,

AT SELECTION-SCREEN ON VALUE REQUEST, AND THEN PASS A FUNCTION MODULE NAMED F4IF_INT_TABLE_VAL_REQUEST,

there u have to pass the required fields and table names, to get the desired output.

If u r not satisfied with these answers, kindly message me back.

thank you

Former Member
0 Kudos

Hi Aarthi,

The error you are talking about is the one which comes up on a selection screen when you have a select option for dates if I am not wrong.

This error would happen if you are using Select options / Ranges.

However since you have to separate fields for to / from dates there would be no standard validation.

If you need that then you would have to write a code to do the same.

PS: If this answers your query please close the question and reward points.

Regards.

Former Member
0 Kudos

Hi,

First i thank u for replying.

Actually i am not writing any print program.

I had created a table, but when i am making new entries its taking all the values for date fields.

And for the field <b>To date</b> in ztable is taking before date than <b>From date</b> field.

<b>To date</b> should always be greater than from date you need to throw an error or don't allow to enter date if date is less than <b>From date</b>.

Former Member
0 Kudos

Hi Aarthi,

For in detail table maintainance generator events pl refer the below link.

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

There you can write a small code to check whether the to_date is greater than from_date.

This shud help you.

Luck.