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

ALV with OOPS

Former Member
0 Likes
524

Hi ,

In ALV using OOPS, Layout (varient) also one of the input. For example, in output has 5 fields. In one layout setting just 3 as output. In that case, after getting the output as ALV, how to store 3 field values into the itab internally .

Regards,

JJP

3 REPLIES 3
Read only

Former Member
0 Likes
493

Hi Jeya,

Would you please clarify your problem ? because the values in internal table are independent of the layout .

Read only

0 Likes
493

Hi

According to the layout selection, i want to save that values in one ITAB.

Read only

MarcinPciak
Active Contributor
0 Likes
493

Hi,

I think you are mixing something up.

Internal table is the one that holds data for ALL the columns (independently of the layout). There can be also some columns which you are not intended to be displayed (but still exist in your interna table).

The layout in ALV is just graphicall representation of what you have in your internal table (not vice versa). It is just a variant of the columns you defined for ALV in fieldcatalog. One layout (variant) would display 3 columns, another one would display 5. But data in the table still are the same (for all the columns).

Regards

Marcin

OK, now I know what you mean. For this use method GET_FRONTEND_FIELDCATALOG which should return which columns are visible. Then dynamically assign data from these columns to respecive columns of your internal table.