‎2006 Jul 04 12:02 PM
hi ,
i have date format coming from the file as yyyymmdd , now i want to convert this in bdc program to user specfic date ( having 10 char) how can i do it . any FM avaiable.
thanks
sridhar
‎2006 Jul 04 12:04 PM
Hi
You can easly use the statament WRITE:
Create a variable where you'll write the date:
DATA: W_DATE(10) TYPE C.
WRITE <DATE> TO W_DATE.
Transfer W_DATE to BDC
Max
‎2006 Jul 04 12:05 PM
write sy-datum to v_date. "v)date should be of 10 char length
or use the func mod:
CONVERT_DATE_TO_EXTERNAL
Regards,
Ravi
‎2006 Jul 04 12:05 PM
CONVERT_DATE_TO_EXTERNAL function will do the job.
Regards,
Ravi
‎2006 Jul 04 12:05 PM
data: l_date type d value '20060704',
l_text(10) type c.
Write l_date to l_text dd/mm/yyyy.
‎2006 Jul 04 12:08 PM
Hello, Please check FM:
CONVERSION_EXIT_PDATE_OUTPUT
Best regards, Murugesh AS
‎2006 Jul 04 12:11 PM
Hi Sridhar,
Welcome to SDN........
1)Use Function module <b>CONVERT_DATE_TO_EXTERNAL</b>.
or
2) DATA V_DATE(10).
<b>WRITE SY-DATUM TO V_DATE.</b>
Note: Plz mark all helpful answers and close the thread if it is solved.
Thanks,
Vinay
‎2006 Jul 04 12:12 PM
Hai Sridhar
Check the following Code
DATA: v_date(10) TYPE c.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = '20060604'
IMPORTING
date_external = v_date
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
if sy-subrc = 0.
write 😕 v_date.
endif.
Thansk & regards
Sreeni
‎2006 Jul 04 12:19 PM
if the date format is in YYYYMMDD,
data : v_externaldate type sy-datum,
data : v_internal_date(10) type c.
write 😕 v_externaldate to v_internal_date.
this WRITE TO will convert date to user logged date format
i.e., with / or . or someother values.
regards
srikanth
‎2006 Jul 04 12:36 PM
Hi,
CONVERT_DATE_TO_EXTERNAL will solve your problem.
Regs,
Venkat Ramanan