ALSM_EXCEL_TO_INTERNAL_TABLE
* CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
* EXPORTING
* filename = p_file
* i_begin_col = '1'
* i_begin_row = '3'
* i_end_col = '22'
* i_end_row = '99999'
* TABLES
* intern = it_excel
* EXCEPTIONS
* inconsistent_parameters = 1
* upload_ole = 2
* OTHERS = 3.
*
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ELSE.
* IF it_excel IS NOT INITIAL.
* LOOP AT it_excel INTO is_excel.
* ASSIGN COMPONENT is_excel-col OF STRUCTURE ls_final TO <fs>.
* IF sy-subrc = 0.
* <fs> = is_excel-value.
* AT END OF row.
* APPEND ls_final TO lt_final.
* CLEAR ls_final.
* ENDAT.
* ENDIF.
* ENDLOOP.
* ELSE.
* MESSAGE 'No data found'(004) TYPE 'I'.
* LEAVE TO TRANSACTION sy-tcode.
* ENDIF.
* ENDIF.
* EXPORTING
* filename = p_file
* i_begin_col = '1'
* i_begin_row = '3'
* i_end_col = '22'
* i_end_row = '99999'
* TABLES
* intern = it_excel
* EXCEPTIONS
* inconsistent_parameters = 1
* upload_ole = 2
* OTHERS = 3.
*
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* ELSE.
* IF it_excel IS NOT INITIAL.
* LOOP AT it_excel INTO is_excel.
* ASSIGN COMPONENT is_excel-col OF STRUCTURE ls_final TO <fs>.
* IF sy-subrc = 0.
* <fs> = is_excel-value.
* AT END OF row.
* APPEND ls_final TO lt_final.
* CLEAR ls_final.
* ENDAT.
* ENDIF.
* ENDLOOP.
* ELSE.
* MESSAGE 'No data found'(004) TYPE 'I'.
* LEAVE TO TRANSACTION sy-tcode.
* ENDIF.
* ENDIF.
Comments
Post a Comment