Skip navigation.

@#^%^*@!@%##

Convert Date <-> Timestamp in ABAP/4


Google

Web www.howforge.com
Home » blogs » thitima's blog
Convert Date <-> Timestamp in ABAP/4
Submitted by thitima on Wed, 2006-01-11 17:49. ABAP/4 | English | IT | Programming | SAP R/3

Date to Timestamp

Example

*&---------------------------------------------------------------------*
*& Form convert_date_to_timestamp
*&---------------------------------------------------------------------*
form convert_date_to_timestamp using par_date
par_time
par_time_zone
changing par_timestamp.
clear par_timestamp.
CONVERT DATE par_date TIME par_time INTO
TIME STAMP par_timestamp TIME ZONE par_time_zone.
endform.
" convert_date_to_timestamp

Timestamp to Date

Example

*&---------------------------------------------------------------------*
*& Form convert_timestamp_to_date
*&---------------------------------------------------------------------*

form convert_timestamp_to_date using par_timestamp
par_time_zone
changing par_date
par_time.
data: lc_timestamp type timestamp.
clear: par_date, par_time, lc_timestamp.
lc_timestamp = par_timestamp.
CONVERT TIME STAMP lc_timestamp TIME ZONE par_time_zone INTO
DATE par_date TIME par_time.
endform. " convert_timestamp_to_date

* Chained Statement in ABAP/4
* Options of NEW-PAGE statement in ABAP/4
* Formatting Options in SAPscript: Symbol Length
* How to get long text in ABAP/4
* How to Find the Number of Entries of Internal Table in ABAP/4
* BOTTOM ... ENDBOTTOM Command in SAPscript
* How to Assign Dynamic Fields using Filed-Symbols in ABAP/4
* AT Statement in a Loop of ABAP/4
* ABAP/4 Example Code: Download OTF Spool to PDF
* Formatting Options in SAPscript: Move Sign to Left and Right

» thitima's blog | add new comment | 395 reads | del.icio.us
Google

Download a report to excel with format (border, color cell, etc)solution for outofmemoryerror when transforming xml files

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Type the two words displayed in the image below:


Smilies

July 2009
S M T W T F S
June 2009August 2009
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31