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

Issues while using the Timestamp field to retrieve data from a table

Former Member
0 Likes
880

Hi Group Members,

I am facing an issue like this:

I was trying to retrieve data from a db table(CRMD_TM_CL - a CRM table) which has the field name as "timestamp_from" and which has the length DEC 15. this field also has a conversion exit "CLMTS".

my requirement is to put the SY-DATUM and SY-UZEIT into a field and input this as a timestamp into the above field to fetch the data from the table.

But, I am not able to convert it - I used many ways

- As I took a Char field of length 19 and input the field as it looks in the table(ie. as '31.12.2008 23:33:43' but the program is running into dump.

- I defined a timestamp field and just trying to convert the fields SY-DATUM and SY-UZEIT into the timestamp field but still the same (program running into dump)

So please kindly let me know what needs to be done in this front.

Thanks for helping in advance.

Regards

Vishnu.

Hi Group Members,

I am facing an issue like this:

I was trying to retrieve data from a db table(CRMD_TM_CL - a CRM table) which has the field name as "timestamp_from" and which has the length DEC 15. this field also has a conversion exit "CLMTS".

my requirement is to put the SY-DATUM and SY-UZEIT into a field and input this as a timestamp into the above field to fetch the data from the table.

But, I am not able to convert it - I used many ways

- As I took a Char field of length 19 and input the field as it looks in the table(ie. as '31.12.2008 23:33:43' but the program is running into dump.

- I defined a timestamp field and just trying to convert the fields SY-DATUM and SY-UZEIT into the timestamp field but still the same (program running into dump)

So please kindly let me know what needs to be done in this front.

Thanks for helping in advance.

Regards

Vishnu.

3 REPLIES 3
Read only

Former Member
0 Likes
577

Hi Friend

Please see this SDN Link for your Query , you will get an idea : [;

Regard

Read only

Former Member
0 Likes
577

vishnu,

first thing is date related posts are not welcomed as per forum rules.

and any ways... you should not pass it as 19 place variable..... define a variable with 15 only... and see how data is stored in time stamps... pass like that it self..

as a hint...:

for date we pass : 20091105 (8 palces) not as 05.11.2009(10 places)

or if your are taking 19 place values then pass them to the convertion exits input FM. it will give you back required value.

Read only

former_member217544
Active Contributor
0 Likes
577

Hi Vishnu,

For converting date and time into timestamp form:


  CONVERT DATE <date variable>
          TIME <time variable>
INTO TIME STAMP <timestamp variable>
     TIME ZONE SY-ZONLO.

After this statement, the timestmap variable contains the timestamp form of the provided date and time.

Hope this helps.

Regards,

Swarna Munukoti.