Thomson S
11th May 2013, 12:27
Hi,
I have a requirement where in I will receive a request for a Stock availability check for multiple items as a Single string. The string which i will receive contains a common field 'message Id' and 'track id' present at the first position and second position respectively. followed by multiple item details. and at the end again common fields 'language' and 'user'. The string contains 25 fields.. first two is 'message id and track id' and last two is 'User and language'.
In between those fields i ill have looped fields. like below.
messageid|trackid|Item1|quantity|unit|price|customer|Item2|quantity|unit|price|customer|Item3|quantity|unit|price|customer|User|language.
I have to check the stock available for each item and send back as a response details.
How can i loop the inbetween fields as first two and last two are common for a single string. I have to read the string into seperate fields. and process it individually... how can i loop it. please help me.
Note: the last two fields are optional. it may or maynot come in the string.
I have a requirement where in I will receive a request for a Stock availability check for multiple items as a Single string. The string which i will receive contains a common field 'message Id' and 'track id' present at the first position and second position respectively. followed by multiple item details. and at the end again common fields 'language' and 'user'. The string contains 25 fields.. first two is 'message id and track id' and last two is 'User and language'.
In between those fields i ill have looped fields. like below.
messageid|trackid|Item1|quantity|unit|price|customer|Item2|quantity|unit|price|customer|Item3|quantity|unit|price|customer|User|language.
I have to check the stock available for each item and send back as a response details.
How can i loop the inbetween fields as first two and last two are common for a single string. I have to read the string into seperate fields. and process it individually... how can i loop it. please help me.
Note: the last two fields are optional. it may or maynot come in the string.