In this paper, the generalized unified method is used to construct multi-rational wave solutions of the ()-dimensional Kadomtsev-Petviashvili equation with variable coefficients. This is an extension of the previous work that was given by the same author in Osman and Abdel-Gawad (EPJ Plus 130(10):1-11, 2015). The (2 1)-dimensional Kadomtsev-Petviashvili equation with variable coefficients can be used to characterize many nonlinear phenomena in fluid dynamics, plasma physics and some other nonlinear science when the inhomogeneities of media and non-uniformities of boundaries are taken into consideration. To give more physical insight into the obtained solutions, we present graphically their representative structures by setting the arbitrary functions in the solutions as specific functions. Moreover, the influences of the variable coefficient functions and interaction properties of solitary waves are discussed for physical interests and possible applications.