cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert flat file to IDOC

Former Member
0 Kudos

Hello

I've read the document How Tou2026Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0, it's very helpfule and I've built the scenario of IDOC to flat file with the abap mapping. However, for scenario of Flat file --> PI --> IDOC, it says manually intervention is needed to manually import the flat file using report RSEINB00 to convert the file to IDOC and then send to the pipeline. This solution is not practical in hte reality. What we want is to let the file adpter polling hte file, if file exists, get teh file and convert to IDOC in PI without any manual intervention. Anybody has idea how this could work?

As you know file adapter only handles simple structure, deeply nested structure can not be handled by file adpter content conversion. Of course I can take hte file as a string and JAVA / ABAP / XSLT map it to IDOC_XML. However this means a lot of effort. Basically I am looking for solution like the one mentioned in the above documnet from IDOC to Flat file, but opposite direction.

Thanks

Eric

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Eric,

The approach specified in the article is enough. All you need to do is schedule a job which calls this report at a particular interval. So it will be automated on its on. There is no need of any manual intervention there.

Regards,

Merrilly

Former Member
0 Kudos

Hi Merrilly

which article you referred to? The one SaNv listed? this is not an approach I like, because I would need to define a structure for each IDOC I want to process the scenario of File to IDOC.

You said to schedule a job to poll the file and call the report to process it, this sounds interesting, however

1) Source file is located in remote host, I don't think a job make poll a file on remote FTP server, right? (Sorry, I am not ABAP expert). Does it mean I need to configure a scenario to move the remote file to PI server so that that the PI job can poll it? If yes, I'd rather move the remote file to the receiver system and schedule a job there to directly load the file into the system to create IDOC

2) Once the report creates a IDOC_XML, the IDOC_XML is sent to pipeline for further process. In this case, what configuration needs to be done in ID? I guess, no sender agreement because source file is process by the report. Therefore I need to define receiver determination, interface determintion and receiver agreement? Then what outbound interface it should be? (inbound interface would be the imported IDOC, of course) any dummy data type would be okay for outbound interface? Or only receiver agreement is needed?

Thank you

Eric

santhosh_kumarv
Active Contributor
0 Kudos

Hi Eric,

Check this wiki [File To IDOC|https://wiki.sdn.sap.com/wiki/display/XI/FileToIDOC] step by step guide.

Thanks

SaNv...

Former Member
0 Kudos

SaNv, you always gave good advices, but here I am looking for solution without needing to define outbound interface for each source IDOC flat file.

Thanks

Eric

Former Member
0 Kudos

hi,

[;

some tips from this thread.

Regards.

Siddhesh

Former Member
0 Kudos

Hello Eric,

can you check this Blog

--by Prateek Shah

Try creating a flat file from the IDOC XML byusing the file-content conversion

Thanks,

Xi user