Use this tag for questions regarding ABAP internal tables.
Questions tagged [internal-tables]
141 questions
1
vote
1 answer
Loop at and sy-subrc relation
I have this problem during loop statement.
I have a loop:
loop at lt assigning where (im using loop instead of reaf table coz i need to use GE and LE logical statements)
if sy-subrc = 0.
result = -FIELD.
else.
…

Kvazzar
- 19
- 1
- 2
1
vote
1 answer
Table of all combinations possible with combination id
Here come a little ABAP challenge:
For an ABAP projet, i must build from an internal table with 2 columns (example1) another table containing all combinations possibles (example2).
"X" columns represent the parameter. "Y" represent the parameter…

DevJoe13
- 23
- 6
1
vote
4 answers
Delete duplicates in a loop?
I have a table with some data:
101
101
102
101
102
103
103
and I need to delete duplicates like this:
101
102
101
102
103
but in this case I cant use delete adjacent duplicates.
What can I do?

alexander.skibin
- 133
- 1
- 2
- 15
1
vote
5 answers
Speedup long running loop in ABAP
When analysing a performance issue in an SAP export script (SAP R/3, 4.06b) I found the following code which runs about 10 minutes in the test system. Might be a bit faster in production but I can not test it there.
LOOP AT ZMARD.
LOOP AT ZCOMB.
…

dhh
- 4,289
- 8
- 42
- 59
1
vote
2 answers
Nested grouping in internal table
I would like to get all lines, which have different entries to fields anln1 and anln2.
For this I need a fitting OpenSQL statement.
E.g. there is the following table:
anln1 | anln2 | datum | psp |…

K B
- 1,330
- 1
- 18
- 30
1
vote
1 answer
Operating on internal tables with header line
I have a question about internal tables' header line.
I assigned some values into in_table1 and then try to add a record with APPEND command into in_table2 in the following block of code.
But I cannot see the record that I have appended into…

user3069768
- 15
- 1
- 3
1
vote
3 answers
Aggregating rows
In sap I have a table, there are rows with the same name but with different quantity.
I want to summarize this rows like this:
SELECT c~aufnr
p~matnr p~bdter p~meins p~baugr p~dbskz p~erfmg p~aufnr
f~maktx
INTO…

alexander.skibin
- 133
- 1
- 2
- 15
1
vote
1 answer
How to Send Internal table to SAP Spool using ABAP Class Method
I want to use ABAP class and it's method to send internal table to a spool.
Please help.
I don't want to use any Function Module, because it is strictly prohibited for my software.

Piyush Aggarwal
- 172
- 3
- 11
1
vote
2 answers
How to import SQL Server table to itab?
is it possible to import data in SQL Server table to internal table (itab) directly?
I want to use this itab in a SE37 function. thanks in advance

Kasanova
- 593
- 4
- 12
- 27
1
vote
3 answers
Filling itab value from another itab
I have an internal table itab which has some rows that one component of the rows matnr is empty. I want to check the palet column of the internal table and get matnr according to palet from the zlldet table, and then change the matnr column of…

Mtok
- 1,600
- 11
- 36
- 62
0
votes
1 answer
Downloading as .txt including header,internal table footer with specific path
i have a specifix path like C://asd , an internal table itab, and a footer and header.
I tried to use GUI_DOWNLOAD but, i can only send an internal table to this function.
I need to download these things .txt like this format
** The account…

iostd
- 3
- 2
0
votes
3 answers
Read internal table - field symbol has not been assigned yet
I have wrote this small piece of code which updates the data in it_alv based on values in another internal table it_alv_to_check.
At some point while executing the code in the ELSE statement block, I got the error:
field symbol has not been…

user14674462
- 1
- 4
0
votes
1 answer
Clearing rows of dynamic internal table with empty value in one column
I am trying to remove rows that have empty values in one column segment. The table is declared dynamically so it does not have a standard type that I can use in DATA declaration like I used to do (DATA table_x TYPE BSEG).
I tried to create structure…

user14674462
- 1
- 4
0
votes
2 answers
What would be the best way to insert records with ABAP to a custom table
I have a table in SAP called ZDT_COUNTRY with the following fields:
MANDT (type: NUMC)
ID_PAIS (type: NUMC)
NAME_PAIS (type: CHAR)
CAPITAL_PAIS (type: CHAR)
POBLACION_PAIS (type: NUMC)
SURFACE_PAIS (type: NUMC)
CURRENCY_COUNTRY (type:…

gabriel gavaz
- 11
- 1
0
votes
1 answer
ABAP flag duplicate values in internal table
I need to flag the duplicate values and I found a solution using the code below:
sort result_package stable by knumh zzklfn1.
data lv_prev_knumh type c length 10.
loop at result_package assigning .
if -knumh <>…

trapvader23
- 3
- 3