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

SO_NEW_DOCUMENT_ATT_SEND_API1 convert date

Former Member
0 Likes
1,429

Hello!

We use FM SO_NEW_DOCUMENT_ATT_SEND_API to create a 'CSV' file and send it with email, but there is a Problem with the date. After creating the csv file the date 201606100757 (yyyymmddHHMM) is converted to 2,01606E+11.

In this file we need the format (yymmddHHMM).

If a TXT file is created with this FM, the date is ok.

Dose anyone know a solution?

Best regards,

Manuel

Hello!

We use FM SO_NEW_DOCUMENT_ATT_SEND_API to create a 'CSV' file and send it with email, but there is a Problem with the date. After creating the csv file the date 201606100757 (yyyymmddHHMM) is converted to 2,01606E+11.

In this file we need the format (yymmddHHMM).

If a TXT file is created with this FM, the date is ok.

Dose anyone know a solution?

Best regards,

Manuel

5 REPLIES 5
Read only

Former Member
0 Likes
1,377

Hi Manuel,

Did you try to expand the column and see the content in the CSV File.

Could you please attach the screen shot of the column here.

Thanks and Regards,

Vinay Mutt

Read only

Former Member
0 Likes
1,377

Assuming its already char type, Add ' (single quote before passing the value -> equals to '''').

CONCATENATE ''''

                          v_date

                          INTO v_date.

Read only

Former Member
0 Likes
1,377

Hi, thanks for your quick Response!

@Vinary Mutt

I tried that and it's still in the wrong Format.

@Elzkie La

Now the value of the column is '201606100757. The date is correct, but now i have a single Quote at first.

Read only

0 Likes
1,377

internally it will be displayed with quote but in csv it will not be visible. It's defaulted in excel/csv with 2,##+11 number. Not sure if there is any other solutions for this for excel formating from sap.

Read only

Former Member
0 Likes
1,377

Hi

Did you try with declaring data type as NUMC instead CHAR.

Rgds,

Guna