cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display repeating groups of header/detail data?

former_member210148
Participant
0 Kudos

Hello!  I've been searching everywhere (both SCN and external) trying to get some insight into my issue, but I'm coming up empty.  I think I've hit things that might be related to what I need to do, but my experience with WDA is still pretty limited and I'm stuck.

My requirement is pretty straight-forward.  I have a table of Header records.  Let's say we have 3 records in that table.  I also have a table of Detail records associated with the Header records.  Assume that each Header record has 5 Detail records, although the number of Detail records could be variable.

I've built my WDA screen so that I have the usual stuff at the top -- title, navigation buttons, etc.  I also have two start/end date drop-down fields.  The initial values for these fields are defaulted, but whenever the user changes one of these dates, I would regenerate the screen with data falling within the specified start/end dates.

Okay, here's basically what I want the screen to look like:

Header A record

Detail record 1 for Header A record

Detail record 2 for Header A record

Detail record 3 for Header A record

Detail record 4 for Header A record

Detail record 5 for Header A record

Header B record

Detail record 1 for Header B record

Detail record 2 for Header B record

...and so on.

I'm familiar with building WDA screens with field elements, but I don't know how to tackle this one.  Does this get into dynamic programming?  I'm thinking yes, but again, my experience has been limited.  I know there's lots I haven't learned, and maybe there are other types of elements or approaches I don't know about.

Also, I want to keep that basic information at the top of each screen because the user needs the ability to change the date parameters and see how it changes the refreshed data.

Help would be greatly appreciated.  Thank you, and have a great day!

Dave

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member211591
Contributor
0 Kudos

Hi Dave,

you can use SALV_WD_TABLE  hierarchy or Table with TreeByKeyTableColumn.

I first intended to use SALV_WD_TABLE but I figured out that I can't sort the header rows (SALV_WD_TABLE-hierarchy always sorts alphabetically). So I implemented it with the UIElement table.

My result:

Please check documentation how to implement this.

Maybe its an idea you can work with.

BR

ismail

Former Member
0 Kudos

Hi Dave,

From your requirement this is what I understood:

You need a table where you will have Header Rows and in between them you will have the detailed entries. You have two input fields to enter start and end date and depending on that you need to modify the data in the table. I have few queries:

Are the columns of Header and Details Row the same? If yes, populate the data in the context node accordingly, i.e.

H1

D1.1

D1.2

D1.3

H2

D2.1

D2.2

H3

D3.1

Have an attribute in the context node to mark wether it is a Header row or Detail row and then highlight it accordingly. Let me know if this design works, I will elaborate on the steps.

Do you need to put them in same table or you can have an alternative design where you will have two tables one for Header data and the other for Details. On Lead select of a row in Header table the Details table will be populated with the corresponding data. Will this design work? If yes, let me know, I will elaborate on the steps.

Regards,

Sayan

former_member210148
Participant
0 Kudos

Sayan, unfortunately the columns of my Header and Detail rows are not the same.  However, I thought I might just proceed with having one Header and one Detail table on the screen, and like you mentioned (which means I guess I was on the right track! ) I will have the Details table populate with the corresponding data when the Header record is selected.

The added benefit to this is that I think it will result in a cleaner screen for the user as well.

I'm going to leave this thread open for at least a few more days, though, in case someone would like to respond with another suggestion.

Thanks,

Dave

Former Member
0 Kudos

what i understand is you need to change records when user changes any date.

if yes

date is an inputfield so you can use on_enter event but user have to press enter after selecting date.

if user don't want to press enter you can provide OVS search on date field in that you can use your logic for fetching data and binding it