Quantcast
Channel: SCN : Discussion List - Interoperability .NET
Viewing all 68 articles
Browse latest View live

Non ABAP RFC Client not supported.

$
0
0

I've got the following error within my tRFC Server Integration.

 

"RfcServerError occured in RFC server: xxxx RFC Caller System ID: yyyy function Name: ARFC_DEST_SHIPError type: RfcUnsupportedPartnerExceptionError message: Non ABAP RFC Client not supported."

 

According to the Forum the Change from "NON-Unicode" to "Unicode" or vice versa in SAP in Settings of relevant Program-ID takes no affect.


WSAENOBUFS: No buffer space available

$
0
0

Hi to all

 

I need youradviseplease

 

We have EWM system connected to external system withsqlserver and .net connector

Nowevrytime we have themicrosoftevent 4227

 

 

TCP/IP failed to establish an outgoing connection because the selected local endpoint was recently used to connect to the same remote endpoint. This error typically occurs when outgoing connections are opened and closed at a high rate, causing all available local ports to be used and forcing TCP/IP to reuse a local port for an outgoing connection. To minimize the risk of data corruption, the TCP/IP standard requires a minimum time period to elapse between successive connections from a given local endpoint to a given remote endpoint.

 

 

andin the logs of the .net connector I have the error

 

 

2015-11-08 16:29:48.879 [Thread 4] RfcDestination.GetClient threw RfcCommunicationException:

LOCATION    CPIC (TCP/IP) on local host with Unicode

ERROR       internal error

TIME        Sun Nov 08 16:29:48 2015

RELEASE     721

COMPONENT   NI (network interface)

VERSION     40

RC          -1

MODULE      nixxi.cpp

LINE        2896

DETAIL      NiIConnectSocket

SYSTEM CALLconnect

ERRNO       10055

ERRNO TEXT  WSAENOBUFS: No buffer space available

 

 

I openedincidentto sap andmicrosoftand all therecommendationdidn't help me. (changeparameter of the registry MaxUserPort,  TcpTimedWaitDelay)

 

 

wetry to upgrade the .net connector to version 3.0.16 but it didn't help

 

 

I need youradvise.

Maybeitsa problem in the configuration of the .net connector

PoolSize>50</PoolSize>

   <PeakConnectionsLimit>100</PeakConnectionsLimit>

   <ConnectionIdleTimeout>150</ConnectionIdleTimeout>

   <IdleCheckTime>60</IdleCheckTime>

 

maybeit'sproblemin the code weusingin the .net connector

 

 

doyou have any idea?

 

 

 

 

Thanks

naor

Question on working with tRFC or qRFC with windows client app

$
0
0

I have the following requirement: "Create a document and classify a document and update state".

 

I startet with the following BAPIs:

 

  • RfcSessionManager.BeginContext(this.Destination);
  • CVAPI_DOC_CREATE
  • BAPI_TRANSACTION_COMMIT
  • RfcSessionManager.EndContext(this.Destination);

          => Document is created


  • RfcSessionManager.BeginContext(this.Destination);
  • BAPI_OBJCL_CREATE
  • BAPI_TRANSACTION_COMMIT
  • RfcSessionManager.EndContext(this.Destination);

          => Document is classified

 

  • RfcSessionManager.EndContext(this.Destination);
  • CVAPI_DOC_CHANGE
  • BAPI_TRANSACTION_COMMIT
  • RfcSessionManager.EndContext(this.Destination);

          => Document status is changed


This works generally but I now wanted to make it more transaction-save (i.e. if the classification cannot be performed (because of wrong parameters entered by the user), the creation of the document should be rolled back also.

In this scenario, I analysed the return messages of the specific BAPIs which returned "E" and informed the user.


So I added the three BAPIs to a transaction like this:


RfcTransaction transaction = newRfcTransaction("testQueue");

RfcTID tid = transaction.Tid;

transaction.AddFunction(CVAPI_DOC_CREATE);

transaction.AddFunction(BAPI_OBJCL_CREATE);

transaction.AddFunction(CVAPI_DOC_CHANGE);

transaction.Commit(this.Destination);


The commit doesn't fail (no exception) but also not classification is created. The document is in the desired state so it seems that the 1st and 3rd BAPI were successfully executed.

I then tried to provoke an error in the 3rd call (updating to unknown status) which obivously led to complete rollback: no document was created but the commit still didn't fail.

UPDATE: Didn't check correctly

The commit doesn't fail (no exception) but the document stays in the first state so it seems only the first BAPI is commited and the following ones are ignored.


UPDATE2:

If I add a BAPI_TRANSACTION_COMMIT after each BAPI-CALL, the document is in the desired state but no classification created:

RfcTransaction transaction = newRfcTransaction("testQueue");

RfcTID tid = transaction.Tid;

transaction.AddFunction(CVAPI_DOC_CREATE);

transaction.AddFunction(BAPI_TRANSACTION_COMMIT);

transaction.AddFunction(BAPI_OBJCL_CREATE);

transaction.AddFunction(BAPI_TRANSACTION_COMMIT);

transaction.AddFunction(CVAPI_DOC_CHANGE);

transaction.AddFunction(BAPI_TRANSACTION_COMMIT);

transaction.Commit(this.Destination);


Is there a way to get information on client side (via NCO) if the operation was really successful i.e. the complete transaction was processed without error?

If there are errors (ie return = "E") how can the messages be retrieved in such a case?


Any help would be greatly appreciated!



 

Message was edited by: Tobias Buhl

ERROR: handshake with saprouter

$
0
0

Hi,

 

I run into a strange problem with .net Connector version:

SAP Connector for Microsoft .NET 3.0.16.0 for Windows 64bit (x64)

 

The connector should establish a connection through an SAP Router with password and returned this error message:

 

2015-11-23 10:38:57.526 RfcConnectionPool.GetPool threw RfcCommunicationException:

LOCATION    SAP-Gateway on host develop.sap.topimagesystems.com / sapgw00

ERROR       handshake with saprouter

            (/H/w.x.y.z/S/3299/W/x§xxxxx/H/192.168.s.t) failed

            (NIECONN_BROKEN)

TIME        Mon Nov 23 10:35:53 2015

RELEASE     742

COMPONENT   NI (network interface)

VERSION     40

RC          -6

MODULE      /bas/742_REL/src/base/ni/nixxi.cpp

LINE        5129

DETAIL      NiIRead: P=w.x.y.z:3299; L=192.168.s.t:41599

SYSTEM CALL recv

COUNTER     11

--- see log for details

 

The error can be reproduced with the example program from Tutorial:

 

I entered the destination ("2 Add Or Change Destination") as follow and the error comes up with "4 Ping Destination".

 

Name: test

User: myuser

Password: abc123

Client: 800

AS/MS Host: /H/w.x.y.z/S/3299/W/x§xxxxx/H/192.168.s.t

System Nr/ID: 00

Trace: 3

 

After playing a little bit around, I fixed the problem by replacing the '§' in SAP Router password with '$'.

The connection string /H/w.x.y.z/S/3299/W/x$xxxxx/H/192.168.s.t works fine.

 

The ugly thing is, SAP Logon accepted the "x§xxxxx" in password and connected without problem and Visual Basic components (wdtfuncs.ocx, SAP.Functions) work without problem with '§' in password. JCO not yet tested.

Mapping printers from external application

$
0
0

Dear Sir or Madam,

 

we have a solution for managing printers in our client's environment.

 

We now want to expand our abilities to pushing these printer connections from our application into their SAP systems.

 

Is there a way to accomplish this task using the sap .net connector?

 

If not, what would be the appropriate approach to accomplishing this task?

 

Thanks in advance for your assistance.

PARAMETER I_MGEIG of FUNCTION ZSL_QMFM_003 (SETTER): cannot convert Decimal into BCD[7:3]

$
0
0

I am trying to call the SAP RFC ZSL_QMFM_003 remotely using SAP .NET Connector 3.0.16

When set the values get exception

PARAMETER I_MGEIG of FUNCTION ZSL_QMFM_003 (SETTER): cannot convert Decimal into BCD[7:3]
Cannot convert 123456789112.333 into a BCD: maximal integer length (10) is exceeded
//ZSL_QMFM_003
decimal qty = 123456789112.333M;
func.SetValue("I_MGFRD", qty);  //I_MGFRD   type:   MGFRD   Data Type:  QUAN  Length:  13   Decimal Places:  3

the integer length of value "I_MGEIG" is 13,but use SetValue() input more than 10 ,get the exception.How  to solve this?

How to set new table to exporting parameter?

$
0
0

I'm using the RFC RSDRI_INFOPROV_READ_RFC to read some data from DATACUBES.

Question is, I need to pass a custom table to the E_T_RFCDATA parameter, but I'm getting some error messages.

 

My code is:

 

IRfcFunction funcaoRT = repo.CreateFunction("RSDRI_INFOPROV_READ_RFC");

 

funcaoRT.SetValue("I_INFOPROV", "/CPMB/Z0IMVWV");

 

RfcStructureMetadata strucmetadata =newRfcStructureMetadata("RSDRI_S_RFCDATA");

strucmetadata.AddField(newRfcFieldMetadata("P_CONTA", RfcDataType.CHAR, 32, 32, 32, 32));

strucmetadata.AddField(newRfcFieldMetadata("CENTROCUSTO", RfcDataType.CHAR, 32, 32, 32, 32));

strucmetadata.AddField(newRfcFieldMetadata("VALOR", RfcDataType.CHAR, 32, 32, 32, 32));

 

RfcTableMetadata metadata =newRfcTableMetadata("RSDRI_T_RFCDATA", strucmetadata);

var export = metadata.CreateTable(500);

 

funcaoRT.SetValue("E_T_RFCDATA", export); ERROR HERE

 

var t = funcaoRT.GetTable("I_T_SFC");

 

t.Append();

t.SetValue("CHANM", "/CPMB/Z0DRB3Y");

t.SetValue("CHAALIAS", "P_CONTA");

 

var t3 = funcaoRT.GetTable("I_T_SFC");

 

t3.Append();

t3.SetValue("CHANM", "/CPMB/Z0DRB3Y__/CPMB/Z0PDBCY");

t3.SetValue("CHAALIAS", "CENTROCUSTO");

 

 

var t4 = funcaoRT.GetTable("I_T_SFK");

 

t4.Append();

t4.SetValue("KYFNM", "/CPMB/SDATA");

t4.SetValue("KYFALIAS", "VALOR");

 

 

funcaoRT.Invoke(meurfc);

 

The exception is:

 

{"Cannot convert TABLE RSDRI_T_RFCDATA [STRUCTURE RSDRI_S_RFCDATA] (from custom repository) into TABLE RSDRI_T_RFCDATA [STRUCTURE RSDRI_S_RFCDATA] (from BWD repository)"}

RfcCustomDestination stays logged in

$
0
0

Hi there.  We have a number of Web Applications that perform basic read-only RFC calls to SAP through the .NET Connector using a basic system user login created specifically for our web apps.  Occassionally, however, we create CustomDestinations using SSO to perform various write RFC functions using the actual user's SAP login.

 

This works great.  However, I am noticing in T-Code AL08 which shows all users logged on that the Custom Destinations persist.  Should we dispose of these somehow in our .NET code?  Is there a safe way of disposing of the Custom Destination after it is no longer needed?

 

For example, should I use the Shutdown() method after the Custom Destination is finished invoking the SSO RFC? Or RemoveDestination() possibly?

 

Thanks!


NCo 3 method to unregister destination connection

$
0
0

Question: How do I release/unregister/delete/destroy a connection created by the RfcDestinationManager.GetDestination(RfcConfigParameters) function call?

 

I use the SAP NCo 3 inside of a Visual Studio WCF project hosted in IIS.  We wanted each user's actions to be recorded as themselves inside of SAP, so we avoided using the RfcDestinationManager.RegisterDestinationConfiguration function.  Instead we're using the GetDestination function so we can pass the RfcConfigParameters (including the user's name and password).  That part works fine.  We can even reuse the destination by using the TryGetDestination function so they don't need to wait while it reauthenticates.  What I'm having a problem with is that it appears there's no way to explicitly close/release the destination in a manner similar to the RfcDestinationManager.UnregisterDestinationConfiguration.  We can use the RfcDestinationMonitor to list all the destinations that have been created along with the destination name (which in our implementation also includes the user's name) and the LastActivityTimestamp, but we need a way to close some or all of the connections if needed.  We can stop/restart the web site and IIS Application Pool, but that would affect all of our users and feels very heavy-handed.

NCO 3 Connection Pool Issue

$
0
0

Hello everybody!

 

I'm calling a RFC using the nco 3.0, but I'm having a problem with the amount of connections when testing concurrent calls.

 

I am using the following parameters regarding the pool size and connection limit in the destination configuration:

 

parms.Add(RfcConfigParameters.PoolSize, "5");
parms.Add(RfcConfigParameters.PeakConnectionsLimit, "20");                        

My problem is that if, for instance, I have 10 threads calling a RFC at the same time from the same server and with the same user, for some reason I would like to know, only 2 of those requests are executed at a time. Also if I check the SM04 transaction, I see 3 rows corresponding to the user and server I'm using to call the RFC with nco.

 

So, to me it looks like those parameters are not having any effect at all, and even the default value of 10 for those parameters is not working.

 

What am I missing? Need some light in my way! :-)

 

Thanks in advance.

Nco 3.0 has problem calling function BAPI_USER_GET_DETAIL

$
0
0

Hi all,

 

I'm trying to create program using NCo 3.0. I am able to call function modules, except this particular BAPI_USER_GET_DETAIL. I have to call it few times in order to get the results. Most of time it gives the following error. Strangely, I have no problem calling other funtional modules like BAPI_USER_EXISTENCE_CHECK etc.

 

 

SAP.Middleware.Connector.RfcInvalidStateException: Lookup of function BAPI_USER_GET_DETAIL metadata failed for destination NCO_TESTS

---> SAP.Middleware.Connector.RfcInvalidStateException: Lookup of StructureOrTable BAPIAGR metadata failed for destination NCO_TESTS

---> SAP.Middleware.Connector.RfcCommunicationException: destination NCO_TESTS failed when calling DDIF_FIELDINFO_GET -- see log for details

   at SAP.Middleware.Connector.RfcRepository.Execute(RfcFunction function)

   at SAP.Middleware.Connector.RfcRepository.LookupRecordMetadataClassic(String name, RecordType recordType)

   --- End of inner exception stack trace ---

   at SAP.Middleware.Connector.RfcRepository.LookupRecordMetadataClassic(String name, RecordType recordType)

   at SAP.Middleware.Connector.RfcRepository.LookupRecordMetadata(String name, RecordType recordType)

   at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)

   --- End of inner exception stack trace ---

   at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadataClassic(String name)

   at SAP.Middleware.Connector.RfcRepository.LookupFunctionMetadata(String name)

   at SAP.Middleware.Connector.RfcRepository.GetFunctionMetadata(String name)

   at SAP.Middleware.Connector.RfcRepository.CreateFunction(String name)

 

Edited by: VBEXPERT on Mar 23, 2011 2:14 PM

List of installed application servers

$
0
0

Hi

 

I need a Function Module to get the list of all the application servers in the system.

TH_SERVER_LIST is great and remote enabled, but it does not give you app servers that are currently down.

 

Any idea?

 

Thanks

YN

RFC call from a Windows Service

$
0
0

Hi All,

 

I have created a simple windows service which is making an RFC call to R/3 system. This is not working. Whereas the same piece of code written in a windows application projects(exe) works properly. Does anyone had similer issues working with Windows services ? Is it a known issue of RFC calls from windows service ???

 

Thanks & Regards

Ganesh Datta

Metadata not available before invoke

$
0
0

Hi,

 

I had been testing out NCO 3.0 and was excited about the new metadata methods.

 

My test environment is as follow:

 

1. Visual Studio 2010

2. NCO 3.0 64-bit

3. NetFramework 4.0

4. SAP ECC 7.02

 

 

My sample .Net VB code to create RFC function is as follow:

Dim rfcGetProdOrder As IRfcFunction = ECC_Destination.Repository.CreateFunction("BAPI_PRODORD_GET_DETAIL")

 

 

Immediately, I try to obtain the metadata for TABLE

 

 

dim myTable as IRFCTable = rfcGetProdOrder.GetTable("Operation")
Dim myElementMetadata As RfcElementMetadata
myElementMetadata = myTable.GetElementMetadata(0) ' Get the first metadata from the table, supposed to be for first field of table.

 

 

It will return null or error .

 

 

However, if I first invoke the RFC, then I will get the metadata for table OPERATION.

 

There is no issue with metadata for structure.

 

Any idea where I had done wrong, or, is it possible to obtain the metadata for table without invoking the RFC?

 

Thanks!

BAPI_PRODORD_GET_DETAILS - How to obtain values from a RfcStructureMetadata?

$
0
0

Hi to everybody,

I'm using:

- Visual Studio 2013

- nco30 x64

The aim is obtain the values from some fields from table "header" and table "components" relevat to the BAPI_PRODORD_GET_DETAIL

Surfing in the web, I found a post from Ronald Lim and I followed the steps described by Yearden Jacobson

 

I'm trying to use BAPI_PRODORD_DETAIL this is my code:

 

Private Sub GetProdOrdDetails(ByVal odp As String)

        Try

            Dim funcAPI As IRfcFunction = _ecc.Repository.CreateFunction("BAPI_PRODORD_GET_DETAIL")

            funcAPI.SetValue("Number", odp)

            Dim myTable As IRfcTable = funcAPI.GetTable("Header")

            Dim myElementMetadata As RfcStructureMetadata

            myElementMetadata = myTable.Metadata.LineType

            funcAPI.Invoke(_ecc)

            For i As Integer = 1 To myElementMetadata.FieldCount - 1

                MsgBox(myElementMetadata.Item(i).Name)

                MsgBox(myElementMetadata.Item(i).Documentation)

            Next

        Catch ex As Exception

            MsgBox("Error:" & ex.Message)

        End Try

    End Sub

No matter to get the fields name, description and so on, but I need getting the values for each field in the tables, but I don't know how to do.

Is there anybody who knows how?

 

I thank you in advance

Kind Regards

Celeghin Denis


Listen to SAP RFC calls in a C# web Service. looking for C# code

$
0
0

Hi ,

 

I am pretty new to SAP, and I have got a new requirement where I have to Implement a C# windows service that would be called from SAP RFC.

the work on SAP side is almost done by SAP team, I am looking forward for a C# code to a windows service that would receive some parameters from SAP. Any hekp would be appreciated.

PS: I am trying to connect SAP via SAP.NET 2.0

 

Thanks in advance!

SAP .net connector DLL not referenced in VS 2003

$
0
0

help required urgently!!


hi All,

I have installed SAP.net connector 2.0 in my system and i am trying to reference the SAP dlls in my VS 2003, but i am unable to do so.

can some one please help me what am i missing here?

Sap log on info while adding new application server using NCo 2.0

$
0
0

Hi,

 

can someone please throw some light on what all necessary SAP log on info do we require while adding a new application server using the NC0 2.0

 

In the below steps I am currently stuck at "d."

 

Add an SAP proxy to the application as follows:

a. `From the VS.NET menu, choose Project Add New Item

b. Select the SAP Connector Proxy template and choose Open.

c. In the VS .NET Server explorer, right-click on SAP Servers and select Add Server.

d. Complete the SAP logon information and choose ENTER.

e. The folders BOR and Functions appear. If not, recheck your logon information.

 

when i enter the username, password, system number HTTP Host details then the folders BOR, Functions appear in server explorer but none of the RFC in the SAP Server appear in the list. Am i missing any necessary Log on info here.

any help would be much appreciated!

thanks!

IDOC_INBOUND_ASYNCHRONOUS - How to get the response status code - .Net

$
0
0

Hi,

I'm pushing IDOCs through the Sap Connector from .Net.

For doing this I'm using the IDOC_INBOUND_ASYNCHRONOUS function.

 

Is there a way to get the response status code of the IDOC push?

I'm expecting something like this:

 

Inbound status of an Idoc

 

50     IDoc added

51     Application document not posted

52     Application document not fully posted

53     Application document posted

54     Error during formal application check

55     Formal application check OK

56     IDoc with errors added

57     Test IDoc: Error during application check

58     IDoc copy from R/2 connection

59     Not used

60     Error during syntax check of IDoc (inbound)

61     Processing despite syntax error (inbound)

62     IDoc passed to application

63     Error passing IDoc to application

64     IDoc ready to be transferred to application

65     Error in ALE service

66     IDoc is waiting for predecessor IDoc (serialization)

67     Not used

68     Error - no further processing

69     IDoc was edited

70     Original of an IDoc which was edited

71     IDoc reloaded from archive

72     Not used, only R/2

73     IDoc archived

74     IDoc was created by test transaction

75     IDoc is in inbound queue.

 

Thanks!

SAP .NET connector with BizTalk Adapter for .NET application

$
0
0

Hi,

 

I am using SAP BizTalk adapter with NCO to connect with SAP. I have followed all the instructions on the BizTalk adapter (https://support.microsoft.com/en-us/kb/3100811). I have also installed the SAP .NET connector.

When I try to connect I am getting the following error:

 

Connecting to the LOB system has failed. Destination NCoConnection does not exist.

 

 

Note: I can successfully connect to SAP using BizTalk adapter for SAP with the SAP librRFC assembly


Any idea on why I am getting the above error. Thanks in advance.


Regards,

Nikhil

Viewing all 68 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>