Heteroarylpiperidine and -piperazine derivatives of the formula (I) in which the symbols A, X, Y, L1, L2, G, Q, p, R1, R2 and R10 are each as defined in the description, and salts, metal complexes and N-oxides of the compounds of the formula (I), and the use thereof for controlling phytopathogenic harmful fungi and processes for preparing compounds of the formula (I).하기 화학식 (I)의 헤테로아릴피페리딘 및 -피페라진 유도체, 및 그의 염, 금속 착물 및 N-옥사이드, 식물병원성 진균을 구제하기 위한 그의 용도 및 그의 제조방법이 제공된다:상기 식에서,기호 A, X, Y, L1, L2, G, Q, p, R1, R2 및 R10은 각각 명세서에 언급된 의미를 갖는다.