Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Java mapping help please

$
0
0

Hi all,

 

I need help with java code please.

 

My source is a csv file and target is multiple idocs.

 

Source file structure is as follows:

 

Header (field 1, field 2, ........ field 10)

Item 1a (field 1, field 2, field 3, .........    field 180)

Item 1b (field 1, field 2, field 3, .........    field 180)

Item 2a (field 1, field 2, field 3, .........    field 180)

Item 2b (field 1, field 2, field 3, .........    field 180)

.

.

.

Item na (field 1, field 2, field 3, .........    field 180)

Item nb (field 1, field 2, field 3, .........    field 180)

 

First line is header. Second is VAT line. Third is Price line for that VAT. Now VAT and Price lines repeat. There need not be VAT line for non-European countries. So a VAT line may or may not preceed a Price line.

 

For example: the lines can be like:

 

Header

VAT1

Price1

VAT2

Price2

Price3

 

 

1) Now, it should produce 3 idocs like:

 

Header, VAT1, Price1

Header, VAT2, Price2

Header, Price3

 

2) One idoc should be created per a pair of VAT and Price lines and they will be identified by a co-relation of a particular field. So first I have to sort all the lines based on this field value. Then I have to read the lines in pairs. If no Vat line, I should just read the Price item and produce an idoc.

 

 

Can you please help me with the java code for this?

 

Many thanks in advance.

Ramesh.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>