Shangyan Township, belonging to Lanying County, Linyi City, Shandong Province, is located in the west of Lanying County, bordering Xiangcheng Township and Xinxing Township to the east and south in turn, Huibaoling Reservoir to the west, and Xiacun Township and Cheliming Township to the north, with an area of 83.16 square kilometers of administrative area. As of the end of 2019, the household population of Shangyan Township was 57,237.
In 1962, it was separated from Xiangcheng Commune and called Shangyan Commune; in January 1996, the township was abolished and set up as Shangyan Town. As of June 2020, Shangyan Town has 23 administrative villages under its jurisdiction, and the town's people's government is located in North Shangyan Village.
In 2019, Shangyan Town has 40 industrial enterprises, including 6 above scale, and 92 comprehensive stores or supermarkets with business area over 50 square meters.