‎2009 Feb 18 7:21 PM
Hi All,
I am working on a report... in that particular report there are many places where the code has been written as follows:
SELECT *
APPENDING CORRESPONDING FIELDS OF TABLE t_zztest
FROM zztest
where lgort = s_lgort.
sort t_zztest by lgort.
DATA BEGIN OF T_ZZtest OCCURS 0.
INCLUDE STRUCTURE ZZtest.SO I was just wondering if rather than using the appendind statment...
can I write like this..
SELECT *
APPENDING TABLE t_zztest
FROM zztest
where lgort = s_lgort.
sort t_zztest by lgort.
binary search. " can I add this
Thanks,
Rajeev
‎2009 Feb 18 7:24 PM
if table t_zztest and DB table zztest are of same structure you can do that..
another altenative... append lines of itab1 to itab2... itab1 and 2 need to be of same structure... least performance cost.
‎2009 Feb 18 7:24 PM
if table t_zztest and DB table zztest are of same structure you can do that..
another altenative... append lines of itab1 to itab2... itab1 and 2 need to be of same structure... least performance cost.
‎2009 Feb 18 7:27 PM
yes,move corresponding is used when there is type mismatch in the structure of db table and internal talble...or you just want to move some fields of db table to some field of internal table...
if this is not cse and both have ame structure..avoid move corresponding
‎2009 Feb 18 7:25 PM
Rather than asking the forum (you haven't given enough information), you should just try it.
Rob
‎2009 Feb 18 7:30 PM
Hi,
I think it will be more efficient if you use like following,
Data: it_zztest LIKE STANDARD TABLE OF zztest with header line.
SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zztest
FROM zztest
where lgort = s_lgort.Kind Regards,
Faisal