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

Grid display using REUSE_ALV_GRID_DISPLAY

Former Member
0 Likes
852

Hi all,

Is there a possibility of using 2 internal tables to populate the field catalogue.

Thanks in advance,

Neela

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
815

Hi,

Here i am giving small example flow logic.

consider that ur having...

Itab1 with 3 fileds contains information of 5 records.

Itab2 with 2 fileds contains information of 5 records related to itab1 information.

Now u have to display this two itab1 & itab 2 together in ALV.

Now just declare another itab3 with including structure of itab1 & itab2.


data: begin of sturcture itab3 occurs 0,
            include structre itab1,
            include structre itab2,
         end of structure itab3.


Now you do
loop at iab1.
 read itab2 with key fields of itab1.
MOVE CORRESPOINDING FIELDS OF ITAB1 TO ITAB3.
MOVE CORRESPOINDING FILEDS OF ITAB2 TO ITAB3.
APPEND ITAB3.
clear itab1, itab2, itab3.    "work areas.
endloop.

I hope this logic will solve your problem.

Regards,

Shankar.

Hi all,

Is there a possibility of using 2 internal tables to populate the field catalogue.

Thanks in advance,

Neela

8 REPLIES 8
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
815

And why do you need this ?

Read only

Former Member
0 Likes
815

Hi Suhas,

The requirement is that the pl account needs to be displayed in a grid or list depending upon the selection of multiple profit centers. The display must be in different pages for different profit centers

Thanks in advance,

Neela

Read only

Former Member
0 Likes
815

hi ,

if one profin center is selected then create one field cat and display it and if anotheer profit center is selected then create another field cat and display it. since at one time onlyy one profit center will be selected and only one display(either grid or list) will be displayed.

hope this will help you.

Thanks

Tanmaya

Read only

Former Member
0 Likes
815

Hi,

But the requirement is that we have the profit center has select option so multiple profit centers are selected at one time.

Thanks in advance,

Neela

Read only

Former Member
0 Likes
815

Hi all,

Thanks for the valuable suggestions..Resolved the issue.

Regards,

Neela

Read only

rainer_hbenthal
Active Contributor
0 Likes
815

All Values need to be in one table and there is only one fieldcatalog. If you need two or more different ALVs on one screen you can not use the FM, you need to go to dialog programming creating two container (or even more).

Read only

Former Member
0 Likes
815

Anyways if they are to be displayed one at a time.... You can populate internal table for field catalog based on the condition and then display ....

Use two different names and populate whichever required

Regards,

Lalit MOhan Gupta

Read only

Former Member
0 Likes
816

Hi,

Here i am giving small example flow logic.

consider that ur having...

Itab1 with 3 fileds contains information of 5 records.

Itab2 with 2 fileds contains information of 5 records related to itab1 information.

Now u have to display this two itab1 & itab 2 together in ALV.

Now just declare another itab3 with including structure of itab1 & itab2.


data: begin of sturcture itab3 occurs 0,
            include structre itab1,
            include structre itab2,
         end of structure itab3.


Now you do
loop at iab1.
 read itab2 with key fields of itab1.
MOVE CORRESPOINDING FIELDS OF ITAB1 TO ITAB3.
MOVE CORRESPOINDING FILEDS OF ITAB2 TO ITAB3.
APPEND ITAB3.
clear itab1, itab2, itab3.    "work areas.
endloop.

I hope this logic will solve your problem.

Regards,

Shankar.