Application Development 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: 

FUNCTION 'GUI_DOWNLOAD' error, to dbf files

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

i have found a way :

maktx type char16,

but i think it isn't  the best way .

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

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 " .

0 Kudos

thanks for replay.

Former Member
0 Kudos

maybe the problem is SAP think '一二三四一二三四'  is 8 bytes ,but micosoft system think '一二三四一二三四' is 16 bytes ,

how can i export a right format file ?

0 Kudos

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..

0 Kudos

thanks for reply

Former Member
0 Kudos

i have found a way :

maktx type char16,

but i think it isn't  the best way .