cancel
Showing results for 
Search instead for 
Did you mean: 

Using a file of length 1000 in File-to-RFC

Former Member
0 Kudos

Hi,

I have to process a file of length 1000. i have read the full file as a single field(irrespective of the record type whether Header or Data or trailer record) and write it into a table using RFC. when i m trying to create a table with length of field 1000 and trying to use it as the associated type in RFC table I m getting a error in RFC stating

" table1 must a flat structure.You cannot use Internal tables, references or structures as components. "

Is there any other way to fetch the row into single field only. Please let me know.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I created a Structure with a single field of type LCHAR and was able to use it in my RFC. It worked.

former_member190389
Active Contributor
0 Kudos

Hi ,

In your table add a field with type String into it.

Do the following steps

1. In Se11 create a Table type (say ZTT) with line type in it say 'data ' of type Char 5000 (or ur requirement as 1000).

2. Use this ZTT as a importing parameter of the RFC.

3. Creat a Table ZTable in se11 with a field 'value' type Char 5000.

Now in the RFC write the code

DATA:

git_products TYPE STANDARD TABLE OF zTable ,

gwa_product TYPE zvt014_shopsales ,

wa_data type string.

loop at data into wa_data.

gwa_product-value = wa_data.

Append gwa_product to git_products

endloop.

MODIFY zvtable FROM TABLE git_products.