cancel
Showing results for 
Search instead for 
Did you mean: 

amdp select in a loop syntax

marco_sposa
Participant
0 Kudos
2,454

Hello expert, i'm facing an error in an amdp method while i'm a loop , i'm trying make a selection i do have a syntax error table cell access not allowed here and i don't know how to avoid it.

Any clue please?

i'm trying to emulate

 loop itab assign <fs>
select b1 b2 from dbtable where field1 = <fs>-field1 etc...
endloop.
for lv_index in 1..record_count( :lt_fmifiit )do
      if (:lt_fmifiit.btart[ :lv_index ]) = '100' then
      lt_bseglog = select * from ZFI_BSEG_LOG as t1 where
       t1.bukrs = :lt_fmifiit.bukrs[ :lv_index ] and
       belnr = :lt_fmifiit.belnr[ :lv_index ];
      end if;

Accepted Solutions (1)

Accepted Solutions (1)

marco_sposa
Participant
0 Kudos

I solved it by declaring

DECLARE lv_bukrs  "$ABAP.type( bukrs )"; 
DECLARE lv_belnr "$ABAP.type( belnr_d )";

then

      lt_bseglog = select * from ZFI_BSEG_LOG as t1 where
t1.bukrs = :lv_bukrs and
t1.belnr = lv_belnr;

Answers (0)