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

Error using FM SAP_CONVERT_TO_CSV_FORMAT

Former Member
0 Likes
697

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

1 REPLY 1
Read only

Former Member
0 Likes
390

Hi,

Could you please tell me the number of records being fetched by your select statement?

If they are very large in number,then this short dump occurs.

Also, try reducing the number of fields being fetched in the Select statement and it might work because sometimes the size of the memory available to hold the data exceeds.

Also, try using "Into corresponding fields of" instead of into itab. in the Select statement.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.