Aggregating Rows in SAP ABAP with the Same Name

Alankritha Ammu
Updated on 05-Dec-2019 10:38:25

696 Views

You can use the COLLECT keyword or some aggregate functions to achieve the result. You should define some datatype to match the scenario.TYPES: BEGIN OFt_my_type,    key_aTYPE foo,    key_bTYPE foo,    nokey_cTYPE foo,    nokey_dTYPE foo, END OFt_my_type, tt_my_type_list TYPE STANDARD TABLE OF t_my_type WITH DEFAULT KEY, tt_my_type_hash TYPE HASHED TABLE OF t_my_type WITH KEY key_a key_b. DATA: lt_resultTYPE tt_my_type_list,    lt_sums TYPE tt_my_type_hash. FIELD-SYMBOLS: TYPE t_my_type. LOOP AT lt_result ASSIGNING .    COLLECT INTO lt_sums. ENDLOOP.Read More

Remove Elements from SortedSet that Match Predicate in Chash

AmitDiwan
Updated on 05-Dec-2019 10:38:23

330 Views

To remove elements from a SortedSet that match the predicate, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    private static bool demo(int i) {       return ((i % 10) == 0);    }    public static void Main(String[] args) {       SortedSet set1 = new SortedSet();       set1.Add(200);       set1.Add(215);       set1.Add(310);       set1.Add(500);       set1.Add(600);       Console.WriteLine("SortedSet elements...");       foreach (int i in set1) {          Console.WriteLine(i);       } ... Read More

Limit Number of Rows in Webi Report in SAP BusinessObjects

Ayyan
Updated on 05-Dec-2019 10:37:03

2K+ Views

If you using Universe as the source, In UDT this can be defined at Universe level. You can limit the size of result set in Universe Parameters -> ControlsIn Query panel, you have an option to set the limit on rows retrieved for each individual query. This setting is called the Max rows retrieved.This option is linked to each individual query, not with Webi document as a whole. When your document has multiple queries, you need to set the Max rows retrieved for each of them.

Creating User Roles and Profiles in SAP System

Manikanth Mani
Updated on 05-Dec-2019 10:34:33

379 Views

This can be done using – Legacy Systems Migration Workbench LSMW transaction. This workbench works like a sort of macro recorder and allows you to record the steps in a transaction and you can replay that record multiple times as per the requirement. This also allows you to replace the values you used in your recorded transaction with new values.A more complex option would be to write ABAP code and this is more flexible to add different privileges to different roles.

Remove Elements from HashSet Using Predicate in C#

AmitDiwan
Updated on 05-Dec-2019 10:34:20

332 Views

To remove elements from a HashSet with conditions defined by the predicate, the code is as follows −Example Live Demousing System; using System.Collections.Generic; public class Demo {    private static bool demo(int i) {       return (i == 100);    }    public static void Main(String[] args) {       HashSet list = new HashSet();       list.Add(100);       list.Add(300);       list.Add(400);       list.Add(500);       list.Add(600);       Console.WriteLine("HashSet elements...");       foreach (int i in list) {          Console.WriteLine(i);       } ... Read More

Executing an Inner Join over RFC on Database Tables in SAP System

Akshaya Akki
Updated on 05-Dec-2019 10:32:27

649 Views

You can do this by creating your own function module that can perform selection as per the requirement.You could also use to create a database view and that can be used to call RFC_READ_TABLE. Also, check for prebuilt SAP connectors provided by companies for SQL joins:

Generate Custom JSON in ABAP

Manikanth Mani
Updated on 05-Dec-2019 10:30:30

2K+ Views

You can use class ZCL_MDP_JSON Library that can encode/parse any JSON. JSON is supported natively in ABAP by the following features:With the use of JSON-XML- it is known as special XML format that can be used for JSON data to be described using an XML representation. By defining a mapping between ABAP types and JSON. This is used in serializations and deserializations using the identity transformation ID.As you can specify JSON data in different forms as an XML source in the statement CALL TRANSFORMATION and JSON can be specified as a target.Check out the following sample code:Example:DATA text TYPE string VALUE ... Read More

Error Connecting SAP While sapjco3 Jar File is in Library Path

Alankritha Ammu
Updated on 05-Dec-2019 10:26:37

663 Views

You need to copy sapjco3.dll in a folder in your Java library path as he t library is not sapjco3.jar and it is a sapjco3.dll file.You can call in your application usingfollowing:System.getProperty("java.library.path")Following approaches can be used:First is by copying sapjco3.dll into one of the folder which are already in your library path like: C:\WINNT\system32Second would be to use the same path in Java library path using any of the following options:By accessing System.setProperty ("java.library.path", "C:\path\to\folder\with\dll\") before accessing the SAPJCoYou can set Java command line like this -Djava.library.path=C:\path\to\folder\with\dll\Read More

Remove Element at Specified Index of Collection in C#

AmitDiwan
Updated on 05-Dec-2019 10:26:35

197 Views

To remove element at specified index of Collection, 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("Andy");       col.Add("Kevin");       col.Add("John");       col.Add("Kevin");       col.Add("Mary");       col.Add("Katie");       col.Add("Barry");       col.Add("Nathan");       col.Add("Mark");       Console.WriteLine("Count of elements = "+ col.Count);       Console.WriteLine("Iterating through the collection...");       var enumerator = col.GetEnumerator();       while (enumerator.MoveNext()) ... Read More

Information for Obsolete Functions in SAP ABAP

Vikyath Ram
Updated on 05-Dec-2019 10:21:38

363 Views

Generally, the information is present in the obsolete function module documentation itself. Here is snapshot of information for “DOWNLOAD” function.

Advertisements