cancel
Showing results for 
Search instead for 
Did you mean: 

SAP connect to .NET

Former Member
0 Kudos
134

Hi all,

I'm trying transfer IDOCs between SAP and a .NET application using .NET connector. The logon's working and the application registers at the Gateway as well. I need clarifications on 2 aspects

1. How do I register the Pgm ID of the .NET application? (Is it required?)

2. How do I configer the destination in SAP. (RFC dest). Is it a TCP/IP Connection?

Hope to hear from you guys.

Thanks in advance

Regards,

Ananda

Accepted Solutions (1)

Accepted Solutions (1)

reiner_hille-doering
Active Contributor
0 Kudos

2. Yes, you configure a TCP/IP connection in SM59, type "Registered Application" and specify an arbitrary Program ID.

1. You pass the Program ID together with name/IP of gateway and gateway service on the constructor of the SAPIdocReceiver. I have posted the exact syntax before - I'm sure you will find it if you search a little bit in the forum.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi!

1. Go into SM59 and select the RFC target you are using(as a TCP/IP connection), the field you're seeking for is "Program ID", ok ?

2. ya, its a tcp/ip connection...your .net code gonna seems like this :

Dim idocrec as SAPIDocReceiver

idocrec = New SAPIDocReceiver("-a<program id> -g<r/3 ip> -xsapgw<system id>", host)

any doubt, contact me back.

[]'s

Andre L. Calderan

Former Member
0 Kudos

hi reiner,

Thanks a lot for ur reply. I tried it with the conn string "-aSAP_PORTAL_11 -gSAP -xsapgw11", It;s getting registered in da SAP gateway. but i couldn't find the program ID in the gatway monitor. I'm getting an error saying the program ID is nopt registered when i tested the TCP/IP connection. Here my program ID is SAP_PORTAL_11. what is da problem with it?? hope 2 hear from you.

Thanks

Ananda

reiner_hille-doering
Active Contributor
0 Kudos

On the first view ist looks correct. Some hints/questions:

- Is "SAP" the DNS-name of the one and only Application Server? If you have multiple, you need to specify the specific Gateway where your RFC-server connects to.

- Why do you think that registering at the gateway was successfull? If it was, the RFC server should appear in SMGW.

- Is sapgw11 contained in your local etc/services file?

- Is TCP port from local machine to host "SAP", port 3311 open? (Can you reach with telnet?)

Former Member
0 Kudos

hi Reiner,

Thanks 4 ur reply again. SAP is the only papl server's DNS name. I'm able 2 see the my .NET connector appl at SMGW which means the registerring was successful. SAPGW11 is found in the services file, and it's using the port 3311. My prob is I cannot see the program ID of the appl in SMGW. And I'm getting an error saying "the program IS is not registered in the gateway". What could be da reason. Thanks in advance

cheers,

Gajaruban