Questions tagged [internal-tables]

Use this tag for questions regarding ABAP internal tables.

141 questions
0
votes
1 answer

Create dynamic parent-child hierarchy?

do you know a efficient method to generate a parent-child hierarchy from a table without parent node IDs. The parent child relationship should be switchable. All of this should be done in ABAP. example data: Color producer weight …
Trasian
  • 3
  • 2
0
votes
3 answers

Searching a substring in an string table?

I have an internal table with the following data…
user11823122
  • 99
  • 4
  • 16
0
votes
2 answers

Grouping + aggregation of itab with table comprehensions

Rather typical task but I'm stuck on doing it in a beautiful way. For example, I need to find the last shipment for each vendor, i.e. to find delivery with the max date for the each vendor VENDOR DELIVERY DATE 10 00055 …
Suncatcher
  • 10,355
  • 10
  • 52
  • 90
0
votes
1 answer

Find, delete and extract duplicates from an internal table

I have an internal table with 2 million rows that's been uploaded from a file. I want to delete any lines that are duplicates and extract the row numbers of the duplicates and add them to another table. What's the best/most efficient way to do this…
mmgro27
  • 475
  • 1
  • 8
  • 18
0
votes
1 answer

FOR expression and let expression to filter an internal table

I coded the following line of code DATA(lt_heads_ok) = VALUE my_head_table( for wa IN g_heads LET ok = g_model->is_head_ok( wa-id ) IN ( COND #( WHEN ok = abap_true THEN wa ) ) ). I can activate it but…
flowx1710
  • 177
  • 3
  • 16
0
votes
3 answers

Modify certain BSEG fields from customary structured table

I'm trying to use following: update bseg from zbseg where tables are not from same length (ZBSEG is reduced version of BSEG). Whole idea is that BSEG is just an example, I have a loop where all cluster tables will be iterated, so everything should…
0
votes
2 answers

Group an internal table by multiple fields?

I have an internal table consisting the ff structure. SO Customer Materialno Materialgroup2 Liters 001 James 1 GroupA 5 001 James 2 GroupA 10 001 James 3 GroupB 20 002…
gwapo
  • 178
  • 2
  • 4
  • 28
0
votes
1 answer

Check for duplicated values in the internal table

How can I check the repetitive value in the "Form #" column? I want to highlight it later as duplicate record. LOOP AT ZVBELNEXTTAB WHERE werks IN werks. ZVBELNEXTTAB_COPY-WERKS = ZVBELNEXTTAB-WERKS. ZVBELNEXTTAB_COPY-MANDT =…
Ryan Lopez
  • 29
  • 1
  • 8
0
votes
3 answers

Why assignment is faster than APPEND LINES OF?

I'm currently learning ABAP and can anyone explain why t_table2 = t_table1 is significantly faster than APPEND LINES OF t_table1 TO t_table2? t_table1, t_table2 are internal tables
Mykola
  • 93
  • 1
  • 3
  • 11
0
votes
1 answer

How to compare two fields in same column in internal table? ABAP

How to compare fields in same column in internal table? ABAP Example to compare in column A: col A | col B A | B A | A A | A B | B B | B
Mykola
  • 93
  • 1
  • 3
  • 11
0
votes
1 answer

How to shuffle / randomize internal table in SAP

I have an internal table in my ABAP report, which consists of strings. Now I would like to shuffle the items in that table, i.e. randomize their order within the table. Is there any ABAP built-in or function module available to achieve this, or do I…
Matthias
  • 9,817
  • 14
  • 66
  • 125
0
votes
5 answers

COLLECT and MODIFY optimization for large itab

I have 2 parts of code. Both of them process 1,5 million records, but the first part is taking 20 minutes and the 2nd part is taking 13,5 hours!!!!!! Here is the 1st part: loop at it_bkpf. select * from bseg into corresponding fields of itab …
ekekakos
  • 563
  • 3
  • 20
  • 39
0
votes
1 answer

At change of kunnr delete lines or proceed

I have an itab which has the fields kunnr, bukrs, prodgrp & amound. I have the below lines: 150 1000 adsl 10 150 1000 adsl1 15 150 1000 adsl2 20 150 8000 vdsl 25 150 8000 vdsl1 10 200 1000 adsl1 80 200 1000 adsl2 80 I want to do the following:…
ekekakos
  • 563
  • 3
  • 20
  • 39
0
votes
3 answers

Modify an itab during looping another itab

I want to do the following Loop at itab into wa_itab. wa_itab2-field1 = wa_itab-field1. wa_itab2-field2 = wa_itab-field2. wa_itab2-field3 = wa_itab-field3. wa_itab2-field4 = wa_itab-field4. *how to insert in itab2 if fields 1,2 & 3 do…
ekekakos
  • 563
  • 3
  • 20
  • 39
0
votes
2 answers

How can I sum up or collect the data on the same field?

Hi ABAP users I would like to ask if what process I can make to COLLECT the data on the same field? all I want to do is to sum up or collect the data in dmbtr that belongs to same date, (date field monat) (werks to plant…
user7806296
  • 1
  • 2
  • 3
  • 6