‎2009 Jun 09 2:32 PM
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
‎2009 Jun 09 2:39 PM
Hi Jeya,
Would you please clarify your problem ? because the values in internal table are independent of the layout .
‎2009 Jun 09 2:43 PM
Hi
According to the layout selection, i want to save that values in one ITAB.
‎2009 Jun 09 3:06 PM
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.