cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file with IDOC structure on sender side - how to convert

Former Member
0 Kudos

Hello,

I have a flat file with an IDOC structure in it, like produced from R/3.

Example:

EDI_DC40 4000000000000761577620 3014 ORDERS05 ORDRSP SAPR3P LS LS_R3P_302 DATEIPORT2KMBG0000019887 20061206095508 20061206095508

E2EDK01005 400000000000076157700000100000001004 EUR 1.00000 0039 DFUE0000543012 12Muenster/Weststr.0000019887

E2EDK14 40000000000007615770000020000000200630

E2EDK14 40000000000007615770000030000000200710 ......

I need to send this file via XI to an R/3 system as an ORDERSP IDOC.

My question is:

What is the easiest way to do this?

My intention is to us a self programmed mapping!

Best regards

Dirk

null

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

both ways are described here:

https://websmp107.sap-ag.de/~sapdownload/011000358700001795162005E/HowToIDocXMLToFlat.pdf

did you have a look at that?

Regards,

michal

Former Member
0 Kudos

Hello Michal,

one question :

The directory for WE21 from chapter 3.2 needs to be on the XI server?

regards

Dirk

Shabarish_Nair
Active Contributor
0 Kudos

the directory should be accessed from XI server.

Do a Access test when u create the port to know if the directory is reachable.

i am not sure but try to confirm if that directory can reside on any other location and in case it is mapped, you can poll the file from that location too.

Former Member
0 Kudos

Hi Shabarish,

I found a sinple solution:

File adapter picks up file from external drive

Receiver adapter saves it on XI server directory

We21 can pick up now from here!

But, next problem:

When trying to save the file port in We21 (like described in the guide) I get a message: Port incomplete, not possible to save! (mess. is green -> information).

But I cannot save the port. What is wrong?

Hm, possibly reason was that inbound and outbound file name was the same! Now its OK! Port is created!

Regards

Dirk

Message was edited by:

Dirk Meinhard

Shabarish_Nair
Active Contributor
0 Kudos

did you fill some values in the outbound file tab.

it seems it expects some value there.

after the inbound details are filled in the outbound file, along with the defaults just try putting

EDI_PATH_CREATE_DATE_TIME as the FM name and save.

Former Member
0 Kudos

Hi Shabarish,

we are in progress, small step by small step!

Unfortunately our file has a wrong receiver information for SAP system and client.

If we can erase this information, possibly the report RSEINB00 will identify the correct receiver in another way (information from comments in debugging).

Do you know, how, because this is not clear in debugging?

As we understand, the required receiver SAP system needs to be available in Int. Directory. But no receiver determination here is required?

Regards

Dirk

Answers (2)

Answers (2)

former_member184619
Active Contributor
0 Kudos

hi Dirk

Creating Purchase Order Idoc through XI

/people/ravikumar.allampallam/blog/2005/03/03/creating-purchase-order-idoc-through-xi

in this link it is by using PORDCR04 idoc but it is useful.

Regards

Sachin

Shabarish_Nair
Active Contributor
0 Kudos

you can content convert the file and then use it in your mapping to the Idoc.

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

MichalKrawczyk
Active Contributor
0 Kudos

hi,

actually it's difficult that way as IDOC have more then 2 levels of sutrucutres

(items and subitems) and it's not possible to convert it easily with content conversion)

Regards,

michal

Shabarish_Nair
Active Contributor
0 Kudos

Yes in case multiple levels are in the picture it can be a tough task to do FCC.

Section 3.2 of the how to guide mentions how to "Convert a flat file representation of an IDoc to IDoc-XML" !!!

Former Member
0 Kudos

Hello Shabarish,

I know content conversion, but to implement the logic of the IDOC structure into the conversion parameters looks like the hell of work to me!

The problem is that the content of the nodes like E2EDK14 are given as a string, where I need to cut relevant segment via field length parameters.

I receive here a complete ORDERS Idoc structure.

Regards

Dirk

Former Member
0 Kudos

Hi Michal,

*actually it's difficult that way as IDOC have more then 2 levels of sutrucutres

(items and subitems) and it's not possible to convert it easily with content conversion)*

Yes, the next problem I already tested!

Thank you remembering that the guide with the Abap Mapping template has a last page.

I try to understand whats going on here with this WE21 idea. Looks like it is not suitable for a regular use? Or does it mean.. to use it, plan the named report into a job?

And there is the problem with file directory access!

regards

Dirk