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 Excel file to SAP

Former Member
0 Kudos

Hello Experts,

My requirement is to upload excel file to SAP.

I don't want to copy the data of excel file to my internal table instead I want to upload excel file to SAP.

Is it possible,if yes, How?

Please help.

1 ACCEPTED SOLUTION

former_member212002
Active Contributor
0 Kudos

Follow the steps below:

1 ) Go to transaction OAOR

2 ) Give Classname as sofficeintegration and class type as OT

3 ) Select Table temple from the create option ( located at the bottom of tcode, labelled under select a document type or

application).

4 ) Right Click on Table Template and click on Import File

5 ) Locate the file you want to upload

6) Give the description and press OK

7 ) Your Document is uploaded into SAP, you can find the same in SOFFICEINTEGRATION->TABLETEMPLATE->(your file name).

the above path is located in the upper part of the tcode.

This technology is known as the BDS( Business Document Services)

Hope this helps

Regards

Mishra

13 REPLIES 13

former_member182041
Active Contributor
0 Kudos

Hey,

Do let me know in case you find this direct solution.

Currently we need PI/XI team to upload the data from application server to a particular shared folder in excel format.

Regards,

Kumud

former_member201275
Active Contributor
0 Kudos

Transaction CG3Z. I think you can upload CSV files but not XLS.

Former Member
0 Kudos

So, after you upload that file (with GUI_UPLOAD, perhaps) what are you going to do with it if you don't want it put into an internal table? If you're not going to use the data in SAP, there's no need to upload the file. On the other hand, Excel and perahps Open Office and a few other desktop spreadsheets might recognize the data in Excel file. That's certainly not in a format that SAP can utilize.

0 Kudos

Hello,

@ Davel: The client needs the excel file upload for the reference purpose. In some particular scenarios client wants to upload some data file to refer it in future.

@Gemini: I am able to upload the file through this transaction but How to perform reverse of it i.e how to download it from SAP.

0 Kudos

CG3Y is the reverse.

former_member212002
Active Contributor
0 Kudos

Follow the steps below:

1 ) Go to transaction OAOR

2 ) Give Classname as sofficeintegration and class type as OT

3 ) Select Table temple from the create option ( located at the bottom of tcode, labelled under select a document type or

application).

4 ) Right Click on Table Template and click on Import File

5 ) Locate the file you want to upload

6) Give the description and press OK

7 ) Your Document is uploaded into SAP, you can find the same in SOFFICEINTEGRATION->TABLETEMPLATE->(your file name).

the above path is located in the upper part of the tcode.

This technology is known as the BDS( Business Document Services)

Hope this helps

Regards

Mishra

0 Kudos

Hi,

@abhinab: I need this functionality involved in my ABAP report.

So can you please tell how to make this functionality(upload and download) through ABAP code.

0 Kudos

Hi shubh,

here is [Playing with SAP Business Document Service|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5931] [original link is broken] [original link is broken] [original link is broken];. What else do you need?

Regards,

Clemens

0 Kudos

Here you can find both uploading the excel as well playing with the same [BDS|http://wiki.sdn.sap.com/wiki/display/ABAP/HandlingDatainExcelIn-placeDisplayUsing+BDS]

Regards

Mishra

Former Member
0 Kudos

solved.

Thank you all.

0 Kudos

Hi shubh_ag,

a comment like "Solved" is useless and in a way ruthless. Imagine other people have the same or similar problem you have. They are interested what is a working solution.

So please let us know what solved your problem.

Regards

Clemens

0 Kudos

Hello Clemens,

Everything is well discussed in the thread so I had not discussed the solution previously.

anyways, I had called the transaction CG3Y and CG3Z from within my code along with internal table of type BDCDATA.

In my case the problem with OAOR is that for downloading the file end user himself has to select the file from amoung various files so security issue is the concern.

0 Kudos

Hi shubh_ag,

sorry I did not follow this thread very close.

By the way, to whom it may concern: I remember a project where a colleague created a 'template handling' class that allowed to store, retrieve and create versions of almost any kind of file - preferredly used for excel files used for special reports. He used the SAP business document services (which is used inside OAER and others). We used class methods

cl_gui_frontend_services=>file_open_dialog
cl_bds_document_set=>create_with_files
cl_bds_document_set=>create_version_with_files
cl_bds_document_set=>get_info
cl_bds_document_set=>get_info_newest_only
cl_bds_document_set=>get_with_files

and

FUNCTION 'BDS_BUSINESSDOCUMENT_GET_URL'
FUNCTION '/SAPDMC/LSM_PATH_FILE_SPLIT'
FUNCTION 'SKWF_MIMETYPE_OF_FILE_GET'

and interface

I_OI_OLE_CONTAINER_CONTROL 
I_OI_DOCUMENT_PROXY

for desktop office integration document display

This was kind of a small document handling system integrated in an own user class object that could be integrated in anyone's program.

cl_bds_document_set is comparably easy to integrate but extremely powerful tool - warmly recommended.

Regards

Clemens