‎2005 Nov 09 3:25 PM
Hi Friends,
I am not an expert in ABAP, but I seem to have a weird problem with the following piece of code. When I uncomment the write statement in the first loop code and execute, it actually displays values for
itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
But
when I have the code exactly as shown below, it displays just the itab_zsel-zdate1, itab_zsel-ztime1 and not itab_zsel-zvar_log
Can you tell me wht is wrong with this code?
****************************************************
itab_log and itab_sel are internal tables
****************************************************
loop at itab_log.
loop at itab_zsel where zdate1 = itab_log-zbatchdate and zhr = itab_log-zhrmin.
itab_zsel-zvar_log = itab_log-zlogid.
modify table itab_zsel.
*write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
endloop.
endloop.
loop at itab_zsel.
write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zvar_log.
endloop.
***********************************************
Thank you
‎2005 Nov 09 3:32 PM
Seems your internal table is not getting modified with your code.
Just replace
MODIFY TABLE itab_zsel.
with
MODIFY ITAB_ZSEL.
Cheers.
Sanjay
‎2005 Nov 09 3:30 PM
Hi Deepthi,
I did not understand what you are trying to do,
but try this and see if it helps
loop at itab_log.
clear lw_tabix.
lw_tabix =sy-tabix.
read table itab_zsel with key zdate1 = itab_log-zbatchdate zhr = itab_log-zhrmin.
if sy-subrc = 0.
itab_zsel-zvar_log = itab_log-zlogid.
modify itab_zsel index lw_tabix.
*write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zhr, itab_zsel-zvar_log.
endif.
endloop.
loop at itab_zsel.
write:/ itab_zsel-zdate1, itab_zsel-ztime1, itab_zsel-zvar_log.
endloop.
***********************************************
Regards,
Ravi
‎2005 Nov 09 3:32 PM
Seems your internal table is not getting modified with your code.
Just replace
MODIFY TABLE itab_zsel.
with
MODIFY ITAB_ZSEL.
Cheers.
Sanjay