‎2007 Feb 07 6:03 AM
hi experts,
I want to retreive data from table lfc1 for all entries in onther table.
There is my select query:
data: yellow type string.
yellow = '@5C@'.
select lifnr
bukrs
gjahr
from lfc1
into table lt_lfc1 for all entries in gt_outtab
where lifnr = gt_outtab-lifnr and
bukrs = gt_outtab-bukrs and
gt_outtab-id in ( yellow ).
The gt_outtab has a field as ID which holds value @5C@, @5D@ and @5B@.
I want retreive data only for records with ID as @5C@.
How can i do this ?
‎2007 Feb 07 6:09 AM
Hi
On option would select as you have mention in ur query .
In the your select which is the field matching with gt_outtab-id field.
Delete table lt_lfc1 where id <> @5C@.
This will fetch those records .
Please reward if useful.
‎2007 Feb 07 6:06 AM
Hi,
yellow = '@5C@'.
get the records based on the condition gt_outtab-id = yellow into gt_outtab.
select lifnr
bukrs
gjahr
from lfc1
into table lt_lfc1 for all entries in gt_outtab
where lifnr = gt_outtab-lifnr and
bukrs = gt_outtab-bukrs and
<b>gt_outtab-id = yellow .</b> remove this and use the same in first itab.
Thanks
Shiva
‎2007 Feb 07 6:09 AM
Hi
Its a very good option.But i need the gt_outttab for furthrer use also.And making another internal table will hamper performance issue.Is it not possible to give hard coded values in select statement or by soemother way.
‎2007 Feb 07 6:09 AM
Hi
On option would select as you have mention in ur query .
In the your select which is the field matching with gt_outtab-id field.
Delete table lt_lfc1 where id <> @5C@.
This will fetch those records .
Please reward if useful.
‎2007 Feb 07 6:10 AM
gt_out1[] = gt_outtab[].
delete gt_out1 where id ne yellow.
select lifnr
bukrs
gjahr
from lfc1
into table lt_lfc1 for all entries in gt_out1
where lifnr = gt_out1-lifnr and
bukrs = gt_out1-bukrs .
regards
shiba dutta