Hi Gurus!
Could anyone please let me know what exactly is the problem with my this part of code , its giving me syntax errors saying tables with header lines not supported with OO concept.
The parameters used here are:
IV_KNUMV Importing Type KNUMV
IV_KPOSN Importing Type KPOSN
RV_IS_LIST Returning Type ZPRICE_TYPE
data: lv_kotabnr type c length 15.
data: begin of it_konv occurs 0,
KINAK type konv-kinak,
KSCHL type konv-kschl,
KOLNR type konv-kolnr,
end of it_konv ,
begin of it_t685 occurs 0,
kozgf type t685-kozgf,
end of it_t685 ,
begin of it_t682i occurs 0,
kotabnr type t682i-kotabnr,
kolnr type t682i-kolnr,
kozgf type t682i-kozgf ,
end of it_t682i ,
begin of it_price occurs 0,
ZPRICE_TYPE type zsd_price_type-ZPRICE_TYPE,
end of it_price .
*************************************************************************************
* In all select Queries, fields sequence in WHERE clause should match with that in
* database table. This will improve the performance
*************************************************************************************
refresh it_konv.
select KINAK
KSCHL
KOLNR
from konv
into table it_konv
where kinak = ' '
and knumv eq iv_knumv
and kposn eq iv_kposn .
check not it_konv[] is initial.
refresh it_t685.
select kozgf
into table it_t685
from T685
for all entries in it_konv
where kappl = 'V'
and kschl = it_konv-kschl.
if sy-subrc eq 0.
refresh it_t682i.
Loop at it_konv.
Loop at it_t685 where kschl = it_konv-kschl.
move : it_konv-kolnr to it_t682i-kolnr,
it_t685-kozgf to it_t682i-kozgf.
append it_t682i.
endloop.
endloop.
select kotabnr
kolnr
kozgf
into table it_t682i
from T682I
for all entries in it_t682i
where kappl = 'V'
and kolnr eq it_t682i-kolnr
and kozgf eq it_t682i-kozgf.
if sy-subrc eq 0.
select ZPRICE_TYPE
into table it_price
from zsd_price_type
for all entries in it_t682i
where kotabnr = it_t682i-kotabnr .
***************** Set IS_LIST based on your condition *****************
Loop at it_price where ZPRICE_TYPE is initial .
exit.
endloop.
endif.
endif.
endmethod.
Thanks