hi this is my sample code can u tell me where and how to put my code for clearing and refresh work areas and internal table!! i have never used them before.
kostl = bseg-kostl AND prctr = bseg-prctr.
IF sy-subrc EQ 0. "if rows are returned
SORT gi_cstctr BY hkont. "sorting the internal table.
*if cost centers are there in the internal table then loop the internal table into corresponding work area and if the G/L account matches any costcenter in the table
IF NOT gi_cstctr IS INITIAL.
LOOP AT gi_cstctr INTO gw_cstctr.
IF gw_cstctr-hkont EQ lv_hkont.
lv_flag = gc_x.
EXIT. "set the flag to x