Skip to Content
0
Former Member
Oct 18, 2006 at 08:19 AM

Select Statement

32 Views

if product_search-resp_product_company IS NOT INITIAL.

SELECT zzrefeng

zzcrmgroup

FROM zcs_soltype

INTO TABLE i_zcs_soltype

WHERE zzcrmgroup in r_zzcrmgroup.

if not i_zcs_soltype[] is initial. ---> Here I have around 16 records.

now for each value of zzrefeng i need to select the below fields. Finally i need all the records to be updated in i_equi table. Can anyone help me out in writing the code for this. For each ZZREFENG value i am able to get the records in i_equi but finally those are ovewriting.

loop at i_zcs_soltype into w_zcs_soltype.

SELECT a~equnr

a~zzengn

a~zzrefeng

a~eqtyp

a~objnr

b~stat

into TABLE i_equi

FROM equi AS a INNER JOIN jest AS b

ON aobjnr = bobjnr

WHERE a~zzengn IN r_zzengn AND

a~equnr IN r_equnr AND

a~zzrefeng = w_zcs_soltype-zzrefeng AND

a~eqtyp IN r_eqtyp AND

eqtyp IN ('A','D','E','G','H','I','J','K','L','N','O','R','T') AND

b~stat <> 'I0076' AND

b~inact = space .

endloop.

endif.

endif.