Can you have stomach pains when you have asthma?

Yes. There are several reasons why one might have abdominal pain during an asthma attack. Increased diaphragm muscle demand for blood flow may decrease blood flow to the gut leading to cramping. You may have gerd triggering asthma & giving you epigastric pain. Young children often have difficulty expressing pain location & will indicate the abdomen when having asthma-induced chest pain.
Yes. During an asthma exacerbation, your abdominal muscles are being overworked in an attempts to help you breathe. Therefore, you may have pain from this type of muscle strain. Also, if the exacerbation is complicated by pneumonia, pneumomediastinum, etc., then you could have referred pain into your abdomen. If you are a well controlled, asymptomatic asthmatic, the pain is not likely from asthma.