Application Development 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: 

Number fields of Internal table based on unique identifier

Former Member
0 Kudos

Hi,

I am trying to assign numbers to transports which are all assigned to the same program (literally give a number to the program every time it comes up) i.e:

1. DR1KXXX1 z_name1

2. DR1KXXX2 z_name1

1. DR1KXXX3 z_name2

I want to assign DR1KXXX1 and DR1KXXX2 number 1 and 2 because they are associated with the same program. Then I want DR1KXXX3 to be assigned 1 again because it is associated with a different program.

The end goal of this is to have each transport assigned a number so that I can then filter or sort the internal table so that I only return programs with more than a specified number of transports.

I have tried using DELETE ADJACENT DUPLICATES FROM...COMPARE but that didnt really work. I am thinking that I need to:

LOOP AT itab1 into itab2 WHERE program_name NE itab2-program_name

and then do some kind of IF statement. Im really not sure though. Any help is appreciated.

0 REPLIES 0