02-07-2017 8:49 AM
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.