Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

internal table

Former Member
0 Likes
578

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 ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
536

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.

4 REPLIES 4
Read only

Former Member
0 Likes
536

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

Read only

0 Likes
536

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.

Read only

Former Member
0 Likes
537

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.

Read only

Former Member
0 Likes
536

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