Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dump while downloading data from table BSEG into local file

Hello ,

I made ​​the following treatment but ai get a dump

OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT * FROM BSEG .

DO.

REFRESH TB_BSEG .

FETCH NEXT CURSOR S_CURSOR

INTO TABLE TB_BSEG

PACKAGE SIZE 100.

IF SY-SUBRC NE 0 .

  • CLOSE CURSOR S_CURSOR.

EXIT .

ENDIF.

CALL FUNCTION 'DB_COMMIT'.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD

EXPORTING

FILENAME = P_FICH

FILETYPE = 'ASC'

WRITE_FIELD_SEPARATOR = 'X'

  • FILETYPE = 'BIN'

APPEND = 'X' " use append option

CHANGING

DATA_TAB = TB_BSEG.

CALL FUNCTION 'DB_COMMIT'.

ENDDO.

CLOSE CURSOR S_CURSOR .

DUMP :

Causes

Error in the ABAP Application Program

The current ABAP program "ZMM_EXTRACT_BSEG" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

Unable to perform database selection fully.

Es ist eine Ausnahme aufgetreten, die weiter unten näher erläutert wird.

Die Ausnahme, der die Klasse 'CX_SY_OPEN_SQL_DB' zugeordnet ist,

wurde nicht abgefangen und führte deshalb zu einem Laufzeitfehler.

Der Grund für die Ausnahme ist:

One of the database selections included a database Commit.

The selection was then supposed to continue. Before a

database commit, however, all outstanding database selections

must be concluded.

Possible causes in the application program:

While a read process from a database cursor is taking place

(within a loop SELECT/LOOP/EXEC SQL or before a FETCH command),

one of the following statements is used:

- MESSAGE (apart from MESSAGE S...)

- COMMIT WORK

- ROLLBACK WORK

- BREAK-POINT

- WAIT

- CALL FUNCTION ... DESTINATION (synchronous RFC)

- CALL FUNCTION ... STARTING NEW TASK

- RECEIVE RESULTS

- CALL DIALOG

- CALL SELECTION-SCREEN

- CALL TRANSACTION

- CALL SCREEN, or any other statement that results in the display of a

new screen

Whenever a program runs in debugging mode, a "COMMIT WORK" can

possibly be triggered during database selection. This abnormal

termination can also occur in debugging mode even with a correct

program.

Not what you were looking for? View more on this topic or Ask a question