We need to get fieldnames which are visible in alv for a layout variant change.
Basically when we change a layout for a alv display, number of fields displayed will change. Our requirement is to read the fieldnames as per the layout variant. For that purpose use following FM created. Here you need to pass default field catalog. This default catalog will have details of maximum fields.
Assumptions: Only we are hiding fields in display and no other functionality.
The parameter fieldcat will return the field details for the changed layout. For the fields hidden it will have NO_OUT field set as 'X'. These are fields which are hidden by layout change. You can use this return fieldcatalog to create dynamic tables and then can fetch data from the main table used for alv display.
The requirement where this is useful: We are able to display data in foreground using layout variant in report. We are using 'REUSE_ALV_GRID_DISPLAY_LVC' for ALV grid display. Now in background I need to save data to file only for those fields which were displayed in foreground for that variant. In this case above FM is useful.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.