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: 

Dump - Method CL_GUI_FRONTEND_SERVICES-FILE_SAVE_DIALOG

Former Member
0 Kudos

Hi guys,

I using the method CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG to export data out of an ALV into a csv-file. Generally it works but if the number of rows are larger then approximately 10.000 then I get a dump:

Fehleranalyse

    In dem Programm "CL_GUI_FRONTEND_SERVICES======CP" wurde durch eine

     RAISE-Anweisung die Exception

    (Ausnahmebedingung) "CNTL_ERROR" ausgelöst.

    Da die Exception nicht durch ein in der Aufrufhierarchie darüber-

    liegendes Programm abgefangen ist, wurde die Verarbeitung abgebrochen.

    Kurztext zur Ausnahmebedingung:

    Eine ausführliche Dokumentation der Ausnahmebedingung finden Sie

    über Transaktion SE37 (Funktionsbibliothek). Den gerufenen

    Funktionsbaustein können Sie der Anzeige der aktiven Aufrufe

    entnehmen.

115           FULLPATH               = FULLPATH
116         EXCEPTIONS
117           OTHERS                 = 1.
118     ELSE.
119       CALL METHOD HANDLE->CALL_METHOD
120         EXPORTING
121           METHOD     = 'FileSaveDialogEx'
122           P_COUNT    = 7
123           P1         = WINDOW_TITLE
124           P2         = DEFAULT_EXTENSION
125           P3         = DEFAULT_FILE_NAME
126           P4         = FILTER
127           P5         = INITIAL_DIRECTORY
128           P6         = BWITHENCODING
129           P7         = BPROMPT_ON_OVERWRITE
130           QUEUE_ONLY = ' '
131         IMPORTING
132           RESULT     = FULLPATH
133         EXCEPTIONS
134           OTHERS     = 1.
135
136       CALL METHOD CL_GUI_CFW=>FLUSH
137         EXCEPTIONS
138           CNTL_SYSTEM_ERROR = 1
139           CNTL_ERROR        = 2
140           others            = 3.
141     ENDIF.
142
143 *handle exceptions......................................................
144     IF SY-SUBRC <> 0.
>>>       RAISE CNTL_ERROR.
146     ENDIF.

Any ideas how I can solve this problem?

Cheers

Robert

6 REPLIES 6

Former Member
0 Kudos

Hi

You need to manage that excption (CNTL_ERROR) in your program

Max

raymond_giuseppi
Active Contributor
0 Kudos

AFAIK CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG only return a file name and its full path. Check your parameters (type and value) and if correct, you could reinstall your SAP GUI ?

Regards,

Raymond

0 Kudos

Hi Raymond,

is there another way? In general it works so I could use a workaround. I guess it has to do with the volume that I want to export into to CSV-file. If I just export e.g. 7000 to 8000 rows than it is OK. Any other solution?

Kind regards

Robert

0 Kudos

Remarks

  • Was not the dump generated by the method GUI_DOWNLOAD of the class ?
  • You may look for OSS notes at your system level, and upgrade your SAP GUI at latest level/patch.
  • Else look for other tools that allow bigger files like FTP or use of dataset on application server,and then OS tools to transfer to presentation server.

In either case, you have to CATCH those kinds of errors in a TRY/ENDTRY block, so you could receive the long text associated and display it at screen.

TRY.
   " your code
CATCH cx_root INTO oref. " or be more specific...
   text200 = oref->get_text( ).
   MESSAGE i042(zfsb) WITH text200+0(50) text200+50(50) text200+100(50) text200+150(50) DISPLAY LIKE 'E'.
   EXIT.
ENDTRY.

Regards,

Raymond

0 Kudos

Hi

Just as Raymond said the method CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG is to find out the file, you should use CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD to save the file.

So it's strange the error is linked to the size of the file, because here you aren't downloading the file

Now you should mange the exceptions in order to prevent the dump and give more details on when you call CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG

Max

Former Member
0 Kudos

Hi,

thanks for your usefull input but the error didn't appear anymore. I didn't change anything. I don't know why but it is working fine now. Maybe it had something to do with the cache !?!

Strange but I am happy that is is running now.

Kind regards

Robert