2011 May 27 9:51 PM
I am using ALSM_EXCEL_TO_INTERNAL_TABLE function module to upload the excel into an internal table. In case there is a column with no data. This function module is still populating the previous row data into the internal table
Ex. if the Excel has data like the below 3 rows and 3 columns
1 10 5.0
20
2 6.0
The internal table is posting data like this
1 10 5.0
1 20 5.0
2 20 6.0
Please tell me if i am missing something to be added in the below snip of code
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = B1
I_BEGIN_ROW = C1
I_END_COL = B2
I_END_ROW = C2
TABLES
INTERN = IT_upload
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC = 0.
ENDIF.
LOOP AT IT_upload.
CASE IT_Upload-COL.
WHEN 1.
IT_Excel-BILLCO = IT_Upload-VALUE.
WHEN 2.
IT_Excel-PONUM = IT_Upload-VALUE.
WHEN 3.
CLEAR v_upload.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = IT_upload-value
IMPORTING
OUTPUT = v_upload.
IT_Excel-STORENUM = v_upload.
WHEN 4.
IT_Excel-VINVNUM = IT_Upload-VALUE.
WHEN 5.
IT_Excel-LINEITNUM = IT_Upload-VALUE.
WHEN 6.
IT_Excel-LINEITAMT = IT_upload-VALUE.
WHEN 7.
IT_Excel-TAXAMT = IT_upload-VALUE.
WHEN 8.
IT_Excel-TOTAL = IT_upload-VALUE.
ENDCASE.
AT END OF ROW.
APPEND IT_Excel.
ENDAT.
ENDLOOP.
2011 May 28 1:25 PM
Hi,
Please check below link. surely it will help u.
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=60655105
Thanks
Jitendra
2011 May 27 10:33 PM
2011 May 28 6:33 AM
Hi,
Clear IT_EXCEL after append the records. see the below code
AT END OF ROW.
APPEND IT_Excel.
clear it_excel.
ENDAT.
Regards,
Dhina..
2011 May 28 1:25 PM
Hi,
Please check below link. surely it will help u.
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=60655105
Thanks
Jitendra
2011 Jun 01 3:59 PM
Thanks! Appreciate your help
Edited by: kiransap123 on Jun 1, 2011 4:59 PM
2011 Jun 01 7:16 PM
2011 Jun 01 7:34 PM
I don't see the points flag displaying for this post. Please advice how to give points