Tuesday 12 April 2016

ArrayS in Peoplecode


Local File &FILE1;
Local string &STRING, &ITEM_ID, &ship_id;
Local array of string &Array;
&FILE1 = GetFile(xyz.txt, "R", %FilePath_Absolute);
&Array = CreateArrayRept("", 0);
If &FILE1.IsOpen Then
   While &FILE1.ReadLine(&STRING);
      &Array = Split(&STRING, Char(9));/*** Define array and make sure the Fields separated by tab space  in xyz.txt file***/
      &ITEM_ID = LTrim(RTrim(&Array [1], " "), " ");
      &ship_id = LTrim(RTrim(&Array [2], " "), " ");
                MessageBox(0, "", 0, 0, "The Processed  item id's are  # " | &ITEM_ID );

   End-While;
End-If;

&FILE1.Close();
/***The string &item_id ( includes 1234,4567 values) which can be used for validations or printing ***/

No comments:

Post a Comment