Skip to Content
0
May 12, 2005 at 11:08 PM

"AT END OF" in Class Programming

19 Views

Hi,

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.

ENDIF.

AT END OF TRAN.

IF I_MAIN = I_PROD.

// I will do the necessary action here

ENDIF.

ENDAT.

ENDLOOP.

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)?

Thank you

Arun Prasad