on 07-28-2010 6:39 AM
Hi ,
Based on one obknr from objk table we fetch lot of serial numbers in internal table it_ser_bat[] .i.e
obknr = 1234
serial numbers:
1235
1236
1237
1238
1239
1240
1242
1250
1257
1258
1259
Now we need to print these serial numbers according to scenario
if serial numbers are in sequece then numbers will be print in range otherwise individully i.e.
printing record:
1235 to 1240
1242
1250
1257 to 1259
Regards
Alok
Here comes the solution,,
Please modify the code as per your need ..
I hope it will be ok for you ..
loop at i_tab.
if sy-tabix = 1. " here i have modified
w_number = i_tab-ser_num.
w_first = w_number.
endif.
if w_number = i_tab-ser_num.
w_number = i_tab-ser_num + 1.
CONTINUE.
else.
w_last = i_tab-ser_num.
CONCATENATE w_first 'TO' w_last INTO w_final.
endif.
ENDLOOP.
Use this W_final to print...
Edited by: Lokesh Tarey on Jul 28, 2010 9:00 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.