‎2007 Aug 13 3:29 PM
hi,
please let me know how can i find the max of customer no found in a row and it should be restricted to 6 9 i.e there can be a min of 1 customer no and max of 6 customer no
my internal table is like this
y name customerno customerno cusno cusno ... ...
kindly reply..
Thanks
padma
‎2007 Aug 13 4:01 PM
hi,
here you go.
data : lv_count type i.
loop at itab.
if itab-cust1 is not initial.
lv_count = lv_count + 1.
endif.
if itab-cust2 is not initial.
lv_count = lv_count + 1.
endif.
...
...
...
...
...
if lv_count gt 6.
delete itab index sy-tabix.
endif.
endloop.
Thanks
Mahesh
‎2007 Aug 13 4:01 PM
hi,
here you go.
data : lv_count type i.
loop at itab.
if itab-cust1 is not initial.
lv_count = lv_count + 1.
endif.
if itab-cust2 is not initial.
lv_count = lv_count + 1.
endif.
...
...
...
...
...
if lv_count gt 6.
delete itab index sy-tabix.
endif.
endloop.
Thanks
Mahesh
‎2007 Aug 13 4:23 PM
hi,
Do you have data of this kind
1000,cust1,cust2,cust3,cust4,cust5,cust6,cust7.
do this way.
data : begin of jtab occurs 0,
line(10),
end of jtab.
data : begin of itab occurs 0,
line(10),
end of itab.
let us say you have data in itab.
loop at itab.
split itab-line at ',' into table jtab.
describe table jtab lines lv_lines.
if lines > 7.
this indicates that the this particular record has more that 6 customers.
endif.
refresh jtab.
endloop.
Thanks,
Mahesh
‎2007 Aug 13 5:14 PM
Hi Magesh,
My internal table is like this
Y Name Cust1 cust2 Cust3 Cust4
values like
Y abcdef 123234234 13123424 1312343534 4242453455 563654654
how can i find out that the column from 3 till 9 should only have values and other than that it cannot have any values
Thanks
Padma
‎2007 Aug 13 6:21 PM