Get Synchronized Access to StringCollection in C#

AmitDiwan
Updated on 11-Dec-2019 10:57:21

82 Views

To get synchronize access to the StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection stringCol = new StringCollection();       String[] arr = new String[] { "100", "200", "300", "400", "500" };       Console.WriteLine("Array elements...");       foreach (string res in arr) {          Console.WriteLine(res);       }       stringCol.AddRange(arr);       Console.WriteLine("Total number of elements = "+stringCol.Count);       stringCol.RemoveAt(3);       Console.WriteLine("Total number of elements now = "+stringCol.Count); ... Read More

Get Types Nested Within the Current Type in C#

AmitDiwan
Updated on 11-Dec-2019 10:54:09

171 Views

To get the types nested within the current Type, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       Type type1 = typeof(Subject);       try {          Type[] type2 = type1.GetNestedTypes();          Console.WriteLine("Nested Types...");          for (int i = 0; i < type2.Length; i++)             Console.WriteLine("{0} ", type2[i]);       }       catch (ArgumentNullException e) {          Console.Write("{0}", e.GetType(), e.Message);       }    } } ... Read More

Get Specific Type Nested Within Current Type in C#

AmitDiwan
Updated on 11-Dec-2019 10:49:41

107 Views

To get a specific type nested within the current Type, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       Type type1 = typeof(Subject);       try {          Type type2 = type1.GetNestedType("AdvSubject");          Console.Write("NestedType = "+ type2);       }       catch (ArgumentNullException e) {          Console.Write("{0}", e.GetType(), e.Message);       }    } } public class Subject {    public class BasicSubject {       //    }    public class AdvSubject ... Read More

Finding the Index of First Element in the Array in C#

AmitDiwan
Updated on 11-Dec-2019 10:44:25

263 Views

To find the index of first element in the array, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       string[] products = new string[] { "Andy", "Mark", "Gary", "Andre"};       Console.WriteLine("One or more name begin with 'A'? = {0}",       Array.Exists(products, ele => ele.StartsWith("A")));       Console.WriteLine("Is the array having fixed size? = " + products.IsFixedSize);       Console.WriteLine("Is the array read only? = " + products.IsReadOnly);       Console.WriteLine("Is the array synchronized? = " + products.IsSynchronized);       Console.WriteLine("Index ... Read More

Difference Between Class ALV and Function ALV in SAP ABAP

Sharon Christine
Updated on 11-Dec-2019 10:38:59

2K+ Views

Class alv and Function alv are different in terms of features. Below is the difference:Class alv are secured as compared to function alv.While using class alv, it improves the performance.With use of function alv, you can create screens using function module however you need to call separate programs to generate screen.Class alv provides Object Oriented functionality and hence they are easily reusable.You can execute function modules asynchronously and can also be called by other systems remotely.Below is an example of class ALV:DATA: lcl_alv TYPE REF TO cl_gui_alv_grid,       t_gly TYPE STANDARD TABLE OF Travels . SELECT * FROM ... Read More

Find Last Node in Linked List Containing Specified Value in C#

AmitDiwan
Updated on 11-Dec-2019 10:37:42

169 Views

To find the last node in LinkedList containing the specified value, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main() {       LinkedList list = new LinkedList();       list.AddLast(100);       list.AddLast(200);       list.AddLast(300);       list.AddLast(400);       list.AddLast(500);       list.AddLast(300);       list.AddLast(500);       Console.WriteLine("LinkedList elements...");       foreach(int i in list) {          Console.WriteLine(i);       }       LinkedListNode val = list.FindLast(300);       Console.WriteLine("Specified ... Read More

Connect to an SAP Module

karthikeya Boyini
Updated on 11-Dec-2019 10:37:11

380 Views

You can create RFC function module and then call this function module from outside. You can create RFC using T-Code SE37You can use the following link to know more about using RFC function module:https://archive.sap.com/discussions/thread/333645This tells about how you can create an FM in SE37 in Target system enabling Remote-Function Enabled and using attributes of FM.To create an RFC connection, you need to use T-Code: SM59 mentioning Username and Password.Another link that you can refer which tells about creating RFC and Remote-enabled FM and call from another SAP system using ABAP Program:https://wiki.scn.sap.com/wiki/display/Snippets/Creating+RFC+and+Remote-enabled+FM+and+call+from+another+SAP+system+using+ABAP+ProgramRead More

Differentiate between Transaction Codes SE01, SE09, and SE10 in SAP ECC System

Swarali Sree
Updated on 11-Dec-2019 10:35:21

888 Views

In early sap version, SE09 and SE10 perform different functions as below:SE09 was widely used in workbench/development of transports.SE10 was widely used in customizing transports.In newer version now, both the Transactions SE09 and SE10 perform the same function as shown in below snapshot.In addition, SE01 is an extension combining SE09 and SE10 functions and adding lot other functions as shown in below snapshot:

Fetch Source Code of Transaction Note in SAP R/3

Monica Mona
Updated on 11-Dec-2019 10:31:57

386 Views

If you ever need to fetch the mapped program with a transaction, you need to call the transaction SE93. It will fetch you the program and variant of the selection screen.Now, if you need source code then you can use the transaction SE38 or SE80. If you also require Dynpro which is mapped against the program then use SE80.

SortedSet Class in C#

AmitDiwan
Updated on 11-Dec-2019 10:31:56

1K+ Views

The SortedSet class in C# represents a collection of objects that is maintained in sorted order.Following are the properties of the SortedSet class −Sr.NoProperty & Description1ComparerGets the IComparer object that is used to order the values in the SortedSet.2CountGets the number of elements in the SortedSet.3MaxGets the maximum value in the SortedSet, as defined by the comparer.4MinGets the minimum value in the SortedSet, as defined by the comparer.Following are some of the methods of the SortedSet class −Sr.NoMethod & Description1Add(T)Adds an element to the set and returns a value that indicates if it was successfully added.2Clear()Removes all elements from the ... Read More

Advertisements