This action was filed on behalf of a personal injury protection (PIP) insurer in the name of the injured party, Rodney K. O’Donnell, to recover payments for medical expenses and lost wages pursuant to K.S.A. 40-3113a(c). The trial court entered a judgment in favor of defendant Daniel J. Fletcher on the grounds that the statute of limitations had run and that plaintiff O’Donnell was not the real party in interest. Plaintiff appeals.
Plaintiff contends that the statute of limitations is an affirmative defense which must be pled and that the trial court erroneously denied him a default judgment because the statute of limitations had run. Support for this contention is found in Gideon v. Gates, 5 Kan. App. 2d 23, 611 P.2d 166, rev. denied 228 Kan. 806 (1980). There, this Court held that the statute of limitations is an affirmative defense and the burden of pleading and proving its applicability rests on the defendant. Gideon at page 24. Moreover, K.S.A. 60-208(c) requires that in responding to a preceding pleading a party shall set forth the affirmative defense. It is clear from the record jn this case that the defendant did *492not appear at the trial nor did he file any pleadings; the defense of the statute of limitations was raised by the trial court sua sponte. It is well established that a trial court has jurisdiction to decide only such issues as are raised by the pleadings or defined at pretrial conference, except new issues raised by evidence to which there is no objection. See Febert v. Upland Mutual Ins. Co., 222 Kan. 197, 200, 563 P.2d 467 (1977); Williams v. Evans, 220 Kan. 394, 397, 552 P.2d 876 (1976). Since defendant failed to appear or plead the statute as a defense, the statute of limitations was waived. Washington Avenue Investments, Inc. v. City of Kansas City, 213 Kan. 269, 270, 515 P.2d 744 (1973).
We consider next the trial court’s ruling that plaintiff was not entitled to relief because he was not the real party in interest.
K.S.A. 60-217 requires that all actions be prosecuted in the name of the real party in interest. The real party in interest is the person who possesses the right sought to be enforced, and is not necessarily the person who ultimately benefits from the recovery. Swanston v. McConnell Air Force Base Fed’l Cred. Union, 8 Kan. App. 2d 538, 543, 661 P.2d 826 (1983). The purpose of the real party in interest requirement is to protect the defendant from being repeatedly harassed by a multiplicity of suits for the same cause of action. Hall v. Pioneer Crop Care, Inc., 212 Kan. 554, 559, 512 P.2d 491 (1973).
The petition filed in this action in the name of the injured plaintiff alleged that he sustained $5,000 in medical expenses, $766.58 in lost wages and that plaintiff was otherwise injured. A claim for $2,000 in punitive damages for asserted recklessness was also alleged. Plaintiff testified concerning the circumstances of the automobile collision and the extent of his injuries. He indicated that the $5,766.58 sought in the petition was the amount he received from his insurer in PIP benefits but that he had sustained medical expenses in excess of his insurance coverage. The petition did not seek recovery for these unreimbursed expenses.
Since the injured party, O’Donnell, allegedly sustained damages in excess of the amount paid by his insurer, general subrogation principles would hold that O’Donnell alone was the proper party to bring suit against the third-party wrongdoer for the entire loss. He would hold in trust any recovery duplicative of payments made by his insurer. Dondlinger & Sons’ Constr. *493Co. v. EMCCO, Inc., 227 Kan. 301, 306, 606 P.2d 1026 (1980). K.S.A. 40-3113a alters this general rule and outlines the specific subrogation rights of an insurer who has paid personal injury protection benefits to a party who was injured as a result of the negligence of a third party. Subsection (c) of this statute provides that, in the event the injured person fails to commence an action against the tortfeasor within eighteen months after the date of the accident, that failure shall operate as an assignment to the insurer of any cause of action in tort which the injured person may have against the tortfeasor for the purpose of recovering damages duplicative of PIP benefits. It further provides that the insurer may enforce this assignment “in his or her own name or in the name of the injured person, representative or dependents of the injured person for their benefit as their interest may appear . . . .”
Only one cause of action exists against the tortfeasor. Cf. Farmers Ins. Co. v. Farm Bureau Mut. Ins. Co., 227 Kan. 533, 538, 608 P.2d 923 (1980) (considers predecessor statute). K.S.A. 40-3113a(c) simply facilitates enforcement of the insurer’s subrogation right by permitting an action to be brought in its name to recover the amount of benefits paid when the insured fails to act for 18 months. Thus, the insurer may enforce its subrogation right in its own name even though the injured party was only partially recompensed for its loss by the PIP benefits.
The district court concluded that because the actual damages sought by the petition only amounted to the damages duplicative of the PIP benefits paid, the action was brought by the insurer to enforce its own subrogation interest and did not represent the interest of the insured. Therefore, the court held that the insurer was the real party in interest for the right sought to be enforced and granted judgment to defendant.
Regardless of whether this suit was initiated on behalf of both the insured and the insurer or just on behalf of the insurer, judgment should not have been granted for the defaulting defendant. A defect in pleading in the name of the real party in interest is a procedural problem which should not be raised by the court to impair a substantive right.
There is very little Kansas case law concerning the effects of a real party in interest defect. In Torkelson v. Bank of Horton, 208 Kan. 267, 269, 491 P.2d 954 (1971), a summary judgment in favor *494of the defendant was upheld because the plaintiff was owed no duty by defendant and had no claim for which relief could be granted. The Court noted that the parties had premised their argument on the belief that the crucial issue was whether the plaintiff was the real party in interest. However, the real party in interest rule neither enlarges nor restricts a party’s substantive right to recover in a particular action. Thus, a substantive right to make the claim alleged in the petition must be found to exist before the issue of the appropriateness of the parties comes to the fore. Therefore, although the Court discussed the meaning of K.S.A. 60-217, it upheld the summary judgment on the grounds that plaintiff had no legally cognizable right to be enforced and not on the more narrow procedural aspect of the real party in interest rule.
There are no other Kansas cases specifically considering the appropriate consequences for a failure to plead a suit in the name of the real party in interest. Indeed, under our modern rules of civil procedure, it is unclear precisely how a real party in interest objection should be raised. Burns v. Anchorage Funeral Chapel, 495 P.2d 70, 74 (Alaska 1972); 6 Wright & Miller, Federal Practice and Procedure: Civil § 1554 (1971). However, other jurisdictions have held that an objection based on an alleged failure to have the action prosecuted in the name of the real party in interest is for the benefit of the defendant and should be raised in a timely fashion or it may be deemed waived. Audio-Visual Marketing Corp. v. Omni Corp., 545 F.2d 715, 718-19 (10th Cir. 1976); Chicago & Northwestern Transp. Co. v. Negus-Sweenie, 549 F.2d 47 (8th Cir. 1977); Truckweld Equipment Co. v. Swenson Trucking, 649 P.2d 234, 239 (Alaska 1982). In addition, the real party in interest issue should not be raised by the trial court sua sponte. United States Fidelity & Guaranty Co. v. Slifkin, 200 F. Supp. 563, 573 (N.D. Ala. 1961); Mid America Trailer Sales, Inc. v. Moorman, 576 P.2d 1194, 1196 (Okla. App. 1977). We agree with these authorities. Defendant failed to appear or object to the manner in which the suit was brought and plaintiff was given no opportunity to present argument concerning the identification of the real party in interest or to move to amend the petition. Any defect in naming the proper party was therefore waived by defendant.
We conclude that the trial court erred in granting judgment for *495the defaulting defendant. Judgment is reversed and the case remanded with directions to enter judgment consistent with the evidence presented.