Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

date format

Former Member
0 Likes
1,021

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.

5 REPLIES 5
Read only

Former Member
0 Likes
683

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.

Read only

gopi_narendra
Active Contributor
0 Likes
683

try this FM - <b>CONVERSION_EXIT_PDATE_OUTPUT</b>

Regards

- Gopi

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
683

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

Read only

Former Member
0 Likes
683

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.

Read only

Former Member
0 Likes
683

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