I want to know how to handle the following situation in ABAP within Class programming,
DATA : BEGIN OF LCL_TRAN OCCURS 0,
TRAN TYPE STRING
END OF LCL_TRAN.
DATA : BEGIN OF LCL_PROD OCCURS 0,
PROD TYPE STRING,
END OF LCL_PROD.
DESCRIBE TABLE LCL_PROD LINES I_PROD.
LOOP AT LCL_MAIN.
READ TABLE LCL_PROD WITH KEY PROD = LCL_MAIN-PROD.
IF SY-SUBRC = 0.
I_MAIN = I_MAIN + 1.
AT END OF TRAN.
IF I_MAIN = I_PROD.
// I will do the necessary action here
At end of each transaction(Tran) which is a item level data i want to do some action. I need AT END OF statement to handle this situation.
How to handle this situation in CLASS (SE24)?