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.
Showing results for 
Search instead for 
Did you mean: 

How upload an excel file using an LSMW.

Former Member
0 Kudos

Hi All,

I am trying to upload data from an excel file from the PC frontend using LSMW.

Can I do it? If so what are necessary steps that i have to perform before it.

I do have a header and trailer record in the flat file which should not be uploaded. How can I skip this two records.

Thanks in advance.




Former Member
0 Kudos

Hi Satish,

To extract data from an Excel document from SAP, you can use a number of approaches. I know for example, that in SEM, there is a feature called "Excel in-place", which uses the DOI technology mentioned below.

You extract data from a Excel document fairly simply using OLE2. Look up the ABAP keyword help on the keywords 'CREATE', 'SET', 'GET', 'CALL' and 'FREE' to see how to work with OLE2 objects. This requires of course, that you have Excel installed on the client machine.

Furthermore, you can use the Desktop Office Integration suite of functions provided in the repository. You can find the online help for this under SAP Library -> SAP Netweaver Components -> SAP Web Application Server -> Controls and Control Framework (BC-CI) -> Desktop Office Integration (BC-CI).

Another option which I used recently was to use the POI library from the Apache project ( to read Excel documents. You can then write a Java program to extract the data, however, you have to call the Java from somewhere (I stored it on the Application Server).

Hope this helps,


Former Member
0 Kudos

Hi Satish,

I think the best way to import the exel file from LSMW, is converting exel file in text file separated by tabs or by comas, and defining the input file in LSMW in the same way.