‎2008 Jun 19 5:46 AM
Hi Gurus,
Please solve this problem.
Hi One internal table with field message,This table having 20 or 30 lines of text.
I have to compare this text with one data base table having field message having text.
if the text that is matches first, i want to display that in output.
how i comepare these texts.
THanks/radha.
‎2008 Jun 19 5:51 AM
Hi Radha,
For this type of scenario lets say suppose we have populated two internal table
itab1 ---> messages contains 20 to 30 lines.
Itab2 -
> fetch from the database.
Now what you have to do is
Loop at itab2.
Read table itab1 with key message = < message>
If sy-subrc = 0.
write:/ itab2-message.
endif.
Endloop.
‎2008 Jun 19 5:49 AM
Hi,
loop at itab1 into wa.
read table db_table with key text = wa-msg.
if sy-subrc = 0.
write: wa-msg.
endif.
endloop.
Regards,
Subramanian
‎2008 Jun 19 5:51 AM
Hi Radha,
For this type of scenario lets say suppose we have populated two internal table
itab1 ---> messages contains 20 to 30 lines.
Itab2 -
> fetch from the database.
Now what you have to do is
Loop at itab2.
Read table itab1 with key message = < message>
If sy-subrc = 0.
write:/ itab2-message.
endif.
Endloop.
‎2008 Jun 19 5:51 AM
Hi Radha,
For this type of scenario lets say suppose we have populated two internal table
itab1 ---> messages contains 20 to 30 lines.
Itab2 -
> fetch from the database.
Now what you have to do is
Loop at itab2.
Read table itab1 with key message = < message>
If sy-subrc = 0.
write:/ itab2-message.
endif.
Endloop.
‎2008 Jun 19 6:09 AM
Hi Chidanad,
My problem is the text in internal table having 255 characters like that.
but the text in database table having part of internal table text may be 120 characters.
and the text in data base table is started in internal table in middile.
please give me solution urgently.
Thanks/Radha.
‎2008 Jun 19 6:10 AM
Hi,
Then try comparing like this:
IF int_table_str CS db_table_str.
write:.....
endif.
Regards,
Subramanian
‎2008 Jun 19 6:12 AM
hi,
use the string comparing function 'CS'
if itab-field CS dbtab-field.
write itab-field.
endif.
regards
prasanth
‎2008 Jun 19 6:16 AM
Hi Subramaninan,
with write statement we are writing text to list but it is having space infront of the text,
How we delete the space infront of text before write statement.
eg: -
rama.
here assume '----
' this is pace.
‎2008 Jun 19 6:18 AM
hi,
try the statemnt CONDENSE text [NO-GAPS].
or
write addition left-justified
regards
‎2008 Jun 19 6:18 AM