‎2008 Mar 26 2:55 PM
Hello Gurus!
The problem what I am having is:
this works fine
data tmstmp type TZNTSTMPS.
data currDate(10) type c value '14.02.2007'.
data w_date type sy-datum.
concatenate currDate+6(4) currDate+3(2) currDate+0(2)
into w_date.
CALL FUNCTION 'ABI_TIMESTAMP_CONVERT_INTO'
EXPORTING
iv_date = w_date
iv_time = '000000' "'00:00:00'
IMPORTING
EV_TIMESTAMP = tmstmp .
write tmstmp.but this not because date has another format
data tmstmp type TZNTSTMPS.
data currDate(10) type c value '02/14/2007'.
data w_date type sy-datum.
concatenate currDate+6(4) currDate+3(2) currDate+0(2)
into w_date.
CALL FUNCTION 'ABI_TIMESTAMP_CONVERT_INTO'
EXPORTING
iv_date = w_date
iv_time = '000000' "'00:00:00'
IMPORTING
EV_TIMESTAMP = tmstmp .
write tmstmp.Regards
Sas
‎2008 Mar 26 3:07 PM
Hi ,
In the First case it works because w_date is 20070214 .
In the second case w_date comes as 20071402
Format is YYYYMMDD.
In the second case you have to change the following statement
concatenate currDate6(4) currDate3(2) currDate+0(2)
into w_date
to
concatenate currDate6(4) currDate0(2) currDate+3(2)
into w_date
Please reward if useful.
‎2008 Mar 26 2:59 PM
Convert the date to the same format and give that to that function module
concatenate v_date+3(2) v_date+0(2) v_date+6(4) into
v_date1 separated by '.'
else
DATA: val(10).
WRITE sy-datum TO val DD/MM/YYYY.
TRANSLATE val USING '/.'.
WRITE val.
‎2008 Mar 26 3:00 PM
‎2008 Mar 26 3:04 PM
Hi,
Sorry. Santhose is correct. You have to give the same format as that function module.
Pranav
‎2008 Mar 26 3:07 PM
Hi ,
In the First case it works because w_date is 20070214 .
In the second case w_date comes as 20071402
Format is YYYYMMDD.
In the second case you have to change the following statement
concatenate currDate6(4) currDate3(2) currDate+0(2)
into w_date
to
concatenate currDate6(4) currDate0(2) currDate+3(2)
into w_date
Please reward if useful.
‎2008 Mar 26 3:10 PM
Hi,
data tmstmp type TZNTSTMPS.
data currDate(10) type c value '14.02.2007'.
data w_date type sy-datum.
concatenate currDate+0(4) '.' currDate+4(2) '.' currDate+6(2)
into w_date.Regards,
V.Balaji
Reward if usefull