on 03-23-2011 6:13 AM
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
Hi gurus
i too got the issue on the same
Remote Function Module "/ACTIP/OCR_VENDOR_DATA" on SAP system and retrieve the result of the same to the SmartKey
can you please help me.
Pavan kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Folks,
I had the same Problem and found that it has been caused by missing authorizations.
Now my RFC user has the following function groups in authorization object S_RFC:
SYST, RFC_METADATA, RFC1, "myfunctiongroup"
"myfunctiongroup" stands for the function group that contains the RFC function module that shall be called by .NET connector.
Bye
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It happens intermittently. Sometimes it work, while sometimes it just show the above error. No idea what's going wrong...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Francisco,
As long as the destination remains stable and is not changed, you will not experience such an issue. If it needs to be reconfigured, and you use a cached RfcDestination instance, you will experience this situation. A good countermeasure is not to cache the RfcDestination instance, but to always use the RfcDestinationManager to get the destination when needed.
Best regards,
Markus
Dear Markus,
I have developed over 40 different applications that fetches information from SAP. most of the applications are running smoothly. yet there are some that are showing the error mentioned above. I have incorporated the instructions mentioned above, yet the system is showing the same error. this error occurs on a time to time basis.
Need your support in getting a fix on it.
Regards,
Muhammad.
Hi Khurram,
you cannot exclude it completely that this exception occurs. The destination could have been adjusted by an administrator just after you have retrieved it and just before your code wants to use it. Hence, to b absolutely on the safe side, your code needs to be able to to react on such a situation and resume processing by simply executing the call again.
Best regards,
Markus
P.S.: This issue definitely happens more often, when using destination management in a wrong way and adding and removing destinations all the time programmatically, e.g. if one thinks that only thus a user to the same logical target can be exchanged, which would be done better using an RfcCustomDestination
Hi,
I cannot reproduce this error. My sample program works for BAPI_USER_GET_DETAIL too.
At first I got this RfcInvalidStateException when I initialize the RfcDestinationManager twice within one program.
RfcDestinationManager.RegisterDestinationConfiguration(new MyBackendConfig());
But in your case I don't think this is the error. Please check in SAP in SE37 to call function module DDIF_FIELDINFO_GET with import parameter TABNAME = BAPIAGR. I think it would be helpful if you find the logfile that is refered in your stack trace.
You don't have a problem calling the function module BAPI_USER_GET_DETAIL, you have a problem retrieving the metadata from your SAP system.
regards,
Ronny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.