Aiden Markram's lean patch in Sri Lanka will do him good in the long run, according to his former Under-19 coach Ray Jennings. Markram has not crossed 20 in eight innings on the tour and was dropped for the third ODI on Sunday, but Jennings is confident that the difficulties Markram is facing will make him stronger for the cycles of ups and downs of professional sport.

"He had a bit of a honeymoon period when he first started in international cricket and this is his first bad patch. He needs to come to grips with the pressure that comes with that. He hasn't ever experienced before what he is going through at the moment," Jennings, who coached the national Under-19 side Markram captained to the 2014 World Cup title, told ESPNcricinfo. "When he goes through another bad patch in three or four years time, he will know what to expect."

Markram made his international debut last September when he was picked to open the batting in Tests alongside Dean Elgar. He struck 97 and two hundreds in his first three Tests, which were against Bangladesh and Zimbabwe, and 66 in his first ODI, also against Bangladesh.

Naturally, things had to get tougher from there, but Markram was up for the sterner challenges. He scored 94 against India at his home ground, SuperSport Park, and 143 against Australia in a losing cause in Kingsmead: an innings which confirmed his arrival as a Test player. But it has not gone as smoothly in ODIs.

Markram has played eight more 50-over matches since the half-century on debut and has not made more than 32 in any of them. Moreover, he was thrust into the captaincy, albeit temporarily, with only two caps to his name, against India. South Africa went on to lose the series 5-1 and Markram acknowledged the burden of leadership may have taken a toll on his own performances, but he has not quite been able to shake it off.

In Sri Lanka, he has struggled against spin; in particular against Rangana Herath and Akila Dananjaya. Herath removed Markram all four times in the Tests - in Galle by dangling the ball outside off and forcing him to make a play before he had reached the pitch of it, and in Colombo with deliveries that stayed straight as Markram played for turn. In the ODIs, Akila dismissed Markram twice, first with a googly that Markram played all around, and then with a legbreak when Markram was shaping up for the offbreak.

Some may argue that Markram's ability to read the spinners should be questioned and his approach may need to be refined, but Jennings is not as concerned about that as he is about Markram's mind. "Technique is not the only thing. He plays fast bowling better than spin but he has already shown that he has enough technique to perform at this level. Now it's about mindset," Jennings said. "Is his mindset tense or relaxed? If it's relaxed, the feet will move and he will be watching the ball. If it's tense, the feet can get stuck, there will be a lot of emotions involved."

For Jennings, it's important that Markram understands what he is going through is normal and that he doesn't lose confidence as a result. "It gets difficult for players when the expectations around them don't match up to the reality. And then it becomes about whether he is in a love or hate mode, if he is feeling like he belongs or under pressure. If there's a bad energy and he starts overthinking, he could end up feeling like he should be batting left-handed. That doesn't need to happen. He has shown he has the credentials to perform at this level."

And because of his pedigree - Markram holds the record for the highest List A score of 183 in South Africa's domestic competition - Jennings believes Markram should be a shoe-in for South Africa's World Cup squad and should even be part of the XI as soon as this Sunday. "I would definitely take him to the World Cup. In a few months time, he could be at the top of his game. I would even play him in the next two matches."

With the series against Sri Lanka already won, South Africa can afford to experiment and Jennings hopes that they will try a few things to see how best to fit Markram into the line-up. "Change the scenery a little bit. Maybe use him to open, or bat him down at No. 6. If he gets a fifty in the next two games, he will be up and going again."

Or, with Faf du Plessis nursing a shoulder injury, perhaps Markram could even be back at the helm of affairs, as captain - a role Jennings thinks he will end up with on a full-time basis at some point. "It wasn't a bad decision to make him captain during the India series. It was a good idea to push him mentally and to show him to reach for his dreams and it will pay dividends in the long run. We could see from Under-19 level that he is a tough guy, a fighter and a leader, and he will learn from this."

Firdose Moonda is ESPNcricinfo's South Africa correspondent