2007 Apr 20 7:53 AM
Hi,
My internal table consists of
user
xxx
yyy
anil
anil
anil
zzzz
I have to call the funtion module if it is not 'anil'. we should not loop-endloop between func module. outside we have to check the above condition.
How to acheive this effectively.
Regards,
Ratna
Hi,
My internal table consists of
user
xxx
yyy
anil
anil
anil
zzzz
I have to call the funtion module if it is not 'anil'. we should not loop-endloop between func module. outside we have to check the above condition.
How to acheive this effectively.
Regards,
Ratna
2007 Apr 20 7:57 AM
u calll put like this.
sort itab by field.
read itab with key field = 'anil'.
if sy-subrc ne 0.
call FM
else.
endif.
check performance of read
Regards
prabhu
2007 Apr 20 7:58 AM
hi,
first sort ur interal table .
then DELETE ADJACENT DUPLICATES FROM INTERNAL TABLE.
then call ur FM.
Rewards with point if helpful.
Regards
Santosh
2007 Apr 20 8:00 AM
Hi
Check for the user 'ANIL' with READ statement
if sy-subrc ne 0. call the FM. endif.
Thanks
Sandeep
2007 Apr 20 8:09 AM
You can also do
LOOP AT itab WHERE user <> 'Anil'
CALL FM .
ENDLOOP .
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |