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 in excel attachment

Former Member
0 Likes
641

Hi All,

I am using  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send excel attachment to mail.

I am filling DATE column of excel attachment as below:

DATA           l_date                  TYPE string.

    CONSTANTS: lc_apostrof(4)     TYPE c VALUE ''''.      

DATA ls_date TYPE datum.

          CONCATENATE lc_apostrof ls_date  INTO l_date.

But in my excel sheet it is downloaded as 'yyyymmdd, while I was expecting yyyymmdd.

Colud you help me where I went wrong.

Regards,

Dep

1 ACCEPTED SOLUTION
Read only

rajeevgoswami1
Participant
0 Likes
489

hi deep ,

you wote like  ' my excel sheet it is downloaded as 'yyyymmdd, while I was expecting yyyymmdd '  , so I could not get your question properly in which format you want the date .

What i  know that

if you assign date using  '= ' operator and concatnate ,

then  format will be 'yyyymmdd'.

ex.

ls_date = sy-datum.

if you use  'write to'  and concatnate 

then format will be 'MMDDYYYY'.

ex.

write sy-datum to ls_date.

I think  you already know this.

If this not soving the issue please let me know.

Regards ,

Rajeev

hi deep ,

you wote like  ' my excel sheet it is downloaded as 'yyyymmdd, while I was expecting yyyymmdd '  , so I could not get your question properly in which format you want the date .

What i  know that

if you assign date using  '= ' operator and concatnate ,

then  format will be 'yyyymmdd'.

ex.

ls_date = sy-datum.

if you use  'write to'  and concatnate 

then format will be 'MMDDYYYY'.

ex.

write sy-datum to ls_date.

I think  you already know this.

If this not soving the issue please let me know.

Regards ,

Rajeev

1 REPLY 1
Read only

rajeevgoswami1
Participant
0 Likes
490

hi deep ,

you wote like  ' my excel sheet it is downloaded as 'yyyymmdd, while I was expecting yyyymmdd '  , so I could not get your question properly in which format you want the date .

What i  know that

if you assign date using  '= ' operator and concatnate ,

then  format will be 'yyyymmdd'.

ex.

ls_date = sy-datum.

if you use  'write to'  and concatnate 

then format will be 'MMDDYYYY'.

ex.

write sy-datum to ls_date.

I think  you already know this.

If this not soving the issue please let me know.

Regards ,

Rajeev