
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Aggregating rows in SAP ABAP with the same name
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:<ls_result> TYPE t_my_type. LOOP AT lt_result ASSIGNING <ls_result>. COLLECT<ls_result> INTO lt_sums. ENDLOOP.
- Related Questions & Answers
- Adding rows in an internal table with header line in SAP ABAP
- Replace Tab with space in SAP ABAP
- Inserting rows to an internal table through debug in SAP ABAP
- MySQL - SUM rows with same ID?
- Can we get same features in SAP ABAP as they are in VS?
- What is SAP ABAP?
- Negation logic in SAP ABAP
- Using logarithm in SAP ABAP
- Declare dynamically in SAP ABAP
- How can create a table having the name like a^b along with same column name? name?
- Why the constructor name is same as the class name in Java?
- Creating a variable with dynamic variable type in SAP ABAP
- Sort Datetime Type in SAP ABAP
- Equivalent for Row_Number() in SAP ABAP
- Create database view in SAP ABAP
Advertisements