
714 So.2d 125 (1998)
STATE of Louisiana, Appellee,
v.
Charles BRADLEY a/k/a Charles Brandley, Appellant.
No. 30672-KA.
Court of Appeal of Louisiana, Second Circuit.
May 13, 1998.
E. Roland Charles, Monroe, for Appellant.
Richard Ieyoub, Attorney General, Jerry L. Jones, District Attorney, John G. Spires, Assistant District Attorney, for Appellee.
*126 Before NORRIS, STEWART and GASKINS, JJ.
GASKINS, Judge.
The defendant, Charles Bradley, aka Charles Brandley, was originally charged with distribution of cocaine, a violation of La. R.S. 40:967. He agreed to plead guilty to one count of attempted distribution of cocaine in exchange for the state's further agreements to accept a sentence cap of seven years and to refrain from filing a multiple offender bill. The trial court initially sentenced the defendant to serve 12 years at hard labor; however, when reminded of the plea agreement, the court vacated the original sentence and imposed a sentence of seven years. The defendant now appeals his agreed sentence as excessive. We affirm.
In May 1996, agents of the Beauregard/Deridder Parish Narcotics Task Force conducted an undercover operation in Bastrop, Louisiana. While in the parking area of "Lady's Lounge," the defendant offered to sell crack cocaine to an undercover agent. The agent expressed an interest in "a 20." The defendant then transferred a rock to the agent for $20 cash. The crime lab confirmed the substance was cocaine.
La.C.Cr.P. art. 881.2(A)(2) provides: "The defendant cannot appeal or seek review of a sentence imposed in conformity with a plea agreement which was set forth in the record at the time of the plea." This provision applies both to agreed sentences and to agreed ceilings, "ranges" or "caps." State v. Young, 96-0195 (La.10/15/96), 680 So.2d 1171; State v. Rice, 26,478 (La.App.2d Cir. 12/7/94), 648 So.2d 426, writ denied, 95-0431 (La.6/16/95), 655 So.2d 340.
Since the record shows the state, the defendant, and the trial court all agreed to the seven-year "cap" or ceiling on the defendant's sentence, and the subsequent sentence was imposed within the limits of that agreement, the defendant cannot appeal his sentence.[1]
Furthermore, even if we were to examine the sentence for constitutional excessiveness, we would find no error. The single, 26-year-old defendant reduced his sentencing exposure by one-half even though the evidence shows him to be guilty of the offense originally charged. He has prior felony convictions for accessory to armed robbery, attempted possession of cocaine (bargained down from possession with intent to distribute), and possession of cocaine. This record of prior drug offenses would weigh heavily in a decision to affirm the imposition of even the maximum sentence which could be imposed under the statute of conviction. State v. Mayweather, 556 So.2d 200 (La.App. 2d Cir.1990); State v. McNair, 597 So.2d 1096 (La.App. 2d Cir.1992), writ denied, 605 So.2d 1113 (La. 1992). The defendant also obtained a substantial advantage from the state's agreement not to charge him as a multiple offender. Under the circumstances of this case, the sentencewhich is less than one-half of what could have been imposed for the offense to which the defendant pleaded guiltyis not constitutionally excessive.
We have examined the record for error patent, La.C.Cr.P. art. 920(2), and found none.
The defendant's conviction and sentence are affirmed.
AFFIRMED.
NOTES
[1]  While the state and defense attorneys stated on the record that the plea agreement was seven years, the trial judge interpreted the agreement to be a sentencing cap of up to seven years.
