sap web gui login

http://molgaard.consolut.eu/sap/bc/gui/sap/its/webgui

Saturday, August 2, 2014

Call RFC enable function module from asp.net application

Call RFC enable function module from asp.net application


Call RFC enable function module from asp.net application

I using SAP.NET Connector 3.0 which is connecting to SAP Server and retrieve data to ASP.Net client using a function module.
here I will create a function module which show the company information based on user parameter .
Step by Step Process
  1.  Install SAP.NET connector 3.0 on your computer .
  2.  Create a  function module in sap server.
  3.  Call that function module from asp.net application .
Process Details
  Go to sap development server and create a  structure named  ZABAPISTRT001.















    Now go to transaction SE37 to create function module name ZBAPI_FMT001.













    Go to Attributes tab and select Remote-Enable Module.




























      Now go to Import tab and assign value as below.









     Now go to Export tab and assign value as below.











Now go to Table value and assign value as below.
                                                                          .

        Now go to source Code tab and write code as below
























                   Now active and release the function module
2.            RFC enable function module creation done now we can test as below process
         Go to Function module > Test > Test Function Module Or press F8  appear below screen











     Now enter Import parameters  value for BUKS and execute.




























         After that  we will show below screen.
























              Result is 1 Entry.
       Now we will call this function module from asp.net application I am using SAP.NET Connector 3.0
        Open new projects on asp.net net as windows application.
       Add reference dll for sap.net connector.

















       Design a form as below.

1.    Add a configuration file add below code (I am using .NET Framework 4)
<?xml version=”1.0″?>
<configuration>
<configSections>
<sectionGroup name=”SAP.Middleware.Connector”>
<section name=”GeneralSettings” type=”SAP.Middleware.Connector.RfcGeneralConfiguration, sapnco”/>
<sectionGroup name=”ClientSettings”>
<section name=”DestinationConfiguration” type=”SAP.Middleware.Connector.RfcDestinationConfiguration, sapnco”/>
</sectionGroup>
<sectionGroup name=”ServerSettings”>
<section name=”ServerConfiguration” type=”SAP.Middleware.Connector.RfcServerConfiguration, sapnco”/>
</sectionGroup>
</sectionGroup>
</configSections>
<SAP.Middleware.Connector>
<GeneralSettings defaultTraceLevel=”1″ traceDir=”C:\Temp” traceEncoding=”UTF-8″ traceType=”PROCESS”/>
<ClientSettings>
<DestinationConfiguration>
<destinations>
<add NAME=”NCO_TESTS” USER=” ” PASSWD=”" CLIENT=”" LANG=”EN” ASHOST=”" SYSNR=”22″ POOL_SIZE=”5″ MAX_POOL_SIZE=”10″/>
<add NAME=”NCO_RAW” CLIENT=”100″ LANG=”EN” ASHOST=”MY_ASHOST” SYSNR=”MY_SYSNR”/>
</destinations>
</DestinationConfiguration>
</ClientSettings>
<ServerSettings>
<ServerConfiguration>
<servers>
<add NAME=”NCO_SERVER” GWHOST=”MY_GWHOST” GWSERV=”MY_SAPGW” PROGRAM_ID=”nRfcTestServer” REPOSITORY_DESTINATION=”NCO_TESTS” REG_COUNT=”1″/>
</servers>
</ServerConfiguration>
</ServerSettings>
</SAP.Middleware.Connector>
<startup><supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/></startup></configuration>

1.    Add below code in button click event
1.    Run projects and test.

















0 comments:

Post a Comment