01-18-2008 10:09 AM
Hi,
this is my code:
types: begin of type_s1,
num type n,
name(2) type c,
end of type_s1.
types: begin of type_s2,
num type n,
name1(2) type c,
mark type n,
end of type_s2.
****itab
data: t_s1 type type_s1,
t_s2 type type_s2.
retrieved data for t_s1.
retrieving data for t_s2 here the cond is
num = t_s1-num.
the error its giving is t_s1 is a itab without header line so no num in that.
i am not getting this.
regards,
kb
01-18-2008 10:43 AM
Hi,
sort <first itab> by <key field>.
if <first itab>[] is not initial.
select f1 f2 f3 f4 f5 f6
from <db table name> into table <your second itab>
for all entries in <first itab>
where <key field> = <first itab - key field>.
endif.
Thanks,***************************************"reward if it is useful"
Sayak
01-18-2008 10:11 AM
01-18-2008 10:12 AM
Hi,
types: begin of type_s1,
num type n,
name(2) type c,
end of type_s1.
types: begin of type_s2,
num type n,
name1(2) type c,
mark type n,
end of type_s2.
****itab
data: t_s1 type table of type_s1,
t_s2 type table of type_s2.
data: wa_s1 type type_s1,
wa_s2 type type_s2.
retrieved data for t_s1 into wa_s1.
retrieving data for t_s2 here the cond is
num = wa_s1-num.
regards,
Santosh Thorat
01-18-2008 10:19 AM
Hi,
You can try like this...
******************************************************************************************************************************
--
data: wa_type_s1 type type_s1,
wa_type_s2 type type_s2.
--
data: it_type_s1 type table of type_s1,
it_type_s2 type table of type_s2.
*********************************************************************************reward if it is useful*********************
Thanks,
Sayak
01-18-2008 10:32 AM
Hi,
wht i have done is the same thing.
types: begin of type_s1
..
..
then work area
data: w_s1 type type_s1.
..
....
then itab
data: t_itab type table of type_s1.
...
...
then retrieval into first itab
now sec
select matnr mbrsh from mara into table t_itab2
where matnr = t_itab-matnr.
its giving error t_itab is not with hl so no matnr.
pls help its urgent
regards,
kb
01-18-2008 10:35 AM
Hi,
you are missing for all entries.
do like this
select matnr mbrsh from mara into table t_itab2
for all entries in t_itab
where matnr = t_itab-matnr.
pankaj
01-18-2008 10:42 AM
01-18-2008 10:44 AM
can you please post your entire code (till where u get the error )
01-18-2008 10:26 AM
Hi,
ur declaration
types: begin of type_s1,
num type n,
name(2) type c,
end of type_s1.
as above will create only a work area, it is not an internal table with header line.
change it to this
types: begin of type_s1 occurs 0,
num type n,
name(2) type c,
end of type_s1.
Regards,
Soumya.
01-18-2008 10:43 AM
Hi,
sort <first itab> by <key field>.
if <first itab>[] is not initial.
select f1 f2 f3 f4 f5 f6
from <db table name> into table <your second itab>
for all entries in <first itab>
where <key field> = <first itab - key field>.
endif.
Thanks,***************************************"reward if it is useful"
Sayak
01-18-2008 11:43 AM