2015 Sep 14 9:14 AM
hi,
i found an error in FUNCTION 'GUI_DOWNLOAD' ,with chinese systems ,
data: begin of itab occurs 0 ,
maktx type char8,
end of itab.
DATA: BEGIN OF FLDITAB OCCURS 0,
FLDNAME(11) TYPE C,
END OF FLDITAB.
itab-maktx = '一二三四'. append itab.
flditab-fldname = 'MAKTX' . APPEND FLDITAB.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'D:\test.dbf'
FILETYPE = 'DBF'
codepage = '8404'
CONFIRM_OVERWRITE = 'X'
TABLES
DATA_TAB = ITAB
FIELDNAMES = FLDITAB
EXCEPTIONS
OTHERS = 22
.
IF SY-SUBRC <> 0.
else.
endif.
itab-maktx = '一二三四一二三四'. append itab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'D:\test2.dbf'
FILETYPE = 'DBF'
codepage = '8404'
CONFIRM_OVERWRITE = 'X'
TABLES
DATA_TAB = ITAB
FIELDNAMES = FLDITAB
EXCEPTIONS
OTHERS = 22
.
IF SY-SUBRC <> 0.
else.
endif.
the file 'test.dbf' there is no error, but the file 'test2.dbf' can't open.
2015 Sep 16 7:22 AM
i have found a way :
maktx type char16,
but i think it isn't the best way .
2015 Sep 14 9:29 AM
Dear Sanee,
Once check your security settings in GUI, might be accidentally denied access rule might have been applied or else use other name.Can u tell which exception is being raised.
2015 Sep 14 9:38 AM
no exception is being raised. two dbf files can be write into disk ,but the ’test2.dbf‘ can't open by other program,they always say "the table will need to be repaired " .
2015 Sep 14 9:38 AM
2015 Sep 14 9:45 AM
maybe the problem is SAP think '一二三四一二三四' is 8 bytes ,but micosoft system think '一二三四一二三四' is 16 bytes ,
how can i export a right format file ?
2015 Sep 15 8:38 AM
Dear Sanee,
Please open in excel and check. since the second append is making two rows in excel, so please check encoding type and separators of gui download function module..
2015 Sep 16 7:19 AM
2015 Sep 16 7:22 AM
i have found a way :
maktx type char16,
but i think it isn't the best way .