FM for Downloading ABAP List to Excel
CALL FUNCTION 'LIST_DOWNLOAD' EXPORTING LIST_INDEX = '0' "SLIST_INDEX_DEFAULT method = 'DAT' EXCEPTIONS list_download_error = 1 OTHERS = 2 . IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.