Skip to Content
0
Former Member
Nov 27, 2008 at 10:05 AM

Mapping help required.

14 Views

Hi...

I need one help in mapping.

Below is the input file structure.

Input--


(11)

Invoicedate

PODate

PONumber

InvoiceAmount

GRDetails---- (0 -unbounded)

GRNumber

GRQuantity

POItem

InvocieLineItem -


(0---unbounded)

POItem

POUnit

ItemAmount

ItemNumber

TaxCode

Below is the output file structure.

Output----


(1.....1)

Item--


(0unbounded)

InvoiceDocumentNumber

POitem

POUnit

RefDocYear

Quanitity

ItemAmount

ItemNumber

Based on the POItem which is in the GRDetails,Invoice Doument Number should get generated.

POItem of both GRDetails and InvoiceLineItem are same.

InvocieDocumentNumber,ItemNumber should change depending on the POItem.

Could you please help me in this mapping issue.

for eg, if we give the details in below format,

Input

InvocieDate---27/11/2008

PODATE----


27/11/2008

InvoiceAmount--100

GRDetails

GRNumber-----GR01

GRQuantity---50

POItem-------00010

InvocieLineItem

POItem-------00010

POUnit-------EA

ItemAmount---20

ItemNumber----0001

TaxCode-----V0

I need to get output as below.

Output----


(1.....1)

Item--


(0unbounded)

InvoiceDocumentNumber----


000001

POitem----


00010

POUnit----


EA

RefDocYear----


2008

Quanitity----


50

ItemAmount----


2000

ItemNumber----


0001

If i have multiple records like below

Input

InvocieDate---27/11/2008

PODATE----


27/11/2008

InvoiceAmount--100

GRDetails

GRNumber-----GR01

GRQuantity---50

POItem-------00010

GRDetails

GRNumber-----GR02

GRQuantity---40

POItem-------00020

InvocieLineItem

POItem-------00010

POUnit-------EA

ItemAmount---20

ItemNumber----0001

TaxCode-----V0

InvocieLineItem

POItem-------00020

POUnit-------EA

ItemAmount---30

ItemNumber----0002

TaxCode-----V0

I need to get output as below.

Output----


(1.....1)

Item

InvoiceDocumentNumber----


000001

POitem----


00010

POUnit----


EA

RefDocYear----


2008

Quanitity----


50

ItemAmount----


2000

ItemNumber----


0001

Item

InvoiceDocumentNumber----


000002

POitem----


00020

POUnit----


EA

RefDocYear----


2008

Quanitity----


40

ItemAmount----


3000

ItemNumber----


0002

Thanks

Leela