Skip to Content
0
Former Member
Jun 30, 2009 at 09:25 PM

Calling a function module using C#

2302 Views

My task is to write minimal interface code to present report data in an iview. I am using the Portal Development Kit (PDK) and have successfully reverted back to VS2005 (from 2008) and deployed a "hello world" test page. So far so good.

I now have to do something useful and display data from SQL Server using a user id as a parameter. Someone has created a function module and described it thus:

The required function module is now available in DEV:

Function module: ZGET_LOGIN_USER

Function group: ZG201

Here are the details of the function module ZGET_LOGIN_USER:

It takes two optional parameters:

- BEGINDATE (default: today)

- ENDDATE (default: 31.12.9999)

It returns:

- USERNAME u2013 Login ID

- PERNR u2013 Personnel No

- FAMILYID u2013 Family ID

How do I call this from the .Net code, in C# or VB.Net? I can not find anything directly relevant to this anywhere (lots of dead links) yet it must be a staple for anyone using the PDK. Do I need the .Net Connector as well, for example? Any approach to it suggests that I have to use Visual Studio 2003 (!!!!) to make it work!? - surely not, in 2009???? Is there no modern alternative to the .Net Connector which seems to need .Net FX 1.1? Can I use VS2008 and use its ability to target earlier .Net FX versions?

Can someone please point me in the right direction and to the current way of doing such simple things - I can't believe that I have to install Visual Studio 2003, 2005 and 2008 to make this thing work!

Thanks in anticipation,

James.