Provided is a medicament having excellent effect and safety for preventing and treating gastrointestinal disorder and etc. The present invention provides compounds represented by formula (I) as shown below, or pharmacologically acceptable salts thereof.(wherein, A represents an optionally substituted phenylene group; B represents an optionally substituted 4-10-membered heterocyclic group, a optionally substituted C6-10aryl group, a optionally substituted C3-10cycloalkyl group; R1 represents a hydrogen atom or a C1-3alkyl group; R2 represents a hydrogen atom or a C1-3alkyl group; R3 represents a C1-6alkyl group, a C3-10cycloalkyl group, a C1-3alkoxyC1-3alkyl group or a C1-3hydroxyalkyl group; R4 represents a hydrogen atom, a C1-6alkyl group or a halogen atom; n is 1 to 4 of integral number; X is a methylene, -O-, -NH-, -N(C1-3alkyl)-, -C(=O)-, -S-, -S(O)-, -S(O2)- or a single bond.)本發明之課題在於發現具優異活性及安全性之胃腸失調等之治療藥及/或預防藥;本發明提供以下列通式(I)表示之化合物或其藥理上可容許之鹽:[式中,A為可經取代之伸苯基,B為可經取代之4-10員雜環基、可經取代之C6-10芳基、可經取代之C3-10環烷基,R1為氫原子或C1-3烷基,R2為氫原子或C1-3烷基,R3為C1-6烷基、C3-10環烷基、C1-3烷氧基C1-3烷基或C1-3羥基烷基,R4為氫原子、C1-6烷基或鹵素原子,n為1至4之整數,X為伸甲基、-O-、-NH-、-N(C1-3烷基)-、-C(=O)-、-S-、-S(O)-、-S(O2)-或單鍵]。