cancel
Showing results for 
Search instead for 
Did you mean: 

Connect SAP from MS Visual Studio

Former Member
0 Kudos

Hello,

I am working in .Net C# and I try to connect to SAP but I'm not success...

In the project which I work, there are SAPproxy's (sapwsdl) with tables, structs, ... from SAP.

Now, I need to refresh the information of tables and structs form the SAP because it's change in the last times...

Then, I go to Server Explorer, but I don't see the SAP connection !!

Then, I try to connect with SAP, with 'SAP BW OLE DB Provider' and the aplication connets to SAP Logon this it's ok, but when I try to connect with the correct user and paswords (by SAP Logon it's ok), the Visual Studio returns next error : "Test connection failed because of an error in initializing provider."

I read the error log, and saids about BAPI_MDPROVIDER_GET_INFO, that not exists...

I don't know if I explain the situation clearly... 😛 Sorry for my english !!!

Can You help me please ¿?

Thanks !

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi pepetu,

"Then, I go to Server Explorer, but I don't see the SAP connection !!!¿?!"

Can you explain more. Could not you see SAP Server or SAP Connection? If SAP Server, then you should refresh Server Explorer(right click Servers and Refresh). If you have SAP under Servers, you can create a new connection.

If not satisfied, can you give a bit more information about your problem.

Best Regards.

Huseyin Akturk.

Former Member
0 Kudos

Hi Huseyin,

Thanks for your fast reply !

I don't see the SAP Server. I try to establish connection with SAP Server with the name of the server, the url and user and password with the 'SAP BW OLE DB Provider' there apears an error of connection : "Test connection failed because of an error in initializing provider."

I refresh Server Explorer yet, but only appears my local machine...

But with the same parameters in SAP Logon works ok...!

Former Member
0 Kudos

Which version of .net connector has installed? If 2.0, you would see SAP Server under Server Explorer. If connector version is 1.0, then you should create a new proxy to update sap functions. Then, you will see the last changes.

And another question is, are you using visual studio 2005? or .net 2003?

Former Member
0 Kudos

I have 1.0 version. And I have .net 2003.

If I create a new proxy then I can see the new functions by the wizard ok ...!!!

But this is the only way for refresh it ¿?

What I do with the previous proxy ? I can delete the previous proxy ? In the new Proxy there would be all tables, functions and structs of the previous proxy ?

I think that we are near the solution...

Former Member
0 Kudos

Hi pepetu,

I have never tried but, maybe you can create two proxy and copy the proxy objects between us. But I don't think that will be helpful. I have been deleting and creating a new proxy if any changes occured in my functions or tables if I am using Connector 1.0. But, If you use Connector 2.0 updatingg operations are very easy. In Connector 2.0 you are creating a proxy and not adding function while creating. Functions are adding proxy from Server Explorer using filters. And this is do helpfull while update operations needed.

Best Regards

Huseyin Akturk

-


www.huseyinakturk.net

Former Member
0 Kudos

Hi pepetu,

how are you doing ?

when your rfc definition [parameters, structures, etc] changes, a proxy regeneration is required.

is there any specific reason that you are using the 1.0 version ?

moving to 2.0 would be simpler to get the benefits of the features of the 2.0 version.

the list is available in the development centre

https://www.sdn.sap.com/irj/sdn/developerareas/dotnet?rid=/webcontent/uuid/3ecbe347-0a01-0010-5897-d... [original link is broken]

when your rfc undergoes a change, do the following :

1> make sure the function module is activated & remote enabled on the abap side

2> go to the sapproxy page in the project

3> delete all structures & tables

4> save the project

5> add the function again [the structures are added anew]

6> modify your code which deals with the change in parameters

7> unit test, integration test & system test the changes

8> release if satisfied

with respect,

amit

Former Member
0 Kudos

Hi to EveryBody !!!

Thank you for your help, Huseyin & Amit !!!

I think you solve my problem...! I insert a new proxy and I can insert the old tables and the new tables, and it seems that all runs ok...!

I must to test it now...

I use the 1.0 version because it is the version which is used in the aplication, I don't inciate this aplication and we don't know what supose to migration to a new version... but if is so easiest that you says, i'lll propose to the client...

Thanks For All !!!!

Best Regards.

Former Member
0 Kudos

Hi pepetu,

how are you doing today ?

>>Thank you for your help, Huseyin & Amit !!!

you are most welcome, that is the objective of this forum and in time when your skill level grows, i hope you will contribute actively here as well. i have been using the forum since mid 2003, and now doing what i can to give back ...

>>I use the 1.0 version because it is the version which is used in the aplication, I >>don't inciate this aplication and we don't know what supose to migration to a >>new version... but if is so easiest that you says, i'lll propose to the client...

the developer productivity benefits are worth the effort.

it is worth the effort to upgrade small to medium projects [depends on how many you have around, i used to have quite a few of them...]

it would require you to have 2 different development environments and then you build all new applications with the newer version, and slowly phase out the old version based on the lifecycle of the application itself.

for large projects, the effort is not justiufied as the rework involved is too high, it is better to keep them in a maintainance phase, and when the time comes to upgrade, recommend a new application which interfaces to the old one using web services. so this way your functionality is maintained, and your effort goes into the newer features that you would like to build.

with respect,

amit