Skip to Content
avatar image
Former Member

Mapping help required.

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 27, 2008 at 12:06 PM

    Hi leela,

    you cn acheive this with the index function as below

    poitem-removecontext-index with value 00001 and increase by 1--invoicnaccountno(target).

    hope it helps.

    thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      POItem RemoveContext -index(initial Value-00001,increment-1) -format('00000') Target(InvoicedocNumber)

      if i have only one POITem Item i am getting the value. means

      If i have PoItem as 0010, then in target i am getting 000001.

      if i have 2 POItems ,like

      POItem---0010

      POItem--0020

      then in target i am getting only one InvocieDocNumber as 000001.

      but second one is not cuming.

      Use split by value function before target

      POItem RemoveContext -index(initial Value-00001,increment-1) -format('00000') Split(ByValue)--Target

      Regards

      Raj

  • Nov 27, 2008 at 12:46 PM

    Hi Leela,

    I'm guessing that you're encountering issues in the nodes InvoiceDocumentNumber and ItemNumber ? Is this correct? 😊 Since the solution provided by Sudhir would generate the counting

    Regards,

    Edited by: dspboys on Nov 27, 2008 2:09 PM

    Edited by: dspboys on Nov 27, 2008 2:09 PM

    Add comment
    10|10000 characters needed characters exceeded