i am filling a internal table like this
loop at i_0001 into s_0001.
out_final-pernr = s_0001-pernr.
out_final-parea = s_0001-parea.
loop at i_0021 into s_0021 where pernr = s_0001-pernr and subty ne '7'.
loop at i_0106 into s_0106 where pernr = s_0001-pernr and subty ne '7'.
append out_final to i_final.
and my performs are
read table i_0021 into s_0021 with key pernr = s_0001-pernr.
out_final-fname = s_0021-fname.
out_final-lname = s_0021-lname.
out_final-bdate = s_0021-bdate.
ENDFORM. " rec1
read table i_0106 into s_0106 with key pernr = s_0001-pernr.
out_final-ssn = s_0106-ssn.
out_final-add1 = s_0106-add1.
out_final-add2 = s_0106-add2.
out_final-city = s_0106-city.
out_final-state = s_0106-state.
out_final-country = s_0106-country.
out_final-zip = s_0106-zip.
out_final-hphone = s_0106-hphone.
ENDFORM. " rec2
all my declerations and syntax are correct
now i have 2 simple things to ask
1. when i write data i get duplicate records ....is my loop , clear and append are in right place
2. i wan to delimit this data for a condition where bdate is greater than 18. bdate is of type p0021-fgbdt which i have to format using some FM....how do i do that where do i have to add code for that.
thanks in advance