Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update internal table data based on non key field

0 Likes
1,383

Hi All,

I have the data in internal table it_tab1 as below. it_tab1 is type standard table of DB table having PO number is key field.

I want the it_tab1 should have only the PO number for which having type as 'E' or 'A'. The table should have the data as below.

We can achieve it by doing loop and read statements but is there a way that we can achieve in advanced ABAP using latest syntaxes ?

Hi All,

I have the data in internal table it_tab1 as below. it_tab1 is type standard table of DB table having PO number is key field.

I want the it_tab1 should have only the PO number for which having type as 'E' or 'A'. The table should have the data as below.

We can achieve it by doing loop and read statements but is there a way that we can achieve in advanced ABAP using latest syntaxes ?

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
1,305

If you mean "latest syntaxes" are the constructor expressions (to "construct", not to "update"), then the question is do you really want to have code less performing? (re-create the internal table from scratch is slow if it's about to re-create 1 million lines - versus just update a few lines).

Read only

MateuszAdamus
Active Contributor
0 Likes
1,305

Hello

What is wrong with the "old" syntax?

Kind regards,
Mateusz
Read only

joltdx
Active Contributor
1,305

If this is about you wanting to learn and experiment with newer syntax and get a better understanding of ABAP, this should be encouraged. But please be clear about that, or if this is some kind of business requirement that you don't know how to solve...

To learn, it can be a good exercise to do the same thing in the "old" way and the new way in order to learn. If you want us to help you, please show us how you would solve this the "old" way, and we might be able to give you some tips or ideas or alternate ways of doing things...