Pleas Help

Hi All,

Can anyone help to insert multiple records which is available in an
XMLString.Basically couuld you please suggest an Flow Steps for my task.

Since i am new to this , looking forward your reply from all,

My XMLString:

<prlnno>10<prlnno>
<price>230</price>
<prlnno>20<prlnno>
<price>890</price>

So basically above content should be inserted in an Table which has the fields as follows:

Table name : WMPRDT
Field name : prlnno,price

and my output should be , Record must be inserted as Two Rows liks as follows,

      prlnno         price 

Row1 : 10 230
Row2 : 20 890

Hanging on this for long time ,

regards
Brick

Hi Brick,

The problem is the XML string you are using. Now you get two stringlists (prlnno and price) after running stringToDocument and documentToRecord. Also your <prlnno> tag is not closed correctly it should be </prlnno>.

So there are two solutions:

  1. The best one: generate a correct XML document and then run stringToDocument and documentToRecord services.

<doc>
<record>
<prlnno>10</prlnno>
<price>230</price>
</record>
<record>
<prlnno>20</prlnno>
<price>890</price>
</record>
</doc>

  1. Get each time the same index from the two stringLists with the pub.list.getStringListItem service.

Regards,
Hugo