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: 

transfer data from excel sheet to abap program dynamically

Former Member
0 Kudos

hi experts,

i want to enter input in excel sheet so that this input should be transfered to abap program and based on input do some

calculations and send the results back to excel sheet.

i should handle excel sheet as dynamic input and output.

please send the steps to follow and using which topic is it possible(basic abap or advanced abap)

what i know is using bdc we can transfer data from legacy system to sap r/3.

2 REPLIES 2

Former Member
0 Kudos

Hi,

You cannot purely use ABAP Coding to achieve this functionality.

But, yes now this is possible and you have to try different options. You have to do EXCEL programing to achieve the same. Once the data is populated in EXCEL you need to put a button or something that will trigger an action. And in that action you need to call any one of these which will transfer you excel data to ABAP and from ABAP back to you excel sheet. So, what I am taking here is like an external interaction and which can be achieved with any one of the following approaches :

1. Calling an RFC enabled Function Module from the EXCEL ( you can get numerous examples of VB Code calling RFC enabled ABAP FM)

2. A Web Service which you need to expose from ABAP and which can be consumed by your EXCEL.

3. You can try embedding an EXCEL in a ABAP application ( Web Dynpro or something Else ).

I guess there might be some other ways also with which you can connect to an SAP System. The BDC is an approach to transfer old legacy data from an external system to ABAP in generally in an offline mode. It is used for mass transfer of data. I don't think that this will suffice for your requirement mentioned here.

Hope this helps.

Thanks,

Samantak.

Former Member
0 Kudos

Hi,

You need to use ABAP-OLE technology.

You can enter the data in excel,

Upload data into an internal table ( you can upload excel using Function module, or use OLE )

Do calculations,

Write back the calculated values at specific cells of excel. (writing and saving excel can be done using OLE)

To learn about OLE, search SDN

Below might help you :

http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-OLE+Excel

http://wiki.sdn.sap.com/wiki/display/ABAP/Sampleprogramtoopenexcelsheetusing+OLE

Regards,

Nisha Vengal.