Application Development 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: 

Concatenating date & time & passing it to a timestamp field.

Former Member
0 Kudos

Hi all,

In CRM i have a entry for a particular <b>04/25/2002 19:11:46</b> from the table CRMD_ORDERADM_H

I want to take only a date from the user in the selection field get this entry adding 00:00:00

& 23:59:59 in ranges so that i can find entries for the complete day as the user doesn't knows the exact time so entries for that particular date will have to be displayed.

I have two options using concatenate & using function module

could u please help me with the code, I AM MORE INTERESTED IN USING CONCATENATE.......thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try using the function module IB_CONVERT_INTO_TIMESTAMP

Thanks,

Naren

5 REPLIES 5

Former Member
0 Kudos

Hi,

Try using the function module IB_CONVERT_INTO_TIMESTAMP

Thanks,

Naren

Former Member
0 Kudos

hi,

An option would be in the select query itself in the where condition you can try,

where date_stamp+0(8) in s_date.

Then you can further filter of you wish based on the time stamp.

Regards

Subramanian

Former Member
0 Kudos

Hi,

You can use the class CL_ABAP_TSTMP for arithmetical operations with time stamps.

Use the GET TIME STAMP FIELD f statement to place a current timestamp in field f.

<b>Example</b>

DATA:

s_tst TYPE timestamp,

l_tst TYPE timestampl,

tzone TYPE timezone.

GET TIME STAMP FIELD s_timestamp. "short form

GET TIME STAMP FIELD l_timestamp. "long form

tzone = 'UTC '. "time zone

WRITE: / s_tst TIME ZONE tzone,

/ l_tst TIME ZONE tzone.

Former Member
0 Kudos

Hi,

Look at these function modules ...

<b>LTRM_TIMESTAMP_CONVERT_INTO</b>

<b>BDL_GET_CENTRAL_TIMESTAMP</b> --> Greenwich time from db or enqueue server

<b>KERF_GET_TIMESTAMP</b>

<b>CALENDAR_GET_TIMESTAMP</b> --> Read date and time of current factory calendar buffer

Regards

Sudheer

Former Member
0 Kudos

I was more interested in concatenating i did that using hiding the time stamp field on the selection screen & taking a date from the user in a sy-datum type field & then passed on the values to time stamp fields low & high by concatenating with 000000 & 235959 & using move statement.

Thanks,

Regards,

Narottam