2009 Feb 24 12:07 PM
Hi Experts,
I am facing problem while running the code.
data : it_cus type table of vbrk,
w_cus like line of it_cus.
START-OF-SELECTION.
if z_cust is not initial.
select KUNRG
from VBRK
into corresponding fields of table it_cus
where KUNRG in z_cust .
ENDIF
delete adjacent duplicates from it_cus.
loop at it_cus into w_cus.
Z_KUNRG = w_cus-KUNRG.
append w_cus to btab..
perform cal_intrest.
IF Z_KUNRG =< z_cust-HIGH. " This code i have written to stop the loop.
EXIT.
ENDIF.
The program is running 3 times to retrive the data without this code.
Can you suggest any other than to stop the loop at z_cust-HIGH.
clear w_cus.
clear ITK.
clear W_ITK.
clear I_IT .
free I_IT .
clear w_it.
clear Z_DMBTR.
endloop.
Thx & Regds
Vipul
Hi Experts,
I am facing problem while running the code.
data : it_cus type table of vbrk,
w_cus like line of it_cus.
START-OF-SELECTION.
if z_cust is not initial.
select KUNRG
from VBRK
into corresponding fields of table it_cus
where KUNRG in z_cust .
ENDIF
delete adjacent duplicates from it_cus.
loop at it_cus into w_cus.
Z_KUNRG = w_cus-KUNRG.
append w_cus to btab..
perform cal_intrest.
IF Z_KUNRG =< z_cust-HIGH. " This code i have written to stop the loop.
EXIT.
ENDIF.
The program is running 3 times to retrive the data without this code.
Can you suggest any other than to stop the loop at z_cust-HIGH.
clear w_cus.
clear ITK.
clear W_ITK.
clear I_IT .
free I_IT .
clear w_it.
clear Z_DMBTR.
endloop.
Thx & Regds
Vipul
2009 Feb 24 12:11 PM
Hi
loop at it_cus into w_cus
where kunrg = zcust-high .
Z_KUNRG = w_cus-KUNRG.
append w_cus to btab..
perform cal_intrest.
IF Z_KUNRG =< z_cust-HIGH. " This code i have written to stop the loop.
EXIT.
ENDIF.
The program is running 3 times to retrive the data without this code.
Can you suggest any other than to stop the loop at z_cust-HIGH.
clear w_cus.
clear ITK.
clear W_ITK.
clear I_IT .
free I_IT .
clear w_it.
clear Z_DMBTR.
endloop.
2009 Feb 24 12:21 PM
Hi,
try this..
loop at it_cus into w_cus where KUNRG GT Z_CUST-HIGH.
endloop.
2009 Feb 24 12:22 PM
hi Vipul,
instead of using
IF Z_KUNRG =< z_cust-HIGH
Try using
IF Z_KUNRG LE z_cust-HIGH
This will help u., Pls try it out.
Thanks and regards
Suraj
2009 Feb 24 12:25 PM
Hi:
Before delete adjacent duplicates from it_cus , sort the table IT_cust
Try it.
Regards
Shashi
2009 Feb 24 12:29 PM
Hi Vipul,
EXIT statement is used to end the current loop process. Your approach is correct.
You can use the below code.
IF z_kunrg LE z_cust-high.
EXIT.
ENDIF.
"LE" stands for the logical statement "less than or equal to".
2009 May 17 3:40 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |