mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 19:26:10 +08:00
Fix dates not converterted to external format
Method get_default_excel_date_format of class zcl_excel_worksheet uses language "E" (English) to determine the date format from domain XUDATFM. Method create_csv of class zcl_excel_writer_csv has a logic to determine the field type from the number format. For this also the values from domain XUDATFM are used. But here they are read with sy-langu. Due to this, fields are not correctly identified as "date" when the user language is not English. Solution: Additionally read domain values with language "E".
This commit is contained in:
parent
4eb1bf5b52
commit
a49235de83
|
@ -123,7 +123,7 @@ CLASS ZCL_EXCEL_WRITER_CSV IMPLEMENTATION.
|
||||||
* --- Retrieve SAP date format
|
* --- Retrieve SAP date format
|
||||||
CLEAR ls_format.
|
CLEAR ls_format.
|
||||||
SELECT ddtext INTO ls_format-attvalue FROM dd07t WHERE domname = 'XUDATFM'
|
SELECT ddtext INTO ls_format-attvalue FROM dd07t WHERE domname = 'XUDATFM'
|
||||||
AND ddlanguage = sy-langu.
|
AND ( ddlanguage = sy-langu OR ddlanguage = 'E' ).
|
||||||
ls_format-cmpname = 'DATE'.
|
ls_format-cmpname = 'DATE'.
|
||||||
CONDENSE ls_format-attvalue.
|
CONDENSE ls_format-attvalue.
|
||||||
CONCATENATE '''' ls_format-attvalue '''' INTO ls_format-attvalue.
|
CONCATENATE '''' ls_format-attvalue '''' INTO ls_format-attvalue.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user