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

write statement not converting to user defined format

Former Member
0 Likes
835

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
691

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

5 REPLIES 5
Read only

Former Member
0 Likes
692

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

Read only

0 Likes
691

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.

Read only

0 Likes
691

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

Read only

0 Likes
691

This message was moderated.

Read only

Former Member
0 Likes
691

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