2008 Mar 25 6:16 AM
hi,
itab having txz01 and bukrs field , bukrs having data.
can i do like this to fetch data for txz01 for all bukrs having in same itab.
is this correct to fetch data?
select txz01 from ekpo
into corresponding fields of table gt_item
for all entries in gt_item
where bukrs = gt_item-bukrs
2008 Mar 25 6:25 AM
Hi,
syntactically there is no wrong.
but, if u use like this ur previous data in that itab will we cleared off and new selected data only will present.
rgds,
bharat.
syntactically correct. but you will end up fetching the same data. copy to a temp table and then moce back to the original one.
2008 Mar 25 6:25 AM
Hi,
syntactically there is no wrong.
but, if u use like this ur previous data in that itab will we cleared off and new selected data only will present.
rgds,
bharat.
2008 Mar 25 6:29 AM
i dont think so you can do like this..
you have to use read statemnt
2008 Mar 25 6:35 AM
Hi,
Make use of below alternatives........
if not gt_item[] is initial.
select txz01 from ekpo
into corresponding fields of table gt_item1
for all entries in gt_item
where bukrs = gt_item-bukrs.
endif.
else.
if not gt_item[] is initial.
select txz01 from ekpo appending
into corresponding fields of table gt_item
for all entries in gt_item
where bukrs = gt_item-bukrs.
endif.
Reward if useful..........................
2008 Mar 25 6:35 AM
syntactically correct. but you will end up fetching the same data. copy to a temp table and then moce back to the original one.
2008 Mar 25 6:41 AM
Hi,
You are having BUKRS values in table gt_item. so you want txz01 field in gt_item in same table.
bettere declare another internal table gt_item01 of same type of gt_item.
loop at gt_item.
move-corresponding gt_item to gt_item01.
append gt_item01.
endloop.
here you have bukrs in gt_item01.***
loop at gt_item..
select txz01 from ekpo
into corresponding fields of table gt_item01
where bukrs = gt_item-bukrs
modify gt_item01 index sy-tabix transporting txz01.
endoop.
Now in table gt_item01 you have field values of both bukrs and txz01.
try this once....
<b>reward if useful</b>
Regards,
sunil kairam.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |