Create ListDictionary in C#

AmitDiwan
Updated on 11-Dec-2019 07:05:05

120 Views

To create a ListDictionary, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       ListDictionary dict = new ListDictionary();       dict.Add("1", "SUV");       dict.Add("2", "Sedan");       dict.Add("3", "Utility Vehicle");       dict.Add("4", "Compact Car");       dict.Add("5", "SUV");       dict.Add("6", "Sedan");       dict.Add("7", "Utility Vehicle");       dict.Add("8", "Compact Car");       dict.Add("9", "Crossover");       dict.Add("10", "Electric Car");       Console.WriteLine("ListDictionary elements...");       foreach(DictionaryEntry d in dict){ ... Read More

Use SAP OLE Code to Paste Internal Table into Excel

Ali
Ali
Updated on 11-Dec-2019 07:03:46

770 Views

Note that you have to use “double quotation” for all the text you have to put into one cell and then connect cell with 0X09 and 0X0A for next column and next row respectively.Check the below code as it fills two cells with 2 lines:CONSTANTS:    nextC TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab,    nextR TYPE abap_char1 VALUE cl_abap_char_utilities=>newline,    quot TYPE abap_char1 VALUE '"'. DATA:    buffer TYPE string. CONCATENATE quot 'R1C1L1' nextR 'R1C1L2' quot nextC quot 'R1C2L1' nextR 'R1C2L2' quot INTO buffer.Read More

Displaying Source Code of RFC in SAP System

Rahul Sharma
Updated on 11-Dec-2019 07:02:14

931 Views

You can check this information in table REPOSRC and column name is “DATA”.You can also make use of RPY_FUNCTIONMODULE_READ_NEW - this will return the source as well. This Function module uses changing Parameters.

Intersection of Two HashSets in C#

AmitDiwan
Updated on 11-Dec-2019 07:02:09

541 Views

To find the intersection of two HashSets, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       HashSet set1 = new HashSet();       set1.Add("AB");       set1.Add("CD");       set1.Add("EF");       set1.Add("AB");       set1.Add("IJ");       set1.Add("KL");       set1.Add("EF");       set1.Add("OP");       Console.WriteLine("Elements in HashSet1");       foreach(string val in set1){          Console.WriteLine(val);       }       HashSet set2 = new HashSet();       set2.Add("EF"); ... Read More

Intersection of SortedSet with a Collection in C#

AmitDiwan
Updated on 11-Dec-2019 06:58:58

165 Views

To get the intersection of SortedSet with a Collection, the code is as follow −Example Live Demousing System; using System.Collections.Generic; public class Demo {    public static void Main(){       SortedSet set1 = new SortedSet();       set1.Add(100);       set1.Add(200);       set1.Add(300);       SortedSet set2 = new SortedSet();       set2.Add(450);       set2.Add(200);       set2.Add(650);       set2.Add(300);       set2.Add(800);       Console.WriteLine("Does it contain the same elements? = "+set1.SetEquals(set2));       set1.IntersectWith(set2);       Console.WriteLine("Resultant SortedSet...");       foreach(int ... Read More

Insert into OrderedDictionary with Key and Value at Specified Index in C#

AmitDiwan
Updated on 11-Dec-2019 06:53:56

354 Views

To insert into OrderedDictionary with key and value at specified index, the code is as follows −Example Live Demousing System; using System.Collections; using System.Collections.Specialized; public class Demo {    public static void Main(){       OrderedDictionary dict = new OrderedDictionary();       dict.Add("A", "Books");       dict.Add("B", "Electronics");       dict.Add("C", "Smart Wearables");       dict.Add("D", "Pet Supplies");       Console.WriteLine("OrderedDictionary elements...");       foreach(DictionaryEntry d in dict){          Console.WriteLine(d.Key + " " + d.Value);       }       Console.WriteLine("Count of elements in OrderedDictionary = " + dict.Count); ... Read More

Expose Employee Master Data from SAP HR System using Web Service

Govinda Sai
Updated on 11-Dec-2019 06:51:17

1K+ Views

In a general scenario, when you have ICF configured you can expose SAP system business objects and jobs via BAPI. It is very easy to create and expose BAPI as a web service. As there are only few web services for SAP HR module in SAP system however you can transform a BAPI or ABAP function into a web service. If there is no such function you can create one easily.To find details about BAPI from Function module, use T-Code: SE37 and enter Functional module name for SAP HR module. Below is the list of existing HR function modules in ... Read More

Insert at the Specified Index in StringCollection in C#

AmitDiwan
Updated on 11-Dec-2019 06:48:14

182 Views

To insert at the specified index in StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main(){       StringCollection strCol = new StringCollection();       strCol.Add("Accessories");       strCol.Add("Books");       strCol.Add("Electronics");       Console.WriteLine("StringCollection elements...");       foreach (string res in strCol){          Console.WriteLine(res);       }       strCol.Insert(2, "Headphone");       Console.WriteLine("StringCollection elements...UPDATED");       foreach (string res in strCol){          Console.WriteLine(res);       }    } }OutputThis will ... Read More

Create SAP Interface to Pull Data from Web Application

Ramu Prasad
Updated on 11-Dec-2019 06:47:01

602 Views

Web Dynpro is a complex framework and it would be tough to integrate it to your Java application. You can use SAP Java Connector JCo. SAP Java Connector can be used to call Remote Function calls on SAP system.You can use already defined function modules to connect. You can take help from a SAP ABAP developer if you want to customize any function module request.You can use SAP JCo to make 2 types of calls to system:Inbound calls (Java calls ABAP)Outbound calls (ABAP calls Java).By using a JCo connection, you can call an RFC from the R/3. It contains 2 ... Read More

Insert Element Into Collection at Specified Index in C#

AmitDiwan
Updated on 11-Dec-2019 06:45:10

392 Views

To insert an element into Collection at the specified index, the code is as follows −Example Live Demousing System; using System.Collections.ObjectModel; public class Demo {    public static void Main(){       Collection col = new Collection();       col.Add("Laptop");       col.Add("Desktop");       col.Add("Notebook");       col.Add("Ultrabook");       col.Add("Tablet");       col.Add("Headphone");       col.Add("Speaker");       Console.WriteLine("Elements in Collection...");       foreach(string str in col){          Console.WriteLine(str);       }       Console.WriteLine("Element at index 3 = " + col[3]);     ... Read More

Advertisements