Reputation: 763
I have downloaded SAP .NET Connector 3.0 (https://github.com/ion-sapoval/NSAPConnector) and set up the connection parameters:
<SAP.Middleware.Connector>
<ClientSettings>
<DestinationConfiguration>
<destinations>
<add NAME="DESTINY" USER="UZIVATEL" PASSWD="*****" CLIENT="001" LANG="EN"
ASHOST="192.168.132.197" SYSID="P" SYSNR="00" POOL_SIZE="5"
MAX_POOL_SIZE="10"/>
...
Afterwards, I have changed the lines with the "STRINGS" in the example code:
using (var connection = new SapConnection("DESTINY"))
{
connection.Open();
var session = new SapSession(connection);
var command = new SapCommand("ZQMTRANSP_DOREAD_FM", connection);
command.Parameters.Add("PARAM1", "5");
command.Parameters.Add("PARAM2", "000000900862");
session.StartSession();
var resultDataSet = command.ExecuteDataSet();
session.EndSession();
var sapDataReader = command.ExecuteReader("RESULTS");
...
When the code is executed it results with the internal error: NO_PVP
NSAPConnector.CustomExceptions {"An exception occurred when trying to execute corresponding .NSAPConnectorException function for the 'ZQMTRANSP_DOREAD_FM' on server. Check inner exception for more details."} Data {System.Collections.ListDictionayInternal} HelpLink null HResult -2146232832 InnerException {"NO_PVP"} AbapMessageClass "" AbapMessageNumber 000 AbapMessageParameters {string[4]} AbapMessageType 32 ' ' AbapT100Message "" Data {System.Collections.ListDictionayInternal} HelpLink null HResult -2146232832 InnerException null Key NO_PVP Message NO_PVP PlainText null Source sapnco StackTrace at SAP.Middleware.Connector.RfcConnection.ThrowRfcErrorMsg() at SAP.Middleware.Connector.RfcConnection.RfcReceive(RfcFunction function) at SAP.M... TargetSite {Void ThrowRfcErrorMsg()} Message An exception occurred when trying to execute corresponding function for the 'ZQMTRANSP_DOREAD_FM' on server. Check inner exception for more details. Source NSAPConnector StackTrace at NSAPConnectorSapCommand.ExecuteRfc() in C:\Users\xxxxx\NSAPConnector-master\NSAPConnector.core\SapCommand.cs:line 194 at NSAP... TargetSite {SAP.Middleware.Connector.IRfcFunction ExecuteRfc()} Attributes Public | HideBySig CallingConvention Standard | HasThis ContainsGenericParameters false
However, there is no error with different RFC function. I guess the error is related to the fact that function ZQMTRANSP_DOREAD_FM contains a table.
Upvotes: 0
Views: 330
Reputation: 13656
As the issue was solved by the OP as per the comments, I'm just taking out these comments to highlight the solution and help others to see it more easily (NB: I'm not sure that the error can be seen in ST22
, which would mean that there was a runtime error in the ABAP server, my opinion is that it's more an exception returned by ZQMTRANSP_DOREAD_FM
and an ABAP debug of this FM is required to understand what produced it):
Jun 27, 2016 at 16:10
"It looks like an error is thrown by the function module being called. Check with ST22 in the target system, please."
Original Poster of the question Jul 31, 2017 at 15:44
*"This was an error within the RFC function. All it takes to fix that error was to set different language LANG="CS" within a destination. If only the error would be named for example UNSUPPORTED_LANG instead of NO_PVP."
Upvotes: 0