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

FUNCTION 'GUI_DOWNLOAD' error, to dbf files

Former Member
0 Likes
1,187

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
Read only

Former Member
0 Likes
1,058

i have found a way :

maktx type char16,

but i think it isn't  the best way .

7 REPLIES 7
Read only

Former Member
0 Likes
1,058

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.

Read only

0 Likes
1,058

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

Read only

0 Likes
1,058

thanks for replay.

Read only

Former Member
0 Likes
1,058

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

how can i export a right format file ?

Read only

0 Likes
1,058

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

Read only

0 Likes
1,058

thanks for reply

Read only

Former Member
0 Likes
1,059

i have found a way :

maktx type char16,

but i think it isn't  the best way .