01-17-2008 5:47 AM
SELECT VTEXT FROM TVKGGT
INTO CORRESPONDING FIELDS OF TABLE t_tvkggt
WHERE KDKGR = itab-kdkg1.
read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.
itab-vtext2 = t_tvkggt-vtext.
I am getting corresponding values of vtext where itab has
values of kdkgr and also doesnt have any values of kakgr.
how to remove those values of vtext which doesnt have any value for kdkgr.
01-17-2008 5:51 AM
How about using DELETE statement before the READ.
DELETE t_tvkggt WHERE kakgr IS INITIAL.
READ TABLE....
Kind Regards
Eswar
01-17-2008 5:57 AM
01-17-2008 6:02 AM
Have few doubts on your statement:
read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.
How is t_tvkggt-kdkgr populated, if it is populated is it only the value of this field populated or the whole structure populated.
When using BINARY SEARCH addition with READ statement, make sure the internal table is sorted.
Regards
Eswar
01-17-2008 6:04 AM
Hi,
SELECT VTEXT FROM TVKGGT
INTO CORRESPONDING FIELDS OF TABLE t_tvkggt
WHERE KDKGR = itab-kdkg1.
if sy-subrc = 0.
delete t_tvkggt where vtext is initial.
sort t_tvkggt by kdkgr.
read table t_tvkggt with key kdkgr = t_tvkggt-kdkgr binary search.
itab-vtext2 = t_tvkggt-vtext.
endif.
Regards,
Sooness
01-17-2008 6:17 AM
Hi,
select * from mara
into table i_tab
where matnr = 'ACC CABLE'.
loop at i_tab where bstme NE ' ' .
endloop.
Check out with this one and inside loop ,
you can transfer only those records which have bstme value.
Apply for you case.
Reward if helpful/.
Thanks,
Madhura
Edited by: Madhura Nadgauda on Jan 17, 2008 7:19 AM