Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

I have an output like,

NameID
Pete1
Pete2
Mark3
Mark4

The expected output is,

NameID
Pete1,2
Mark3,4

To do so,

1     Group the report on the Name

Create a formula Group_header  and place it in the Group Header section

  WhilePrintingRecords;

    StringVar chain := '';

    NumberVar ChCnt := 1

2     Create a formula Details and place it in the Details section

WhilePrintingRecords;
    StringVar Item:= {ASPENTDMProd_query.Customer Name};
    StringVar Chain;
    NumberVar ChCnt;

if  ChCnt = 1
    then (ChCnt:= 2; chain := Item)
    else
if instr(Chain, Item) = 0 then
    if Length(Chain) + Length(Item) > 254
    then Chain := Chain else
    chain := chain + ', ' + Item

3     Create a formula Group_Footer and place it in the Group Footer Section

WhilePrintingRecords;

    StringVar Chain

4     Suppress the Details/Footer Section based on how the output is required

Labels in this area