Click here to Skip to main content
15,886,769 members
Articles / Productivity Apps and Services / SAP

SAP .NET RFC Server with SAP.NET Connector 2.0

Rate me:
Please Sign up or sign in to vote.
4.70/5 (10 votes)
26 Apr 2009CPOL5 min read 101.7K   2.5K   40  
This article explains how to connect from SAP to .NET application
//------------------------------------------------------------------------------
// 
//     This code was generated by a SAP. NET Connector Proxy Generator Version 2.0
//     Created at 3/8/2009
//     Created from Windows
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// 
//------------------------------------------------------------------------------
using System;
using System.Text;
using System.Collections;
using System.Runtime.InteropServices;
using System.Xml.Serialization;
using System.Web.Services;
using System.Web.Services.Description;
using System.Web.Services.Protocols;
using SAP.Connector;

namespace SAP_RFC_Listener
{
  /// <summary>
  /// A typed collection of ZMAIL_BODY elements.
  /// </summary>
  [Serializable]
  public class ZMAIL_BODYTable : SAPTable 
  {
  
    /// <summary>
    /// Returns the element type ZMAIL_BODY.
    /// </summary>
    /// <returns>The type ZMAIL_BODY.</returns>
    public override Type GetElementType() 
    {
        return (typeof(ZMAIL_BODY));
    }

    /// <summary>
    /// Creates an empty new row of type ZMAIL_BODY.
    /// </summary>
    /// <returns>The newZMAIL_BODY.</returns>
    public override object CreateNewRow()
    { 
        return new ZMAIL_BODY();
    }
     
    /// <summary>
    /// The indexer of the collection.
    /// </summary>
    public ZMAIL_BODY this[int index] 
    {
        get 
        {
            return ((ZMAIL_BODY)(List[index]));
        }
        set 
        {
            List[index] = value;
        }
    }
        
    /// <summary>
    /// Adds a ZMAIL_BODY to the end of the collection.
    /// </summary>
    /// <param name="value">The ZMAIL_BODY to be added to the end of the collection.</param>
    /// <returns>The index of the newZMAIL_BODY.</returns>
    public int Add(ZMAIL_BODY value) 
    {
        return List.Add(value);
    }
        
    /// <summary>
    /// Inserts a ZMAIL_BODY into the collection at the specified index.
    /// </summary>
    /// <param name="index">The zero-based index at which value should be inserted.</param>
    /// <param name="value">The ZMAIL_BODY to insert.</param>
    public void Insert(int index, ZMAIL_BODY value) 
    {
        List.Insert(index, value);
    }
        
    /// <summary>
    /// Searches for the specified ZMAIL_BODY and returnes the zero-based index of the first occurrence in the collection.
    /// </summary>
    /// <param name="value">The ZMAIL_BODY to locate in the collection.</param>
    /// <returns>The index of the object found or -1.</returns>
    public int IndexOf(ZMAIL_BODY value) 
    {
        return List.IndexOf(value);
    }
        
    /// <summary>
    /// Determines wheter an element is in the collection.
    /// </summary>
    /// <param name="value">The ZMAIL_BODY to locate in the collection.</param>
    /// <returns>True if found; else false.</returns>
    public bool Contains(ZMAIL_BODY value) 
    {
        return List.Contains(value);
    }
        
    /// <summary>
    /// Removes the first occurrence of the specified ZMAIL_BODY from the collection.
    /// </summary>
    /// <param name="value">The ZMAIL_BODY to remove from the collection.</param>
    public void Remove(ZMAIL_BODY value) 
    {
        List.Remove(value);
    }

    /// <summary>
    /// Copies the contents of the ZMAIL_BODYTable to the specified one-dimensional array starting at the specified index in the target array.
    /// </summary>
    /// <param name="array">The one-dimensional destination array.</param>           
    /// <param name="index">The zero-based index in array at which copying begins.</param>           
    public void CopyTo(ZMAIL_BODY[] array, int index) 
    {
        List.CopyTo(array, index);
	}
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Turkey Turkey
Huseyin Akturk was born in Ankara, Turkey. He holds BSc degree from Dokuz Eylul University, Izmir, Turkey Computer Engineering department since July 2005. He also holds MSc degree from Ege University, Izmir, Turkey Computer Engineering department since March 2008.

He has applied data mining technology and statistical operations on stock exchanges during BSc and MSc theses. The purpose of these theses is looking for similarity between stock exchanges and he has got successful results in these theses respect to the purpose and published essays.

He has worked with a responsibility of being computer engineer during professional and academic experience. He has assimilated the idea of being keen on newness in technology. He has been working as Senior SAP Business Intelligence Consultant, Senior SAP Technical Consultant and Senior Software Engineer for several firms since October 2005.

Comments and Discussions