2016 Jan 08 7:41 AM
Hi ,
Am having 3 internal tables.Each table contains constant texts ,Suppose if the table having different text means i want to display error.
For example,
itab = 'abc-year'
'bcd-year'
these are two constant texts,suppose if the internal table contains'
itab = 'xxx-year'
'bcd-year' means i have to display error text is wrongly maintained..
Anyone suggest please how to do this.
2016 Jan 08 8:34 AM
Loop at Itab INTO wa_tab.
IF wa_tab-value NE constant_text.
WRITE 'Invalid Text'.
ENDIF.
Endloop.
2016 Jan 08 8:50 AM
Hi,
If you want to compare the constants from all 3 tables then you can do it in following manner .
LOOP AT ITAB1 INTO WA1.
READ TABLE ITAB2 INTO WA2 WITH KEY TEXT = WA1-TEXT.
READ TABLE ITAB3 INTO WA3 WITH KEY TEXT = WA1-TEXT.
IF WA1-TEXT <> WA2-TEXT OR WA1-TEXT <> WA3-TEXT.
WRITE : 'ERROR'.
ENDIF.
ENDLOOP.
Regards,
Vishal