05-09-2023 5:45 AM
Hello All,
Requirement: Need to download an excel to local machine(to my computer) and fields should be there same as variant selected.
I have tried to download ALV to excel based on variant selected. But couldn't get any expected output, I have used CALL FUNCTION 'LT_FC_LOAD' and ALV_IMPORT_FROM_BUFFER_LVC (or ALV_IMPORT_FROM_BUFFER_KKBLO) but still couldn't get any selected layout. Selection screen has been attached here, where variant is passing in Layout selection.
05-09-2023 6:24 AM
Did you try to use class cl_salv_bs_runtime_info to prevent display of alv grid and get data (internal table data) and metadata (layout, field catalog, sort, filter criteria) back to your wrapper progam.
05-09-2023 6:49 AM
To download ALV to Excel based on a variant, you can follow these steps:
Execute the ALV report in the SAP system.
In the ALV display, select the variant you want to download to Excel.
Click on the "Download" button from the ALV toolbar.
In the "Download" dialog box, select the "Spreadsheet" option.
In the "Spreadsheet" dialog box, select the appropriate download format (e.g., Excel).
Select the "Variant" option and select the variant that you want to use for the download.
Click on the "Download" button.
This will download the ALV report to Excel based on the variant you have selected. You can then save the Excel file to your local system for further analysis or sharing.
Regards,
Rachel Gomez
05-09-2023 9:29 AM
Hi Rachel,
Thanks for replay, we are not expecting traditional way to download ALV to excel. We are expecting in direct execution to download excel with respect to columns in VARIANT saved
05-09-2023 8:07 AM
I guess one important information is that you don't want to display the ALV and the download must be done immediately after pressing the EXECUTE button?