Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8594

Re: Trimming internal table based on criteria

$
0
0

Hi,

 

Try below logic

 

DATA : lv_cnt TYPE int4.

SORT itab1 BY user terminal.

LOOP AT itab1 INTO lwa_itab.

wa_itab = lwa_itab.

AT NEW user.

* Clear the variable for every new User
CLEAR : lv_cnt.
ENDAT.

 


AT END OF terminal.

* Increment the counter after end of terminal
lv_cnt = lv_cnt + 1.

IF lv_cnt > 1.

* If user logs in morethan one terminal lv_cnt will be GE 1
APPEND wa_itab TO itab2.

ENDIF.


ENDAT.


CLEAR : lwa_itab, wa_itab.
ENDLOOP.

 

itab2 will have ur required list.

 

 

Thanks & Regards

Bala Krishna


Viewing all articles
Browse latest Browse all 8594

Trending Articles