Skip to Content
0

Scenario - FILE to IDOC with a complex FCC funcition

Feb 09, 2017 at 07:31 PM

54

avatar image

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,

file.png (27.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Evgeniy Kolmakov Feb 10, 2017 at 05:10 PM
1

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.

Share
10 |10000 characters needed characters left characters exceeded
Cesar Sevilha Feb 21, 2017 at 02:11 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded