‎2006 Oct 25 7:14 AM
Hi All,
i have date format in 20060921(idoc format) ineed to convert the format into 09/21/2006(va02 format) how to convert.
another thing is this date format comes from the idoc and it has to be entered into transaction VA02(customer request date).do we need to convert this format manuvally or the process will converts.
Please suggest how to proceed.
Thanks in Advance.
Thanks&Regards.
Ramu.
‎2006 Oct 25 7:16 AM
Hi ramu,
1. use
WRITE mydate to dtstr.
where dtstr is : data : dtstr(10) type c.
2. This statement will write in the current format,
into the char variable.
regards,
amit m.
‎2006 Oct 25 7:17 AM
try this FM - <b>CONVERSION_EXIT_PDATE_OUTPUT</b>
Regards
- Gopi
‎2006 Oct 25 7:24 AM
Hi,
use the following code to write it to string variable in the format you require.
Also set the date format in the user profile.
DATA formatted_text TYPE c LENGTH 50.
WRITE sy-datum TO formatted_text MM/DD/YYYY.
Regards,
Sesh
Message was edited by: Seshatalpasai Madala
‎2006 Oct 25 7:24 AM
check this it may help u,
report z_example.
data: l_input like sy-datum value '20000120',
l_output(20) type c.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = l_input
IMPORTING
OUTPUT = l_output.
write:/ l_output.
‎2006 Oct 25 8:20 AM
Hi ramu ,
yeah YYYYMMDD IS idoc standard ,,
and the system internal routine is also the same
YYYYMMDD
u need not convert here ..
it takes care ..
in case ur idoc date is 09212006 then u need to use a fm like convert_date_t0_internal
..
so NO need to convert ..
this u can check in the debugging putting as fore ground .
regards,
VIjay.
Message was edited by: Vijay