How to collect IDOCs in SAP Business Connector and creates a single File

Hi Friends.

Following are my doubts, please go through this and advise me how to proceed further.

We have to collect all the IDOCs that have been created by the change pointers for the day and then create 1 single output file for all the materials.

generally what ever the Material changes/creations we will do in SAP, by using one Standard SAP program we can post these IDOCs to SAP Business Connector, now my questions is say suppose if is Change 10 materials today all 10 materials clubbed in a one XML File. How to do this can you please explain me how to do this.

Finally my XMl File looks like this…

[FONT=Arial][SIZE=2]
<?xml version="1.0" ?>
<MaterialMaster>
<Material>
<MaterialNumber>000000000000000778</MaterialNumber>

<ProductHierarchy>001500010000000100</ProductHierarchy>

<MaterialDescription>Nokia 6610</MaterialDescription>

</Material>

<Material>
<MaterialNumber>1500-500</MaterialNumber>

<ProductHierarchy />

<MaterialDescription>10W30 MOTOR OIL QT.</MaterialDescription>

</Material>

<Material>
<MaterialNumber>N-1100-3</MaterialNumber>

<ProductHierarchy>001050010000000100</ProductHierarchy>

<MaterialDescription>Pole FRP 15 m</MaterialDescription>

</Material>

<Material>
<MaterialNumber>N-1100-2</MaterialNumber>

<ProductHierarchy>001000010500000110</ProductHierarchy>

<MaterialDescription>Pole FRP 10 m -1</MaterialDescription>

</Material>
</MaterialMaster>

[/size][/font]

My present mappings will get only one material change ( i.e last change material values only I am displaying). It can’t hold multiple levels in one XML File. In BC developer I used transformFlattoHierarchy flow service and I gave the record reference in conformsTo Field, but I don’t know how to pick all the IDOCs and make a single file. Please advise me.

Present Output is like this.

<?xml version="1.0" ?> <MaterialMaster>
<Material>
<MaterialNumber>000000000000000778</MaterialNumber>

<ProductHierarchy>001500010000000100</ProductHierarchy>

<MaterialDescription>Nokia 6610</MaterialDescription>

</Material>

</MaterialMaster>

Please guide me how to display the XML like above i.e (Multi Level).

Regards
Sivaram.K

Sivaram,

Basically the MaterialMaster/Material(this should be recordlist) hope you have this in place in xml record structure.Once you get Materials information from SAP IDOC use pub.list:appendToRecordlist to build Materials recordlist by looping over IDOC/Materials and further recordToDocument (set recordName) this should output xmldata as expected.

HTH
RMG