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

IT_TABLE TO FILE

Former Member
0 Likes
355

Hello I have an internal table and I like to save that in a file .

I used it but it doesn't work. Thanks

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    EXPORTING

      FILENAME                  = STR2  "str2 = c:helloname.csv

      CHANGING
      DATA_TAB                  = IT_STATUS_F



          .
  IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
337

Hello Ana Mari

I assume that you are (still) using itab's with header lines. If so change your coding accordingly:

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    EXPORTING
 
      FILENAME                  = STR2  "str2 = c:helloname.csv
 
      CHANGING
      DATA_TAB                  = IT_STATUS_F[].  " brackets !!!

Regards

Uwe

Hello I have an internal table and I like to save that in a file .

I used it but it doesn't work. Thanks

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    EXPORTING

      FILENAME                  = STR2  "str2 = c:helloname.csv

      CHANGING
      DATA_TAB                  = IT_STATUS_F



          .
  IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

1 REPLY 1
Read only

uwe_schieferstein
Active Contributor
0 Likes
338

Hello Ana Mari

I assume that you are (still) using itab's with header lines. If so change your coding accordingly:

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
    EXPORTING
 
      FILENAME                  = STR2  "str2 = c:helloname.csv
 
      CHANGING
      DATA_TAB                  = IT_STATUS_F[].  " brackets !!!

Regards

Uwe