Skip to Content
-2

Insert timestamp into external MS SQL table using ABAP

Oct 28, 2016 at 10:51 AM

64

avatar image

Hi Expert,

We have a requirement for which we have to insert records in an MS SQL table. The table contains a field of type DATETIME. We need to fill that field with the actual date and time.

We have concatenated date and time in the format 'YYYY-MM-DD HH:MM:SS' and we are getting the dump 'SQL error 241 occurred while executing Native SQL.'.

We are looping on an internal table to insert each record 1 by 1.

Could you please help to find a solution for the timestamp?

Thanks,

Vitish.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vitish Seechurn Jan 12, 2017 at 08:13 AM
0

Hello Jelena,

The issue is solved. The timestamp format should be 'YYYY-DD-MM HH:MM:SS' instead of 'YYYY-MM-DD HH:MM:SS'.

Regards,

Show 1 Share
10 |10000 characters needed characters left characters exceeded

If this is resolved then kindly let others know by accepting an answer. Otherwise this still shows up as "unanswered". Thank you.

0
Jelena Perfiljeva
Oct 28, 2016 at 01:18 PM
0

What have you tried so far? Google -> "SQL error 241" finds 400K+ entries, surely some of the posts should have triggered some ideas and further analysis. Ask the external database's DBA as well. It's not really an ABAP question.

Share
10 |10000 characters needed characters left characters exceeded