, Cramping along with Green Stools and 3 weeks duration, all points to a non-infectious cause. Also lack of fever
. Importantly we need to hydrate your kid, so as not to dehydrate him.
Non-infectious causes of diarrhea
can be of so many types including mal-absorption (inability to absorb) of some things, some autoimmune conditions, sometimes even dietary changes. If the stool sticks to the commode, it could be a fat malabsorbtion. It is hard to say as it has a long list of differential to be sorted out.
I would suggest avoid gluten
containning food like bread or any wheat containing food. Also some people cannot tolarate milk products. Try to avoid that too. Though there are specific tests for each type of intolerance which you can get tested after visiting doctor, I think we can start with this trial and error if you are concerned.
I hope this helps.