‎2007 Nov 06 12:32 PM
Hi,
I'm changing an old report with write sentences... I would like to "write" date in DATS (type- Date field (YYYYMMDD) stored as char(8)) format.
How Can I change this?
Example:
TYPES: BEGIN OF line,
budat LIKE bkpf-budat,
cpudt END OF line.
END OF line.
WRITE: /(4) itab-cpudt, (Iwold like to have in dats format 20071107, but now it is 11.07.2007)
Thanks + points granted
Saso
‎2007 Nov 06 1:05 PM
WRITE: / itab-cpudt+0(4), itab-cpudt+4(2), itab-cpudt+6(2).regards
‎2007 Nov 06 12:36 PM
‎2007 Nov 06 12:58 PM
‎2007 Nov 06 12:38 PM
Hi,
Before writing move the dats to a 8 char field ..
declare v_cpudt(8).
v_cpudt = itab-cpudt.
now write this v_cpudt.
Regards,
Srinivas.
‎2007 Nov 06 12:39 PM
Hi check this code...
DATA : d LIKE sy-datum.
DATA : d2 TYPE char8.
d = sy-datum.
d2 = d.
WRITE :/ d2.
‎2007 Nov 06 12:48 PM
you can also use this FM
CONVERSION_EXIT_PDATE_OUTPUT
for converting date format
‎2007 Nov 06 12:41 PM
Hi
i didn't get the exact idea abt ur doubt,but i am giving the solution which i understood.
use edit mask option in write statement.it can help u.
‎2007 Nov 06 1:05 PM
WRITE: / itab-cpudt+0(4), itab-cpudt+4(2), itab-cpudt+6(2).regards