06-14-2014 10:28 AM
Hi,
I am facing problem in dowloading alv to excel for one particular field.
Code for the column is:
month - yy.
for ex: July -13 But after dowloading it shows 13 - July.
CALL FUNCTION 'ISP_GET_MONTH_NAME'
EXPORTING
DATE = wa_final-lwd
language = SY-LANGU
* MONTH_NUMBER = '00'
IMPORTING
* LANGU_BACK =
* LONGTEXT =
SHORTTEXT = month
* EXCEPTIONS
* CALENDAR_ID = 1
* DATE_ERROR = 2
* NOT_FOUND = 3
* WRONG_INPUT = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
CONCATENATE month '-' wa_final-lwd+2(2) INTO wa_final-month_yy.
Please help.
Thanks in advance.
06-14-2014 10:49 AM
Hi,
select the the excel column, right click->Format cell->number tab->custom->mmmm-yy
eg Microsoft Excel 2007.
Regards,
Venkat
06-14-2014 11:18 AM
Thanks.I have informed user about this solution already.
But they want permanat solution irrespective of any setting or format.
I am getting some sap note for that .. will confirm if I get any solution ...
06-16-2014 1:29 AM
Hi,
That's excel related...
Just some idea, if you want to avoid that Excel recognize your value as a date you can also concatenate a single quote in front of the value before sending it...eg. 'July - 13
Br,
Manu.
06-16-2014 5:53 AM
Hi ,
It worked, thanks but still after downloading to excel we have to double clk on the cell...
06-17-2014 6:54 AM
Hi,
I used '="' this before and after the fields
ex.
CONCATENATE '="' month '-' wa_final-lwd+2(2) '"' INTO wa_final-month_yy .
It worked .. valaues are not changing in excel.
But only thing is, in alv display is not proper - - - > ="APR-14" .