ā2014 Dec 11 5:03 AM
Hi
i am using the below statement to convert date to format as per user setting:
data: L_DATE TYPE char10.
WRITE IS_BIL_INVOICE-HD_GEN-BIL_DATE to l_date.
the format in user setting is 'DD.MM.YYYY' but it is converting to 'YYYY.MM.DD'.
can u let me know what to do for this.
ā2014 Dec 11 5:33 AM
Hi Moorthy
Check with the datatype of I_date, it should be same as that of IS_BIL_INVOICE-HD_GEN-BIL_DATE .
Thanks
Kishan Shah
ā2014 Dec 11 5:33 AM
Hi Moorthy
Check with the datatype of I_date, it should be same as that of IS_BIL_INVOICE-HD_GEN-BIL_DATE .
Thanks
Kishan Shah
ā2014 Dec 11 5:47 AM
hii moorthy u can use FM 'CONVERT_DATE_TO_EXTERNAL ' to convert date in a format you want.
if not then u can logicaly convert it into format you want.
by declearing 3 variables for date month and year
and concatanate dd' '.'mm'.'yyyy into date variable.
Hope this will solve your issue.
ā2014 Dec 11 9:04 AM
Hi,
i am surprised with one aspect-- when i wrote a test program and used WRITE TO statement conversion happened perfectly but when the same code is used in a smartforms- program lines it is not working.
need to understand why...but was able to solve this using 'CONVERT_DATE_TO_EXTERNAL' FM.
Thanks for the assistance
ā2014 Dec 11 9:08 AM
ā2014 Dec 11 5:41 AM
Hi,
please read the ABAP keyword documentation (in SE38 or SE80) for WRITE TO. In the int_format_options you can find the solution.
Regards,
Klaus