Hi,
I have written the logic for below requirement
1.Check if operating concern(I_ERKRS) is 0001 than go to step 2 else go to step
2.Read each record of T_Item which is of structure CE10001 table and verify
the value for item category(CE10001-PSTYV) .
3. If the item Category (CE10001-PSTYV) is TAS Than change Warehouse cost value field (CE10001-VV504) value to 0.00 irrespective of its current value).
Else dont change value of warehouse cost value field(CE10001-VV504).
4.Exit from the function module.
<b>Code is :</b>
DATA: ce1_0001 LIKE ce10001.
CASE i_erkrs.
WHEN '0001'.
LOOP AT t_item.
MOVE-CORRESPONDING t_item TO ce1_0001.
IF ce1_0001-pstyv = 'TAS'.
ce1_0001-vv504 = '0.00'.
ENDIF.
MOVE-CORRESPONDING ce1_0001 TO t_item.
MODIFY t_item FROM t_item.
ENDLOOP.
ELSE.
EXIT.
ENDCASE.
But it is showing error is NO open "IF" statement.
why it is showing error.Please give me suggestions,where i have change the code.
Thanks,
sudhakar