cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc to file mapping

Former Member
0 Kudos

Hi Friends,

we have a scenario where the idco needs to be mapped to a file, as it is.

eg: the file records will have the

segment number, segment name, fields of segment....

so if the idoc has 10 segments (including repeating item level segments ) then the file will have 11 records (1 for the idoc control record + 10 ) .

each record will start with segment number (sequentially from1 to ...10), segment name & the the fileds of the segment.

so the file strcuture can be synamic depending on which segments of the idoc is filled.

1. Is there some way to get the target data type like the idoc (without having to create it manually- say by export import of idoc xsd structure )

2. how best to do this mapping ?

mapping is one to one but dynamic due to reasons above.

Regards

Prasenjit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

You can use the following function modules in abap mapping programs to accomplish this. You need some custom programin to wrap it up. We have done it in one project. You also need the abap classes for converting character set encodings plus another couple of functions modules.

IDX_IDOC_TO_XML

IDX_XML_TO_IDOC

This way you can avoid the disaadvantiage in the howto guidem where the idoc is sent twice to xi.

Best regards

Otto Frost

0 Kudos

x

MichalKrawczyk
Active Contributor
0 Kudos

hi,

have a look at this mapping

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1...

it's best to do via ABAP or java mapping

Regards,

michal