Skip to Content
avatar image
Former Member

Porting DCOM to .net and want to make "object" style calls

We are currently trying to port the APS Connector to use the new .NET technology but we have run into a very specific problem which you may be able to help us with.

When using the DCOM Connector, we were able to call BAPI objects directly e.g.

ManufactOrderAPS.GetList

ManufactOrderAPS.GetList2

However, in the .NET Connector, the only thing which we have managed to work out is how to call the RFC functions e.g.

BAPI_MOSRVAPS_GETLIST

BAPI_MOSRVAPS_GETLIST2

Is there anyone who you know who would be able to tell us how we are suppose to make the object style calls and not the RFC calls?

Many thanks for any help you can provide us

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 21, 2004 at 10:53 AM

    BOR objects are in fact stateless objects with methods that are renamed RFC functions. So in fact this just a naming issue:

    Just Call your proxy class ManufactOrderAPS (instead of SAPProxy1 or similar) and rename the Methods Bapi_Mosrvaps_Getlist and Bapi_Mosrvaps_Getlist2 to GetList and GetList2. You can easily do those customizations using the Proxy Designer.

    BTW: The next major version of .NET Connector will have advanced BOR/BAPI support that does these customizations automatically for you based on the information stored in BOR. The beta is planned to be available within the next weeks.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      But you can change the name of a method later outside the wizard by opening the generated .sapwsdl file in design mode and changing the method name through the property sheet. After saving the changes, the C# files will be re-generated.

      Regards,

      Guangwei

  • avatar image
    Former Member
    Jul 21, 2004 at 04:21 PM

    Thanks for the information. We will do as you suggest.

    One other question has arisen when porting the code to .NET. Currently, we connect using a DCOM Desination. This if configured in the DCOM Connector utility and means we can connect simply by providing the name of the DCOM Destination. Ideally, we would want to recreate this in the new program, however, it only seems to be possible to connect by specifying all the usual connection parameters in the code.

    Is there any way to connect using a .NET destination?

    Many thanks

    Add comment
    10|10000 characters needed characters exceeded

    • > to .NET. Currently, we connect using a DCOM

      > Desination. This if configured in the DCOM Connector

      > utility and means we can connect simply by providing

      > the name of the DCOM Destination. Ideally, we would

      > want to recreate this in the new program, however, it

      > only seems to be possible to connect by specifying

      > all the usual connection parameters in the code.

      > Is there any way to connect using a .NET

      > destination?

      In NCo 1.x, we offer two destinations: Destination is the passive one just converts property values to a connection string. SAPLogonDestination takes as many properties from SAPLOGON.INI based on the DestinationName.

      Both - like any .NET component - can be used in desginer to persist all propeties to code. But but also like in all .NET components they allow the properties to be "bound" to Web.config/app.config. Just check the "Dynamic Properties" feature provided in Visual Studio. This allows to easily configure destination setting at deployment time. BTW: In NCo 2.x, the destiantions will automatically set to bind most properties to config file.

      Additionally NCo 2.x comes with a new ConfigDestination, that stores/reads all properties to config file in an easier to handle syntax.