[Problem] To increase chemical spraying safety in an agricultural machine. [Solution] A system 500 for filling a chemical into a chemical tank, provided in agricultural machinery and having: a chemical tank 104; a chemical nozzle 103 that discharges objects inside the chemical tank to outside; a fluid detection unit 31 that detects when fluid refilling of the chemical tank has been completed; an air bleeding detection unit 32 that detects when an air bleeding operation has been completed; and a refilling detection unit 34 that detects when chemical refilling of the chemical tank has been completed. The system has a plurality of mutually different states and transitions to a different state corresponding to a condition. The system transitions to a spraying preparation start standby state (S4) after transitioning to at least a fluid standby state (S31), an air bleeding standby state (S32), and a chemical standby state (S34).