cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario - FILE to IDOC with a complex FCC funcition

cesar_sevilha
Explorer
0 Kudos

Hello experts!

I've received a requirement to read a txt file and created a Sales Order via Idoc (Orders) and I'd like your opinion about the best way to execute that.

The requirement:

Read the file (txt) with the structure below where the yellow lines are the Header of sales orders, therefore, I need read once the lines "EDI_DC40" and "LINHA1" and the the others lines from "LINHA2" till "LINHA9" are the items of the sales order.

I thought as a solution create the FCC function to read this file and transform it into an XML structure and mapping it with the IDOC, however, I've never created the FCC function with this kind of the file. I don't know how to ignore the others lines with head information.

My main doubt is: what is the best solution for reading this file and transform it into XML structure? (FCC or java mapping)? Is it possíble to create a java mapping to transform the file into the communication channel?

I appreciate any input.

Thank you.

César Sevilha,

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190293
Active Contributor

Hi Cesar!

There is a plenty of ways to achieve your requirement. I would start with trying to convert your input to simple XML like:

<row>

<field>

<value>

</row>

and use XSLT transformation to build IDoc structure.

Regards, Evgeniy.

cesar_sevilha
Explorer
0 Kudos

Hi Evgeniy,

how are you?

Thank you for your reply. I converted the input file to XML as your recomendation and after that I've executed some substring function and the result was as expected.

Thank you.

César Sevilha.