Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have been going through lots of articles about the "best way to connect .Net based applications with SAP as the backend". Most of the articles suggest to use SAP .Net connector My team is already using sap .net connector.

What are the other ways in which I can connect to SAP without using the .net connector. anything OOB in VS2013?
Posted
Comments
Ron Beyer 16-Jan-14 15:16pm    
What is the problem with the .NET SAP connector?
Raghav_Shankar 16-Jan-14 16:08pm    
Not that it has any problem...we have plans to upgrade and evaluating the new technologies..so was wondering if we could achieve it other than .net connector. like example I see we could achieve it through WCF LOB adaptors. I have not seen much of examples related..So is there a better way to do. It helps me in comparison.

1 solution

First Method:
Use SAP .Net Connector.
You can create BAPIs in SAP.
You can use RFC [via the .net connector] to connect to the BAPI and fetch/send data to/from SAP.

Second Method:[.NET Connector is not required in this method]
Create BAPIs in SAP for the requirement. Use the BAPIs to push the data as XML file.
Write a Service to pick the file and transfer the data to your local database.
Then use the same in your application to do further transaction.

In both the cases the primary Database will be SAP. Our Local DB will be used only for parking the data temporarily. The transactions once completed will be sent either as XML file where another SAP Service will pick it up and update the SAP DB or will be sent to BAPI directly using RFC.

Hope this Helps!!

Regards
Dinesh Kumar.V.
 
Share this answer
 
Comments
Raghav_Shankar 17-Jan-14 19:56pm    
Hi Dinesh,

Thanks for the details. The current implementation is first method. We have RFCs to deal the data for to/from SAP. I am interested to know more about your second suggestion. Could you please explain more about that service? Any examples or links which tells about this.
Dinesh.V.Kumar 20-Jan-14 1:57am    
Hi Raghav_Shankar,

Firstly, sorry for the delayed response!!!

I have deployed projects using both the methods.
You can transfer files in 2 ways from XML files.
Using windows service:
1) Create a service.
2) Use FileWatcher component available. This one watches the folder you specify for any files moved in to the folder.
3) If its xml files. Convert the xml to a datatable and insert the records one by one to the table.
http://www.codeproject.com/Articles/18521/How-to-implement-a-simple-filewatcher-Windows-serv

You can find the examples for the above in google/stackoverflow/codeproject.

Alternately :
Using windows service:
1) Create a service.
2) Use Timer component available. You can program to execute the code every <1>[configurable] minute. Check if the file is available in the folder. If its available, process as in Step 3.
3) If its xml files. Convert the xml to a datatable and insert the records one by one to the table.

You can also find the examples for the above in google/stackoverflow/codeproject.
The above two methods work well only with less amount of data.
If the data in xml files are huge, its advisable to use SSIS.

http://www.codeproject.com/Articles/173918/How-to-Create-your-First-SQL-Server-Integration-Se

Note: Pardon me if you are aware of SSIS already.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900