Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
1 answer
81 views

I see in many existing ABAP programs that standard internal tables are declared without key fields, for instance: TYPES type_itab TYPE STANDARD TABLE OF sflight WITH DEFAULT KEY. DATA itab_0 TYPE ...
Sandra Rossi's user avatar
1 vote
2 answers
383 views

Even though I am sorting the internal table LT_DATA by the FKDAT field, the POSNR field is still being sorted in an unexpected order. For example, in the original data of the internal table, POSNR ...
Prabhand Reddy's user avatar
0 votes
1 answer
315 views

In ABAP we can insert value into internal table with: insert wa into table my_table. Question is, if the name of my_table can only be determined at runtime, how to tackle it? Something like ...
user25604553's user avatar
5 votes
1 answer
301 views

As one probably knows we have such handy clause of MOVE-CORRESPONDING as EXPANDING NESTED TABLES: MOVE-CORRESPONDING: <m_source> TO <m_target> EXPANDING NESTED TABLES. What it basically ...
Suncatcher's user avatar
  • 10.6k
1 vote
1 answer
950 views

In a class based framework where a method (process_in_batch) in the parent class generates batches of data (for a given batch size) for any data coming from a method (prepare_data) redefined in each ...
ArK's user avatar
  • 33
0 votes
4 answers
7k views

Suppose if I have a statement like this: select * from city into table it_city_table for all entries in it_metropolitans where city_id eq it_metropolitans-city_id and winter ne 'cold'. Now if ...
user11074048's user avatar
0 votes
3 answers
6k views

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 ...
user14674462's user avatar
0 votes
1 answer
1k views

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 (...
user14674462's user avatar
0 votes
1 answer
742 views

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 <...
trapvader23's user avatar
0 votes
3 answers
4k views

Can you avoid the nested loop on these two internal tables? DATA: t_fieldcat TYPE slis_fieldcat_alv, t_fcat TYPE kkblo_t_fieldcat. LOOP AT T_FIELDCAT INTO LX_FIELDCAT. LOOP AT T_FCAT INTO ...
Bigflatfoot's user avatar
0 votes
1 answer
1k views

I need to flag the duplicate fields in a table but sy-tabix is always increasing. I expect for every knum group, a 1 in sy-tabix. Here is the code. sort result_package stable by knumh zzklfn1. loop ...
trapvader23's user avatar
1 vote
1 answer
14k views

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 ...
CoderW's user avatar
  • 123
4 votes
1 answer
7k views

Let's say I have a table quants and want to find out if any line exists, where the field lenum is not initial. The table is declared inline using a select statement, so I do not have a key available. ...
Kevin Holtkamp's user avatar
2 votes
1 answer
104 views

I have some example code below: DATA(t_strings) = VALUE char10_t( ( 'S1' ) ( 'S2' ) ( 'S3' ) ). TYPES : BEGIN OF gty_ref, string_ref TYPE REF TO data, END OF gty_ref, ...
mmgro27's user avatar
  • 515
1 vote
2 answers
6k views

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->...
Ikim SS's user avatar
  • 159
1 vote
1 answer
5k views

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 ...
AbapDesign4Future's user avatar
-1 votes
2 answers
9k views

I'm learning ABAP at the moment and got the task to build a function that creates a .txt file or a .csv file from an internal table and save it on the application server. I know you can use, for ...
Marrome's user avatar
0 votes
2 answers
8k views

Is it possible to mix in a FOR with CONCATENATE along with BASE statement? Normally, itab1 = VALUE #( BASE itab1 ( value1 ) ) will append line1 into itab1 without overwriting. Shouldn't it be the same ...
isekaid_maou's user avatar
3 votes
1 answer
36k views

I want MOVE fields from itab1 to itab2 based on their field names. I have tried following: CLEAR itab2. MOVE-CORRESPONDING itab1 TO itab2. This is working out, but only as long as the FIELDS are ...
B0BBY's user avatar
  • 1,119
0 votes
1 answer
6k views

First: I'm working on a existing code and want to add some new stuff to it and I'm really new to ABAP My goal: I want to duplicate an existing table and remove all values that occur multiple times. ...
B0BBY's user avatar
  • 1,119
0 votes
2 answers
17k views

I have created internal tables where I want to update age of employee in one internal table by calculating it from another table, I have done arithmetic calculations to get age but now how can I ...
sumedh patil's user avatar
1 vote
2 answers
6k views

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. ...
sumedh patil's user avatar
0 votes
1 answer
9k views

I have an Excel (.xlsx) file stored in a known path in AL11 which consists of, let's say, 20 columns and 51 rows of data (one of those rows is the column description which is already known to me ...
Stephon_Gordon's user avatar
1 vote
1 answer
2k views

I'm interviewing for a job, and on the test they sent me they provided the following image of 2 ABAP loops on an internal table, and asked which loop will execute faster: After checking heavily on ...
Yuval Moshe's user avatar
3 votes
1 answer
8k views

Suppose I have 2 internal tables: TYPES:BEGIN OF LTY_FILE, SOKEY TYPE CHAR5, SOPONO TYPE CHAR15, SOCONO TYPE CHAR15, FLAG TYPE C, END OF LTY_FILE. data:IT_ARCHIVE ...
CoderW's user avatar
  • 123