Skip to Content
Former Member
Aug 04, 2009 at 12:45 PM

update itab2 with ref to itab1


Hi all,

Here i have the situation as below, itab2 fields should be updated with 'X' if the corresponding field has value in the itab1. I dont want to write a code to check each field one by one, i hope we need to use field symbols, but i dont have much exp on that. Can some one look in to this. Thanks in advance.

data: begin of itab1 occurs 0, 
        f1(10) type c, 
        f2(10) type c, 
        f3(10) type c, 
        f4(10) type c, 
      end of itab1. 
data: begin of itab2 occurs 0, 
        f1     type c, 
        f2     type c, 
        f3     type c, 
        f4     type c, 
      end of itab2.       
      itab1-f1 = 'TEST1'. 
      itab1-f2 = 'TEST1'. 
      itab1-f4 = 'TEST1'. 
   append itab1. clear itab1.    
      itab1-f1 = 'TEST2'. 
      itab1-f3 = 'TEST2'. 
      itab1-f4 = 'TEST2'. 
   append itab1. clear itab1.