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 converting internal table data to FLat file

Former Member
0 Likes
986

SAP_CONVERT_TO_TEX_FORMAT

When i m using this function module to convert my internal table data in to text format

i m getting a dump :

Short text

The current statement is only defined for character-type data objects.

Please help me out

7 REPLIES 7
Read only

Former Member
0 Likes
908

Hi

See that all your Internal table fields are of <b>CHAR</b> type

if not convert them to CHAR type and then use this fun module

it will work.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
908

if i m using many fields how will it be posible to change aal the fields to char type

like there can be more than 100 fiels in a table

Read only

Former Member
0 Likes
908

hi,

we need to pass standard table as input check which table u r passing.

Read only

0 Likes
908

I am using this for table VBAK

Read only

Former Member
0 Likes
908

My Code looks some thing like this

TYPE-POOLS : truxs.

DATA : gt_text TYPE truxs_t_text_data.

SELECT * FROM vbak INTO TABLE lt_vbak.

CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'

EXPORTING

i_field_seperator = '#'

TABLES

i_tab_sap_data = lt_vbak

CHANGING

i_tab_converted_data = gt_text.

Read only

0 Likes
908

Hi,

try using dataset then,

OPEN DATASET outfile_fcsr FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

LOOP AT lt_vbak into wa_vbak.

TRANSFER wa_vbak TO outfile_fcsr.

ENDLOOP.

CLOSE DATASET outfile_fcsr.

where outfile_fcsr is file path.

Regards,

Sooness.

Read only

0 Likes
908

Hi sooness,

the thing is i do not want to save my file to the application server.

i need to pass this file to the LInux server through FTP.

will be using ftp_connect, ftp_command, ftp_r3_to_server commands after this