Use this tag for questions regarding ABAP internal tables.
Questions tagged [internal-tables]
141 questions
2
votes
4 answers
Select max field value from a group of records?
I need to get the lines with the highest EXBEL registers from an itab for every different VKONT.
The result table may contain several lines for the same VKONT value if this latter one has several lines in the source table with the same highest EXBEL…

Raúl D.Martín
- 23
- 1
- 5
2
votes
4 answers
Looping through a dynamic internal table in ABAP - unkown attributes
Constructed a dynamic internal table with the table name as input string from the user, how do I loop through the same?
Please find the MWE:
DATA W_TABNAME TYPE W_TABNAME.
DATA W_DREF TYPE REF TO DATA.
DATA W_WA TYPE REF TO DATA.
FIELD-SYMBOLS…

Subham
- 21
- 1
- 1
- 3
2
votes
2 answers
How to loop at Table only having ref to data
I am using the function Module RSAQ_QUERY_CALL, getting back a table:
DATA: gr_data TYPE REF TO data.
CALL FUNCTION 'RSAQ_QUERY_CALL'
EXPORTING
query = 'ZXXXXXXXX'
usergroup = 'XXX'
VARIANT = 'TEST'
…

inetphantom
- 2,498
- 4
- 38
- 61
2
votes
2 answers
Suppressing an insuppressible warning while INSERT INTO itab
I am adding a new entry to a sorted internal table inside a loop. As the loop I'm in has a sort order that's different from that of the sorted table, I have to use an INSERT INTO statement instead of an APPEND TO as the latter risks violating the…

Lilienthal
- 4,327
- 13
- 52
- 88
2
votes
3 answers
Type conflict within DELETE itab1 FROM itab2?
I've had a dump recently,
DATA: gt_data TYPE SORTED TABLE OF ty_data WITH NON-UNIQUE KEY bukrs gaapnm,
...
lt_tabdel TYPE standard TABLE OF ty_data.
LOOP AT gt_data ASSIGNING .
IF -KANSW + -KAUFW =…

AlexanderK
- 365
- 7
- 21
2
votes
1 answer
When to use internal tables?
So, I have read that using internal tables increases the performance of the program and that we should make operations on DB tables as less as possible. But I have started working on a project that does not use internal tables at all.
Some…

Ovidiu Pocnet
- 579
- 12
- 32
2
votes
4 answers
Show duplicates in internal table
Each an every item should have an uniquie SecondNo + Drawing combination. Due to misentries, some combinations are there two times.
I need to create a report with ABAP which identifies those combinations and does not reflect the others.
Item: …

ray lashus
- 23
- 1
- 4
2
votes
2 answers
Nested loop conditional
Supposed I have this table:
TDID TDLINE
F04 04-AA
F04 04-BB <-- call a function
F05 05-AA
F05 05-BB <-- call a function
F06 06-AA <-- call a function
I would like to call a function while the TDID field is not…

mrjimoy_05
- 3,452
- 9
- 58
- 95
1
vote
5 answers
Suppress duplicated entries in a table
How do i suppress duplicate entries in both classical (write) and ALV report? I was given a task to write a simple report with this criteria.
I tried to google but could not succeed with any of their solutions and need help. Below is the expected…

Prasaanth Naidu
- 861
- 1
- 10
- 15
1
vote
1 answer
Merge rows from two diff-structure tables into single one without loop?
I have two internal tables with a content: itab1, itab2 and one final table ftab. I need to move the contents from itab1 and itab2 to ftab with corresponding values.
For example, move the first record of itab1 to the corresponging first record of…

whatever_2808
- 23
- 2
1
vote
1 answer
ABAP 7.4 way of filling one itab from another?
Consider, I have GT_KUNNR internal table like below:
KUNNR
TEXT
123
demo text
456
test inv
I have second GT_TEXT internal like below:
KUNNR
TEXT
EXPIRED
123
welcome
X
I am writing the code till now in ABAP as:
LOOP AT…

CoderW
- 123
- 3
- 14
1
vote
2 answers
Dynamically read an internal table with more than one key field
Let us say I have the following code:
iob_typedescr ?= cl_abap_typedescr=>describe_by_name( 'HOUSES' ).
iob_structdescr_table ?= iob_typedescr.
it_ddic_all = iob_structdescr_table->get_ddic_field_list( ).
LOOP AT it_ddic_all INTO is_ddic WHERE…

Ikim SS
- 139
- 2
- 8
1
vote
2 answers
Table pivoting via ABAP with dynamic number of columns?
I have the following source sample data (which will be populated from a dictionary table but I am supplying the values manually for demo purpose):
What I am trying to get is the pivot-version of sums-per-week assuming I do not know how many weeks I…

user10149299
- 13
- 3
1
vote
1 answer
Looping through a dynamic internal table
I am trying to split internal table to smaller chunks.
In below example the internal table big_table is split into small tables.
My question is how do we get the actual data from lt_small_tables for further processing.
TYPES: BEGIN OF lty_line,
…

AbapDesign4Future
- 77
- 1
- 6
1
vote
2 answers
how to improve the performance in nested loops with 2 tables having huge number of entries in abap?
Both tables sorted by key KNO
LOOP AT lt_header INTO lwa_header.
LOOP AT lt_items INTO lwa_item
WHERE key = lwa_header-KNO
“……….
ENDLOOP.
ENDLOOP.
This would take more time to…

sumedh patil
- 59
- 3
- 8