Skip to Content
0
Former Member
Nov 19, 2008 at 10:17 AM

Doubt in FM - 'ALSM_EXCEL_TO_INTERNAL_TABLE'

29 Views

Hi ,

I am using the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' to upload a excel sheet.

The Excel sheet has a header line also.

The excel sheet may contain no data for few of the fields.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = P_FILE

I_BEGIN_COL = 1

I_BEGIN_ROW = 1

I_END_COL = 60

I_END_ROW = 100

TABLES

INTERN = I_DATA

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.

ENDIF.

if there is no data in that particular column , the internal table doesnt have the info for that particular field.

For ex. if ROW 1 ,COL 3 doesnt contain data :

I_DATA-ROW = '001'.

I_DATA-COL = '001'.

I_DATA-ROW = '001'.

I_DATA-COL = '002'.

I_DATA-ROW = '001'.

I_DATA-COL = '004'.

But i need that column also included in the internal table.

How to do this.

Vikki,