(Adds detail)

NEW YORK, July 27 (Reuters) - Boeing Co on Wednesday reported its first quarterly loss in nearly seven years, hit by charges related to the 787, 747 and KC-46 tanker aircraft programs.

The world's largest jetliner maker reported a net loss of $234 million, or 37 cents per share, for the second quarter. It recorded a net profit of $1.11 billion, or $1.59 per share, a year earlier.

Excluding pension and other costs, it posted a loss of 44 cents per share, compared with earnings of $1.62 per share a year earlier.

The net loss in the latest quarter reflects $3.23 per share impact from reclassification of 787 costs and charges for the 747 and KC-46 tanker programs, the company said.

Revenue rose about 1 percent to $24.8 billion.

The results reflected increased deliveries of twin-aisle commercial aircraft, and better profitability in its defense, space and security business. While revenue in the unit fell 5 percent, profit rose 9 percent.

Boeing is now targeting earnings of $6.40 to $6.60 a share for full-year 2016, down from $8.45 to $8.65. Core earnings are expected to be $6.10 to $6.30, down from $8.15 to $8.35.

Shares rose 1.6 percent to $137.00 in premarket trading.

(Reporting by Alwyn Scott in New York and Sweta Singh in Bengaluru; Editing by Sriraj Kalluvila and Jeffrey Benkoe) ((sweta.singh@thomsonreuters.com; within U.S. +1 646 223 8780, outside U.S +91 80 6749 6125; Reuters Messaging: Reuters Messaging: sweta.singh.thomsonreuters.com@reuters.net))