Converting Lines to comma seprated string

shettarvikasshettarvikas Member Posts: 106
Hi,

I want to store all the item codes of a sales order into a variable such that, each item is seprated by a comma.

E.g: If in sales order, there are 5 lines (5 different items codes i.e. A,B,C,D & E), then i want to store these item codes in a variable, in the following format....

Var := A,B,C,D,E

Please suggest.

Thanks & regards,
Vikas

Comments

  • BeliasBelias Member Posts: 2,998
    set your filters on "mytable" and then...
    itemstring := '';
    mytable.findset;
    repeat
      itemstring := itemstring + mytable."item no." + ',';
    until mytable.next = 0;
    itemstring := delchr(itemstring,'>',',');              //delete the last comma
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • shettarvikasshettarvikas Member Posts: 106
    Hi Belias,

    Thanks its working!!

    Regards,
    Vikas
Sign In or Register to comment.