Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading data from Excel into data dictionary

Former Member
0 Kudos

Hi all,

I am new to ABAP. I have a huge excel spreadsheet and I want to develop some graphs and reports using ABAP ALVs. I want to know if I can import an excel spreadsheet into data dictionary, create a table and then develop an ALV report.

Plz let me know.

Thank you.

Krish.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

There is no straight forward of uploading the data into data dicitonary from a file. You will have to write a custom program where in you upload the file into a internal table (Do validations if required) and then finally save the data into the table. You can use GUI_UPLOAD function with DAT as the file type to upload the file into the internal table.

Then you can display the data in a ALV grid and then you can have the data display in terms of the Graphs.

Regards,

Ravi

Note : Please mark all the helpful answers

4 REPLIES 4

Former Member
0 Kudos

Hi,

There is no straight forward of uploading the data into data dicitonary from a file. You will have to write a custom program where in you upload the file into a internal table (Do validations if required) and then finally save the data into the table. You can use GUI_UPLOAD function with DAT as the file type to upload the file into the internal table.

Then you can display the data in a ALV grid and then you can have the data display in terms of the Graphs.

Regards,

Ravi

Note : Please mark all the helpful answers

Manohar2u
Active Contributor
0 Kudos

Refer to this sample code

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36f08758-0a01-0010-c291-c03004aeb1af">Function Module To Upload Data From</a>

or

Use ALSM_EXCEL_TO_INTERNAL_TABLE function module to upload.

Example programs added

http://www.sapdevelopment.co.uk/file/file_upexcel.htm

Regds

Manohar

Message was edited by: Manohar Reddy

Former Member
0 Kudos

Hi Krishna

Firstly You have to declare internal table of same structure as of data in excel file. Then you can use the function 'WS_UPLOAD' to upload data into internal table. Then you should use SQL Query to insert data into the desired table. If Halpful Give Points.

former_member223537
Active Contributor
0 Kudos

Hi,

Yes this is possible, but you dont have to upload the data to data dictionary. You can upload the data into internal table from excel file and then use that internal table data to display in ALV.

Use FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the data. Specify the number of rows and columns you have in the excel sheet(row and columns to be uploaded). Specify whether your file has a header on Row 1.

Then you will get data into an internal table.

Prepare a field catalog for ALV and pass this internal table to ALV.

If you need any additional information, then please let us know.

Best regards,

Prashant