cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving XSTRING from relative URL

former_member213217
Participant
0 Kudos

Hello Experts,

I have a requirement wherein am supposed to display a PNG file within a web dynpro view. The standard SAP methods (GET_ATTACHMENT_DATA & GET_ATTACHMENT_URL ) of class CL_HRRCF_ATTACHMENT_BL return me the relative URL for the PNG file. Now I need to display the PNG file by using the URL address. I tried with 3 UI elements: Image, IFrame & LinkToURL.

Somehow binding the relative URL directly to the source of the Image wasn't working. It was ending up in a blank browser window.

Using the LinkToURL works fine but this way the user wouldn't be able to directly see the image unless he clicks on the link.

When I use the IFrame the PNG file was getting displayed but within an Adobe Reader window. Worse even the bookmarks column of the Adobe Reader software comes up in an expanded manner on the right leaving little place for the image on the right. The user would have to close the bookmarks and then see the image on the right of the bookmarks section.

Thomas had suggested me that may be the content server was returning me a wrong MIME type of PDF coz of which this might be happening this way but I logon via Citrix and have no rights to install and run any monitoring software like HTTPWatch to verify the same. I was so thinking to try extract the details of the file from the relative URL and then may be use the ICM cache as how described in this [link|http://forums.sdn.sap.com/thread.jspa?tstart=0&threadID=1280836]. Any inputs on how I can derive the PNG file information from the relative URL would be greatly appreciated. Alternatively please suggest if you know of any other workaround using which I can directly display the PNG from the relative URL without going through all these hassles.

Regards,

Uday

Accepted Solutions (0)

Answers (1)

Answers (1)

Lukas_Weigelt
Active Contributor
0 Kudos

Stupid question from me: Why is the requirement to catch the relative path from an URL rather than using a set image in the mime repository? Can the image be anywhere/anything?

Cheers, Lukas

former_member213217
Participant
0 Kudos

Hi Lukas,

Well just to give some insight into the requirement. We are on E-Recruiting EHP5 and the candidates undergo online tests on by a 3rd party system. The results from this system are then sent back to SAP via PI. There's a graph generated by the 3d party system which gives an easy overview of the candidates performance in the test for the recruiter. Only the info like attachment type & attachment header are saved in HRP5134. This coding for dumping the PNG file info is done by another developer and he has used the method MAINTAIN_ATTACHMENT of class CL_HRRCF_ATTACHMENT_BL while saving this info onto the Infotype. I now only have the GET_ATTACHMENT_DATA & GET_ATTACHMENT_URL methods of this class available to retrieve the information and none of these methods give me the actual rawstring. They just give me the relative URL. Hope it helps answer your question.

Regards,

Uday