Present invention relates to a novel pharmaceutical composition containing an active ingredient(s) which is retained in the stomach or upper part of gastrointestinal tract for controlled delivery of medicament for improved local treatment, and/or better absorption from upper parts of gastrointestinal tract for effective therapeutic results. Present invention also provides a method for preparation of the said dosage form preferably in the form of a bilayer tablet, in which one layer constitutes for spatial control and the other being for temporal control.