OPINION
delivered the opinion of the Court,
joined by MEYERS, PRICE, WOMACK, KEASLER, HERVEY, HOLCOMB, and COCHRAN, JJ.
Based on two separate indictments, a jury convicted appellant of possession of four grams or more but less than 200 grams of heroin and possession of one gram or more but less than four grams of cocaine during the same incident. The jury found two enhancement allegations true and sentenced appellant to concurrent terms of 25 years’ confinement in the institutional division of the Texas Department of Criminal Justice. The court of appeals affirmed the judgments and sentences of the trial court. Pickens v. State, No. 08-02-00163-CR, 2004 WL 1576783 (Tex.App.-El Paso, July 15, 2004)(not designated for publication), and Pickens v. State, No. 08-02-00164-CR, 2004 WL 1576782 (Tex.App.-El Paso, delivered July 15, 2004)(not designated for publication). We granted review of each conviction. In Cause No. PD-1454-04, possession of heroin, appellant raises two grounds for review.1 In Cause No. PD-1437-04, possession of cocaine, appellant raises four grounds for review, two of which are legally identical to the grounds raised in Cause No. 1454-04.2
Facts
A City of Dallas police officer testified that, while concealed under some cut tree limbs, sticks and twigs in South Dallas, he observed appellant standing in the parking lot at a car wash, engaging in what appeared to be a hand-to-hand drug transaction. The officer stated that appellant then walked to a car and sat in the driver’s seat. Another man approached the car and handed cash to appellant. The officer, using his binoculars, observed appellant reach down, lift a plastic “cup-holder,” and remove a clear plastic baggie that con*677tained several capsules. The officer testified that he observed appellant sprinkle out some of the capsules into the palm of his hand and hold his hand up; the other man removed several capsules and walked off. The officer stated that, based upon his police department experience, such pills are typically powdered heroin or powdered cocaine. The officer also testified that, over the course of the next 10 to 15 minutes, he observed appellant complete two additional hand-to-hand transactions in the same manner. The officer radioed his patrol partner, who was nearby, and observed his partner arrive at the scene, remove appellant from the car in which he was seated, perform a pat-down frisk and search of appellant, handcuff him, and place him in the police car. Backup cover officers arrived, and the car in which appellant had been sitting was inventoried. Officers seized $540.00 in cash, the capsules in the baggie, and additional drugs from the car’s glove box. At trial, a chemist testified that some of the capsules recovered from the car contained cocaine and some contained heroin.
Appellant testified that, while standing outside a friend’s vehicle in the parking lot of the car wash and talking with some friends, one of the police officers drove up. Appellant testified that, after pulling up and getting out of the police car, the officer pointed at him, called him over, and asked him what he was doing. He testified that the officer then looked around inside the car, but appellant could not see him remove anything. The officer then arrested appellant and placed him in the back seat of the police car. Appellant testified, specifically denying possessing any heroin or cocaine but admitted that the “organizer” (described by the officer as a “cup-holder”) was his, although he stated that it was on top of the car, not in it, and claimed that he had earned the $540.00 by chauffeuring for a handicapped woman who lived in Plano.
The jury convicted appellant of possession of both heroin and cocaine. The jury assessed a sentence of 25 years’ incarceration for each offense. In the court of appeals, appellant claimed that the jury charge contained egregious error because the trial court failed to inform the jury that it could disregard the evidence if it believed, or had a reasonable doubt, that the officers illegally obtained the evidence. In each of appellant’s cases, the court of appeals held that, because appellant failed to request a jury-charge instruction pursuant to Tex.Code Crim. PROC. Art. 38.23 and based upon the testimony about the vehicle search, he did not preserve error on that issue. Pickens, supra, No. 08-02-00163-CR, slip op. at 11, and Pickens, No. 08-02-00164-CR, slip op. at 7. The court of appeals cited Kelly v. State, 669 S.W.2d 720, 726 (Tex.Crim.App.1984), which declined to hold that the failure to include a jury-charge instruction on the requirements of Article 38.23 constitutes fundamental error or mandates reversal when no request for such instruction was made. Id. It also cited Texas Rule of Appellate Procedure 33.1. Id.
In Cause No. PD-1437-04, appellant also argued that the evidence was legally insufficient because the indictment alleged possession with intent to deliver and, while the state moved to proceed on possession only, the indictment was never physically amended, thus the jury was prohibited from finding him guilty of simple possession.
The court of appeals held that the state’s motion before trial to reduce the charge to possession, to which appellant did not object, was not an attempt to amend the indictment, but rather was an announcement that the state had chosen to try appellant for the lesser-included offense of possession. Pickens, supra, No. 08-02-00163-CR, slip op. at 4-6. It held *678that the state may abandon an essential allegation if the effect of the abandonment is to leave the accused on trial for a lesser-included offense, and that “[i]n a prosecution for an offense with lesser included offenses, the jury may find the defendant not guilty of the greater offense, but guilty of any lesser included offense.” Id. at 5. For the same reasons, the court of appeals overruled appellant’s claim that the jury charge contained egregious error because the trial court could not charge the jury on the lesser-included offense of possession. Id. at 8. The court of appeals also held that, because appellant failed to request a jury-charge instruction pursuant to Tex. Code CRiM. PROG. Art. 38.23 and based upon the testimony about the vehicle search, he did not preserve error on that issue. Id. at 11.
Sufficiency
In his third ground .for review in Cause No. 1437-04, appellant contends that the court of appeals should have measured the sufficiency of the evidence by the greater offense, possession with intent to deliver, because the state never amended the indictment. He argues that, because there was no evidence presented at trial showing that he committed only the lesser-included possession, and he should, therefore, have been acquitted. In ground four in Cause No. 1437-04, appellant asserts that: 1) because the indictment was never amended, the state had to prove the greater offense, possession with intent to deliver; and 2) because there was no evidence to support the jury charge on the lesser-included possession offense, the submission of a jury charge on a lesser-included offense of mere possession constituted error and resulted in egregious harm.
The record reflects that the indictment alleged possession with intent to deliver cocaine, and that the trial court granted the state’s motion to reduce the offense to possession of more than one gram. However, it also reflects that the indictment was never physically altered to show such reduction. Appellant disputes the court of appeals’ conclusion that the state merely abandoned an element of the alleged offense and proceeded on the lesser-included offense. He also disagrees with that court’s reliance upon Allison v. State, 618 S.W.2d 763 (Tex.Crim.App.1981), which held that a properly alleged greater offense necessarily includes all of the lesser-included offenses, regardless of whether each of their constituent elements are alleged in the wording of the greater offenses’s indictment, and invites us to overrule it.
Appellant asserts that, while all the elements of a lesser offense are included within the elements of a greater offense, the evidence presented at trial may not support a finding that a particular lesser offense is included within the proof of the greater offense. He notes that, even if the elements of the putative lesser offense are functionally the same or less than those required to prove the charged greater offense, the facts must be analyzed to determine if the proof shows the lesser offense such that the finder of fact could rationally find that the defendant is guilty of the lesser offense and not guilty of the greater. Appellant asserts that the evidence in this case shows that he is either guilty of possession with intent to deliver or that he is innocent; the evidence does not show that he was not guilty of possession with intent to deliver and guilty of simple possession, thus simple possession should not have been submitted to the jury. Appellant also asserts that, because he was not found guilty of the charged offense, possession with intent to deliver, he was effectively acquitted of it.
The state argues that Allison, supra, and its progeny were correctly decided and should not be overruled. It also ar*679gues that the trial court properly charged the jury on the lesser-included offense of possession of cocaine and that the court of appeals did not err in finding that the charge was proper.
Analysis
The Code of Criminal Procedure, Art. 37.09, provides, among other things, that an offense is a lesser-included offense if “it is established by proof of the same or less than all the facts required to establish the commission of the offense charged!.]” We have held that, to determine whether possession is a lesser offense of delivery and a conviction for possession was authorized under the indictment for delivery, “[t]he relevant test is whether the lesser offense could be proved by the same facts necessary to establish the offense charged.” Jones v. State, 586 S.W.2d 542, 545 (Tex.Crim.App.1979).
The only difference between possession and possession with intent to deliver is the element of intent to deliver. Appellant was identified as the person who retrieved and held in his hand the drug-filled capsules and exchanged those capsules for cash in hand-to-hand transactions with other people. This evidence of appellant’s physical possession and control of the controlled substances are facts that are also necessary to establish the charged offense of possession with intent to deliver. Thus, the lesser offense of possession could be proved by the same facts necessary to establish possession with intent to deliver.
In Allison, supra at 764, we held, “The greater offense, when properly alleged, necessarily includes all the lesser-included offenses whether each of their constituent elements are alleged in the wording of the indictment on the greater offense or not.” Citing Allison, we have held that “[i]f the constituent elements of a lesser offense are included within the charging instrument, in order to obtain a conviction for the lesser offense, it is not necessary for the state to also plead the constituent elements of the lesser offense.” Aguilar v. State, 682 S.W.2d 556, 561 (Tex.Crim.App.1985).
Appellant seems to confound the well-settled two-prong test that must be met before a jury-charge instruction on a lesser-included offense must be given with the standard to be used when evaluating the sufficiency of the evidence. The test for submission of a jury charge requires that: 1) the lesser-included offense must be included within the proof necessary to establish the offense charged; and 2) some evidence must exist in the record that if the defendant is guilty, he is guilty only of the lesser offense. Hampton v. State, 109 S.W.3d 437, 440 (Tex.Crim.App.2003); Rousseau v. State, 855 S.W.2d 666, 672 (Tex.Crim.App.), cert. denied, 510 U.S. 919, 114 S.Ct. 313, 126 L.Ed.2d 260 (1993). Stated in different terms, the defendant is not guilty of the greater offense, but is guilty of the lesser.
The first prong requires that a lesser-included offense be included within the proof necessary to establish the offense charged. The second prong acknowledges that there are factual circumstances in which an offense is indeed a lesser-included offense under the first prong, but a jury-charge instruction will not be required because the condition that the defendant is not guilty of the greater offense, but is guilty of the lesser is not met. In such a case, the offense remains a lesser-included offense, but the trial court is not required to instruct the jury on it.
We are not persuaded by appellant’s arguments that this reasoning needs to be overruled. Accordingly, we oven-ule appellant’s third ground for review, which seeks to overturn Allison, supra. Because there was no error in submitting the instruction to the jury, we also oven-ule appellant’s fourth ground, which alleges *680egregious harm in the trial court submitting a jury charge on the lesser-included offense of simple possession.
Jury-charge Error
In his first ground for review in each case, appellant asserts that the court of appeals erred in finding that he had waived his claim that challenged the jury charge, acknowledging Almanza v. State, 686 S.W.2d 157 (Tex.Crim.App.1984)(opinion on rehearing), yet inexplicably relying on case law predating Almanza to support its finding of waiver. In ground two of each case, appellant asserts that the court of appeals erred by failing to address every issue that was raised and is necessary to final disposition of the appeal, as is required by Tex.R.App. P. 47.1, when it refused to address the point of error that challenged the jury charge. Appellant complained in that point of error that the trial court’s failure to include, sua sponte, a jury-charge instruction, based upon Tex. Code CRiM. PROC. Art. 38.23, informing the jury that it could disregard the evidence if it believed, or had a reasonable doubt, that the officers had obtained the evidence illegally, was error and resulted in egregious harm.
Analysis
Article 38.23 provides that no evidence obtained by an officer or other person in violation of the laws or constitutions of Texas or the United States shall be admitted in evidence against the accused on the trial of any criminal case. It also provides that, where the legal evidence raises such an issue, the jury shall be instructed that if it believes, or has a reasonable doubt, that the evidence was obtained by such a violation, then it shall disregard any such evidence.
Based upon our holding in Alman-za, supra, that unobjected-to jury-charge error warrants reversal only when the error results in egregious harm, we have held that the question of whether the defendant has preserved jury-charge error is relevant only if there is a determination that error actually occurred. Thomas v. State, 723 S.W.2d 696, 707 (Tex.Crim.App.1986). Thomas also acknowledged that Article 38.23 provides in mandatory terms “that a jury is to be instructed to resolve factual disputes over whether evidence was illegally obtained and, therefore, inadmissible.” Id. We have more recently reiterated that “an Article 38.23 instruction must be included in the jury charge only if there is a factual dispute about how the evidence was obtained.” Garza v. State, 126 S.W.3d 79, 85 (Tex.Crim.App.2004). Thus, if a defendant raises a factual dispute about whether evidence was illegally obtained, an Article 38.23 instruction must be included in the jury charge.
The jury charge in this case did not contain such an instruction. Appellant did not suggest to the trial court that the evidence raised a factual dispute as to whether the evidence had been legally obtained. He neither requested an Article 38.23 instruction nor objected to its absence. On appeal, appellant argued for the first time that the trial court’s failure to include such an instruction, sua sponte, was error and resulted in egregious harm.
In the instant case, the court of appeals did not determine whether there was such a-factual dispute. It simply held that appellant failed to preserve error on the issue of the Article 38.23 instruction and overruled his claim. Pickens, supra, No. 08-02-00163-CR, slip op. at 11, and Pickens, No. 08-02-00164-CR, slip op. at 7. Without a factual dispute, there is no error and therefore no requirement that the jury charge include an instruction pursuant to Article 38.23. Because, in addressing appellant’s second issue, the court of appeals failed to determine whether ap*681pellant had raised a factual dispute about whether the evidence in question was illegally obtained, we hereby sustain appellant’s first ground for review in both cases. Accordingly, we remand both of these causes to the court of appeals so that it may resolve that question.3
KELLER, P.J., concurred in result.