2013 Oct 22 8:03 AM
Dear Friends,
I have an issue in smartform pdf hyperlink. When I click the URL from the PDF, complete URL is not placed into the browser. If I copy and paste the URL from the pdf into the browser, it is working fine.
The URL looks like https://ABC.com/KAAcontent/1,,109705,00.html. Here the URL is having ‘,,’ which causes the error, it is treated as a TAB character maybe.
When I click the URL from the PDF, it navigates to ‘https://abc.com/KAAcontent/1’ in the browser, remaining content ‘,,109705,00.html’ is not copied into the browser.
Please find the steps, which I have followed in the development. I have included the images too.
I have maintained the URL in the tcode SO72.
Above maintained URL is called in the standard text.
In SMARTFORMS the variable GV_TERMS will have the text at the runtime.
After Execution of Tcode F150, I have converted form output into PDF using the tcode PDF!
The problem is with the ‘,,’ maintained in the URL because ‘,,’ might be treated as a tab character.
2013 Oct 22 8:13 PM
Hi Kesavadas
Thank you for mentioning pdf!
I have limited experience in this area, and the function code came as a surprise.
It calls FM SSFCOMP_PDF_PREVIEW behind the scenes.
Coming to your question, only URL is stored in standard text, and FM CONVERT_OTF creates a hyperlink out of it using some logic. Locating it would need more investigation.
By escaping the comma character, hyperlink can be fixed. Only downside is that display URL wouldn't look that good.
After replacing comma by %2C, corrected dummy URL would be:
https://ABC.com/KAAcontent/1%2C%2C109705%2C00.html
After fixing the URL, hyperlink navigation works. Here is a proof. (image is based on real URL )
2013 Oct 22 1:59 PM
Could you try to replace the special character "," with "," or "," in the link ?
Regards,
Raymond
2013 Oct 22 6:19 PM
Hello Kesav,
I guess the character ',' is a reserved character in a URI. Maybe you could try using the escape character pattern '%XX' for URI parameters with reserved characters.
This Wikipedia link on URI escape characters might be a good reference.
http://en.wikipedia.org/wiki/Percent-encoding
Hope this helps.
Thanks,
Venkat.
2013 Oct 22 8:13 PM
Hi Kesavadas
Thank you for mentioning pdf!
I have limited experience in this area, and the function code came as a surprise.
It calls FM SSFCOMP_PDF_PREVIEW behind the scenes.
Coming to your question, only URL is stored in standard text, and FM CONVERT_OTF creates a hyperlink out of it using some logic. Locating it would need more investigation.
By escaping the comma character, hyperlink can be fixed. Only downside is that display URL wouldn't look that good.
After replacing comma by %2C, corrected dummy URL would be:
https://ABC.com/KAAcontent/1%2C%2C109705%2C00.html
After fixing the URL, hyperlink navigation works. Here is a proof. (image is based on real URL )
2013 Oct 23 6:31 AM
Thanks Manish,
It worked 🙂
Venkat & Raymond 🙂 , thanks for your time and suggestion.
SCN the best
Kesav