cancel
Showing results for 
Search instead for 
Did you mean: 

File to IDOC aggsales mapping doubt Urgnt

0 Kudos

Hello,

Im working for a retail client and the requirement is the File to IDOC scenario where Im stuck up in the mapping.

The inbound is a flat file of structure

EDI_DC40

E1WPU01

E1WPU02

E1WPU03

E1WPU04

The target IDOC structure is as follows

WPUUMS01

--IDOC

-


EDIDC40

-


E1WPU01

-


E1WPU02

-


E1WPU03

-


E1WPU04

The problem is with the target segment E1WPU03. This E1WPU03 is actually an optional one in the source inbound flatfile.

So the source will be like this

EDI_DC40

E1WPU01

E1WPU02

E1WPU03

E1WPU04

E1WPU02

E1WPU04

E1WPU02

E1WPU03

E1WPU04

So in the target I need to create the 03 segment if and only if it occurs in the source.

I tired these following but didnt work for me.. what happens is The 03 segment which should come in the third 02 segment actually comes int he second one.

any suggestions if this is possible in message mapping or should I go for an xslt

I tried this one.

SourceE1WPU03 >exists> if withoutelse>then "constant'> targetE1WPU03

Thanks

Prasanna

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> any suggestions if this is possible in message mapping or should I go for an xslt

No, this is not possible with graphical mapping tool.

You need to have a pre-mapping for this.

I recommend Java mapping with SAX parser.

you can easily change the input structure to:

EDI_DC40

-E1WPU01

--E1WPU02

---E1WPU03

-


E1WPU04

--E1WPU02

-


E1WPU04

--E1WPU02

---E1WPU03

-


E1WPU04

Answers (1)

Answers (1)

0 Kudos

Hi Stefan Grube,

Thanks for the quick reply.

Is it possible if we make the 03 segment to be mandatory in the source flat file, any option in the FCC of the file adapter.

If that is possible then I can send the 03 segment for all the 02 segments, those 03 segments which dont have a value will have the structure and empty values.

Just an thought if it is possible then I guess it will save a lot of time involved in the java developments.

Thanks

Prasanna

0 Kudos

I would like to add one more point here.. the segments 03 and 04 are at the same level.

stefan_grube
Active Contributor
0 Kudos

You can solve it, when you put record sequence to ascending.

Then your structure would look like this:

record

EDI_DC40

E1WPU01

E1WPU02

E1WPU03

E1WPU04

record

E1WPU02

E1WPU04

record

E1WPU02

E1WPU03

E1WPU04

0 Kudos

I actually tried the one suggested above.. but no luck..

Can you pls send me some link for the Java mapping for Parser so that I can start working on it

0 Kudos

Hi Stefan

what you suggested was right, changing the recordset sequence to ascending in FCC did actually helped.

I was in a hurry then so I didnt do much on the Message Mapping part after changing the FCC.

So in message mapping I changed the context of the segments 01 and 02 to the highest node (MT_xxx) in my case.

Problem solved!!! and I have assigned points for you

Thanks

Prasanna