cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for .NET - Samples

0 Kudos

Hello,

can anyone give me an URL where I can find the Samples shipped .NET-Connector V 2.0. I'm not able in the moment to install the .NET-Connector-Wizard in case I work with VS 2005 and can't install the VS 2003. I could only install the Runtime of SAP-Connector and it works for me with Simple Types and Structures.

I need working samples for :

- a SAP-Proxy which calls a function that returns a table,

- a SAP-Server that provides functions for RFC-calls from SAP.

If you can, than please provide the sample(s) in VB.NET but C#.NET will also be OK for me.

If someone needs code to work as a client with SAP and return Structures or Simple Types can ask me here or by mail. I have such code available for VS 2005 VB.NET.

Regards

Holger

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

I got samples from the staff of a related company.

Former Member
0 Kudos

Holger Boskugel

I try to connect RFC SERVER and i have a problem like your detail

Can you point me how do you solved your problem ?

0 Kudos

I will do so, if I have made the test. May be it will happen next week.

Regards

Holger

Former Member
0 Kudos

RFC SERVER STUB HOWTO

for dotnet connector for vs2003 it as same as generate proxy client the difference is checked box server stub (not proxy client.

for dotnet connector 2.0 does anyone share to me how to generate rfc server stub

Regards,

Zemon

0 Kudos

Hello Zemon,

If you can generate the Server in 2003 than use the code in 2005 and add the reference to SAP-Connector, thats all. Handwritten you have to do the following steps :

- Create Server class (Inherits SAPServer)

- Place a method like in the SAPClient with the same RFC and XML attributes

- Create an SAPServerHost instance

- Create several instances from your Server class

- Add the Server instances to the SAPServerHost

- Start the SAPServerHost

To connect SAP system and your SAPServer, create an <b>TCP/IP SAP destination with the SM59 transaction</b>. Set ProgramID, Gateway-Host and Gateway-Service. Your servers than should be instanced with the following connection string or something equal (argument array etc.) :

<b>"-a<ProgramID> -g<Gateway-Host> -x<Gateway-Service>"</b>

That's all. My Test-Server(host) is now working very well.

Regards

Holger

<i>Comment :</i>

I don't know why the SAP-Connector Wizard generates the Server code as "MustInherit". There is no need to do this. A complete host can be written in a single ! class (with a static/shared sub Main).

Former Member
0 Kudos

Hi,

Can you look at the directory : programfiles\sap\connector\samples.

But, I am not sure you can get samples because of not install wizard.

0 Kudos

Hello Huseyin,

I can't get the this samples w/o installing the SAP-Connector-Wizard. That's why I'm looking for an alternate location where I can download only the samples.

Regards

Holger

0 Kudos

Hello in the round,

now I got a working "Table" sample, so that I'm only need a sample for a "Server" implementation.

Regards

Holger

Former Member
0 Kudos

Hi Holger, any ABAP function can be used throw RFC setting its property "Remote-Enabled Module" to true.

You can find this property on SAP GUI, type "SE37" transaction (Function Builder), create or edit any ABAP function, see its Attributes and then its Processing Type.

Hope this helps.

Regards.

0 Kudos

Sorry Daniel,

it doesn't help. A "real" VB.NET sample or C#.NET sample would help. The other on the SAP side is most clear.

Regards

Holger

Former Member
0 Kudos

Hi,

Please check the bellow URL, It contains some sample .Net code that allow the application to connect SAP system and it also contains usefull links to download SAP .Net Connector.

http://www.codeproject.com/dotnet/SapDBReader.asp?df=100&forumid=25000&exp=0&select=1387391

Best Regards,

Sareesh

0 Kudos

Hello Sareesh,

thank you for your response, but I know this article well. All my knowledge how to communicate with SAP-Connector comes from this sample. That's why I got simple types, structures and tables working as an SAP-Client. But I haven't found any sample for an SAP-Server on .NET base. May be there are only the samples available together with the SAP-Connector wizard, but this don't run under VS 2005 environment. It's a pitty, that SAP don't provide open samples. Especially in case that they know the wizard is not running under VS 2005, but SAP-Connector can be installed and used. I hope someone of the SAP will answer who knows how to build and connect an SAP-Server with SAP-Connector to an SAP-System.

Regards

Holger

Former Member
0 Kudos

Hi Holger,

1. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2e8cbd30-0601-0010-bfbd-a04e6757ac23">Link 1</a>

2. <a href="http://help.sap.com/saphelp_nw04/helpdata/en/9e/7b562de2cce14da8bb5af01c73de0b/content.htm">Link 2</a>

Please refer this for link 2.

Hope it helps.

Regards,

Maheswaran.B

Message was edited by:

Maheswaran B

0 Kudos

Hello Maheswaran,

I know this links, but for link1 - I don't use the PDK and for link2 - I know this part of documentation but the sample code it self is not linked (as a ZIP archive or what ever). So you need the full installation of SAP Connector.NET which can not happen under VS 2005 actually.

Regards

Holger

0 Kudos

So the thread is now "closed". I got a good understanding server sample and also the connection parameters. I will try this next week.

Regards

Holger