‎2006 Dec 28 8:11 AM
Hi,
i had read 3 fields(AUART FKARV FKARA.) data into itab.
now i want to check fkarv and fkara is initial.
what i am doing is reading single record into work area and checking
if wa-fkarv is initial.
append objky.
elseif wa-fkara is initial
append objky.
endif.
am i right?
can any one suggest me the better or it is ok.
Regards,
Ratna.
‎2006 Dec 28 8:15 AM
Hi,
Loop at internal table where fkarv ne space and fkara ne space.
Process the logic.
endloop.
Regards,
‎2006 Dec 28 8:16 AM
You mean to say
//now i want to check fkarv and fkara is initial.
1. if both are initial then you have to append the table is this ur criteria?
or
2. any "one" is initial then it has to append means either one of them.
if your option is 2. then your code it works .
if you want option 1 use "and" logic.
regards,
vijay.
‎2006 Dec 28 8:17 AM
SORRY CANNOT GET YOUR ACTUAL REQUIREMENT CAN SAY IT IN MORE ELABORATE WAY? WITH SOME MORE CODINGS
REGARDS
SHIBA DUTTA
‎2006 Dec 28 8:23 AM
Do in the following way.
loop at ITAB into wa
where wa-fkarv is initial.
do processing.
endloop.
loop at ITAB into wa
where wa-fkara is initial.
add you logic
endloop.
‎2006 Dec 28 9:00 AM
hi,
loop at itab where fkarv = ' ' or fkara = ' '.
if sy-subrc eq 0.
do append or what u want.
endif.
endloop.
regards.
‎2006 Dec 28 9:04 AM
Hi Ratna,
Instead of reading each record you can directly loop on it with where condition as
below.
clear wa.
loop at itab into wa where fkarv eq space and
fkara eq space.
do your processing here.
clear wa.
endloop.
Regards
Ashutosh
Reward points if helpful
‎2006 Dec 28 9:05 AM
1. If both are initial and u want to append the table , then u can use AND
loop at itab into wa.
if wa-fkarv is initial AND
wa-fkara is initial.
apend objky.
endif.
endloop.2. If any one of them is initial and u want to append the table then u can use OR
loop at itab into wa.
if wa-fkarv is initial OR
wa-fkara is initial.
apend objky.
endif.
endloop.