Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Group by + smartforms

Former Member
0 Likes
1,992

Hello,

I am creating a report using smartforms to show a list of sellers grouped by their coordinator (their boss)

This report should show something like this:

Coordinator 1

--Seller 1

--Seller 2

--Seller 3

Coordinator 2

--Seller 4

--Seller 5

Coordinator 3

--Seller 6

--Seller 7

--Seller 8

I haven't been able to do this, so far this is what I'm getting:

Coordinator 1

--Seller 1

Coordinator 1

--Seller 2

Coordinator 1

--Seller 3

Coordinator 2

--Seller 4

Coordinator 2

--Seller 5

As you can see, the coordinator is been repeated for every seller. I don't know how to do in smartforms to group this data by the field coordinator. I've read about page-breaks, but I don't really see how it could help me to achieve what I want.

I'd really appreciate any help.

Thanks in advance.

Best regards.

1 ACCEPTED SOLUTION
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,343

Hi,

Have a look at SF_EXAMPLE_03

regards

5 REPLIES 5
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,344

Hi,

Have a look at SF_EXAMPLE_03

regards

Read only

Former Member
0 Likes
1,343

Hi Henry ;

You should create a table in the main window and you should

create a table row.In this table row firstly,write the coordinator text.

After that,create a loop in this table row for seller info.

Regards,

Özgün

Read only

thangam_perumal
Contributor
0 Likes
1,343

Hi Hendry,

               Please place the screen shots and codes...

Read only

0 Likes
1,343

Hi all,

Thank you very much for your answers and help.

The SF_EXAMPLE_03 was perfect to achieve what I needed. In the Data tab of the table in the Sort Criteria Group Box, I entered the field COORDINATOR, so the table will be sorted by this field, then in the Table Tab I added a new row where the coordinator will be shown.

Thanks a lot.

Best reagrds.

Read only

0 Likes
1,343

Hi,

The lesson that I learned from SF_EXAMPLE_03 is that it is much easier to create the data model in the driver program an let the smart form print.

This is the principle of "Separation of concerns" http://en.wikipedia.org/wiki/Separation_of_concerns .

I wrote some blog's about this. see http://scn.sap.com/community/abap/blog/2013/10/09/deeper-dive-into-deep-structure ( 4 chapters)

http://scn.sap.com/community/abap/blog/2013/10/22/deeper-dive-into-deep-structure--part-3 deals with smart form.

Regards.