Application Development 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: 

To get item details under the header data on same screen but not as popup or hierarchy

sandeep_reddy24
Participant
0 Kudos

Hello Experts ,

I am  displaying the header data , my client requirement is when we double click on document number as in here class '1' it should display the item details  under the header data  in the same screen as shown under Fig2.The  client doesn't want tree display. Is there a possibility to achieve this functionality?

Fig1:

class    pass    fail   

1        10        5   

2        15        0   

3        12        8   

4        13        7   

5         7        11   

Total   57       31

           

           

Fig2:

class                      pass    fail

1                             10        5

        Mathmatics       5        1

        Science            2        3

        Social               3        1

2                              15       0

3                              12       8

4                              13       7

5                               7       11

Total                         57       31

Thanks in Advance,

Sadeep J.

2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

Would he accept a simple ALV with sort and subtotal, check the SALV*DEMO* reports ?

Regards,

Raymond

Former Member
0 Kudos

Hi,

Maybe this would help, try to use Classical List.

Execute this code snippet. Maybe it would give you some idea.

TYPES: BEGIN OF ty_data,
         matnr TYPE matnr,
        END OF ty_data,

        BEGIN OF ty_line,
          matnr TYPE matnr,
          text  TYPE text10,
        END OF ty_line.

DATA: " itab with duplicates
       it_data  TYPE STANDARD TABLE OF ty_data,
       st_data  TYPE ty_data,

       it_line TYPE STANDARD TABLE OF ty_line,
       st_line TYPE ty_line.

st_data-matnr = 'material1'.
APPEND st_data TO it_data. CLEAR st_data.

st_data-matnr = 'material2'.
APPEND st_data TO it_data. CLEAR st_data.

st_line-matnr = 'material1'.
st_line-text  = 'text1'.
APPEND st_line TO it_line. CLEAR st_line.

st_line-matnr = 'material1'.
st_line-text  = 'text2'.
APPEND st_line TO it_line. CLEAR st_line.

st_line-matnr = 'material2'.
st_line-text  = 'text3'.
APPEND st_line TO it_line. CLEAR st_line.

st_line-matnr = 'material2'.
st_line-text  = 'text4'.
APPEND st_line TO it_line. CLEAR st_line.

LOOP AT it_data INTO st_data.
   WRITE:/ st_data-matnr.
*  HIDE st_data-matnr.
ENDLOOP.

AT LINE-SELECTION.

   LOOP AT it_data INTO st_data.
     WRITE:/ st_data-matnr.

     IF st_data-matnr = sy-lisel.
       LOOP AT it_line INTO st_line WHERE matnr = st_data-matnr.
         WRITE:/ st_line-text.
       ENDLOOP.
     ENDIF.
   ENDLOOP.

Regards,

Jake