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

time validation

Former Member
0 Likes
2,482

Hi,

Does any function module exist for time validation?

Also, i've to check the latest available data of table depending upon the date and time. SO is there any FM also for this ?

Regards,

Jyoti Shankar

4 REPLIES 4
Read only

Former Member
0 Likes
1,419

Use the fm; TIME_CHECK_PLAUSIBILITY to check if time is valid.

to get the latest record based on date and time, do as follows:

select field1

date1

time1

from <table> into itab

where <some condition>.

sort itab by date1 time1 descending.

read table itab index 1.

Now, itab's header will have the latest record.

Regards,

Ravi

Message was edited by: Ravi Kanth Talagana

Read only

Laxmana_Appana_
Active Contributor
0 Likes
1,419

Hi,

Check this FM :

TIME_CHECK_PLAUSIBILITY

Regards

Appana

Read only

Former Member
0 Likes
1,419

Check if the below FM helps

LTRM_TIME_GAP_CALC

Read only

Former Member
0 Likes
1,419

Hi,

i found a simple code in the book "ABAP Objects" from SAPPress without any FM

DATA 	time 	TYPE t.
DATA: 	test1	TYPE i,
       test2 	TYPE t.

time = 'ABCXYZ'.
test1 = time.
test2 = test1.

IF time <> test2.

  write 'Error'.
ENDIF.

Regards,

Stefan