Skip to Content
0
Former Member
Sep 18, 2007 at 02:30 AM

Error using FM SAP_CONVERT_TO_CSV_FORMAT

305 Views

Good day everyone.

I'm having problems with the FM SAP_CONVERT_TO_CSV_FORMAT and to be honest I don't have the slightest idea why it prompts the run time error DBIF_RSQL_INVALID_RSQL.

Below is my sample code:

TYPE-POOLS:TRUXS.

DATA: ITAB1 TYPE TRUXS_T_TEXT_DATA OCCURS 0.

SELECT polno lname fname mi pfx apl pos ofccode basic gsisid empno div stn

duemon ps psion psint psintion gs gsion gsint gsintion ec ecion ecint

FROM zcddepted

INTO table itab.

CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'

EXPORTING

I_FIELD_SEPERATOR = ','

TABLES

I_TAB_SAP_DATA = itab

CHANGING

I_TAB_CONVERTED_DATA = itab1

EXCEPTIONS

CONVERSION_FAILED = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Hope you guys could help me. What happens is that when I try to execute the program the run time error automatically comes out. Below is the reason of the error:

What happened?

Error in the ABAP Application Program

The current ABAP program "ZCD_DEPTED_LAYOUT" had to be terminated

because it has come across a statement that unfortunately cannot be

executed.

Please, please, please, hope you guys could help me. Thanks in advance.

Anna