Rain and bad light spoiled the contest as full play was not possible on any of the previous four days since the visitors won the toss and elected to bat. Only 91.5 overs were possible on the first four days as rain, bad light and overcast conditions affected the proceedings.
With his ton, Abid became the only male cricketer to slam a ton on his debut in both the Test and One-Day International (ODI) formats. Abid remained unbeaten on 109 while Azam was 102 not out as Pakistan reached 252/2 when the day ended.
Abid is the 11th Pakistani batsman to score a century on Test debut.
Earlier, Sri Lanka declared their first innings at 308/6 as soon as Dhananjaya de Silva completed his sixth Test century. Dhananjaya had remained unbeaten on 102 off 166 deliveries, with his knock laced with 15 boundaries.
Along with him, Dilruwan Perera was batting on 16 when Sri Lanka captain Dimuth Karunaratne declared their innings.
The two-match Test series marks Pakistan's first Tests on home soil since a militant attack in 2009 on Sri Lanka's team bus in Lahore.
Brief scores: Sri Lanka 308/6(d) against Pakistan 252/2 (Abid Ali 109 not out, Babar Azam 102 not out; Kasun Rajitha 1/5)