A simple model of the coronal magnetic field prior to the CME eruption on May 12 1997 is developed. First, the magnetic field is constructed by superimposing a large-scale background field and a localized bipolar field to model the active region (AR) in the current-free approximation. Second, this potential configuration is quasi-statically sheared by photospheric vortex motions applied to two flux concentrations of the AR. Third, the resulting force-free field is then evolved by canceling the photospheric magnetic flux with the help of an appropriate tangential electric field applied to the central part of the AR. To understand the structure of the modeled configuration, we use the field line mapping technique by generalizing it to spherical geometry. It is demonstrated that the initial potential configuration contains a hyperbolic flux tube (HFT) which is a union of two intersecting quasi-separatrix layers. This HFT provides a partition of the closed magnetic flux between the AR and the global solar magnetic field. The vortex motions applied to the AR interlock the field lines in the coronal volume to form additionally two new HFTs pinched into thin current layers. Reconnection in these current layers helps to redistribute the magnetic flux and current within the AR in the flux-cancellation phase. In this phase, a magnetic flux rope is formed together with a bald patch separatrix surface wrapping around the rope. Other important implications of the identified structural features of the modeled configuration are also discussed.