cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter - Read file completely

Former Member
0 Kudos

Dear community

We have a file interface where we want to read a file completely, instead line-by-line. This is due to performance reasons. The bapi we want to use in our action is able to use a table of data. This data is read from a file, manipulated and then passed to the bapi. So far, we read the data line-by-line from our file. Is it possible to read the file completely and then execute the action once for all read data?

Thank you in advance,

Kind regards

Thimo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thimo,

yes, its possible. Your interface's raw structure needs a component which has a table type. The line type of this table needs to fit to your file.

In the file adapter configuration maintain your interface's raw structure in field "Structure Name". Maintain the component of your table type in field "Field Name".

Then you should have all lines of the file in one data message and can call the action for all lines at once.

Best regards,

Verena

Former Member
0 Kudos

Hi Verena

Thank you for your answer.

I have the following structure set in the interface:

The table type of component "LINE" has the following structure which matches our file:

The following settings were made in our file adapter:

But our file is still read line by line. Do we have to set the import parameter of "CURR_LINE" to the table type? I think that the parameter curr_line is currently equal to one line of the file. This brings me to another problem we are facing: We cannot debug the action FM. No matter what breakpoint we set, it does not stop there.

Former Member
0 Kudos

Hi Thimo,

Could you check one of the messages in /AIF/ERR. How many lines does the component LINE have for a message?

As you are referring to CURR_LINE, which is the parameter of an action function module, I assume that the issue is not in the file adapter, but that it is rather related to the way the action is called.

Best regards,

Verena

Former Member
0 Kudos

Hi Verena

I see 4 lines in /AIF/ERR in LINE, with a file of 4 lines.

When I call the action I use this record type:

We now changed the Record Type to blank and it's working.

Thank you very much!

Answers (0)