Skip to Content
avatar image
Former Member

Nco 3.0 has problem calling function BAPI_USER_GET_DETAIL

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Mar 28, 2011 at 08:15 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 30, 2011 at 02:55 AM

    It happens intermittently. Sometimes it work, while sometimes it just show the above error. No idea what's going wrong...

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Jan 20, 2014 at 03:22 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2015 at 06:27 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.

    Add comment
    10|10000 characters needed characters exceeded