Skip to Content
avatar image
Former Member

IDoc to CSV file help

Hello every one,

I have a new interface. The requirement is i have to convert IDoc(Invoice) to CSV file.

The target feilds are as mentioned below

Invoice Number,Invoice Date,PO Number,Invoice Amount,Invoice Description,Line Type,Line Amount,Line Description,PO Line Number,PO Shipment Number,Quantity Invoiced,Unit Price,UOM

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,90,,7,1,5,18,Each

I know the above can be achived easiely usin FCC. But there is slight complexity in it, i.e.. If an invoice has more than one line item, then each line item is represented by a line or record in the CSV file.

For example i will show the format below

Invoice Number,Invoice Date,PO Number,Invoice Amount,Invoice Description,Line Type,Line Amount,Line Description,PO Line Number,PO Shipment Number,Quantity Invoiced,Unit Price,UOM

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,90,,7,1,5,18,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,45,,10,1,3,15,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,21.02,,11,1,1,21.02,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,340,,16,1,1,340,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,232.23,,24,1,1,232.23,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,145.6,,25,1,1,145.6,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,90,,26,1,2,45,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,4935,,27,1,1,4935,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,900,,28,1,1,900,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,1785,,29,1,1,1785,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,3900,,30,1,1,3900,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,136.5,,31,1,1,136.5,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,FREIGHT,148.79,Delivery 500230778,,1,1,148.79,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,ITEM,195.04,,21,1,8,24.38,Each

114187750,08-Oct-2012,3846806,15820.23,Invoice 114187750 for PO 3846806,FREIGHT,4.48,Delivery 500235191,,1,1,4.48,Each

I just wanted to know if i can accomlish the above.

Regards

Swetha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 24, 2012 at 09:28 AM

    Hi Swetha,

    This should be possible, if you bear in mind two important things:

    1. FCC will not be capable of duplicating the header line after each item, so you will need to take care of it in the mapping step. Your mapping result should be something like that:

    <Entry>

    <Header/> //Document 1

    <Item/>     //Item 1 of Document 1

    </Entry>

    <Entry>

    <Header/> //Document 1

    <Item/>     //Item 2 of Document 1

    </Entry>

    ...

    2. Use the Nodeception concept suggested by @Shabarish Vijayakumar in his blog File Conversion using 'Nodeception', to achieve the final structure that can be processed by FCC:

    <Header/> //Document 1

    <Item/>     //Item 1 of Document 1

    <Header/> //Document 1

    <Item/>     //Item 2 of Document 1

    ...

    Then, you can use FCC as normally, to convert the data to flat file.

    Regards,

    Greg

    Add comment
    10|10000 characters needed characters exceeded