Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

String To File simulation, viewing data from a string?

Former Member
0 Likes
520

Hi,

I am working on an imaging system. I get returned a string with data which can be in a number of different formats - .jpg, .PDF, .doc etc... I also get back mime data type, if I want to use it.

My initial idea was to call the function:

CALL FUNCTION 'CALL_BROWSER'

EXPORTING

URL = P_URL

BROWSER_TYPE = BROWSER_TYPE

WINDOW_NAME = LV_WINDOW_NAME

which can handle all the types and displays them correctly. The problem I have , is I do not want to store the string with the data into a file, to pass to the URL Parameter going into this function. It there a way I can make it think it's file in memory, or is there a better way of doing the whole thing?

Many Thanks

Regards Sims

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
483

Unforturnatly, I think that you have to write the data to a file in order for the browser to be able to open it up. This function module is just invoking internet explorer for a certain url. If that url does not exist, IE will not be able to open it.

Could you just delete the file after you have created and display it?

Regards,

Rich Heilman

Read only

0 Likes
483

Hi,

deleting after I've created it is a possibility, but it just does not feel like an elegant way of doing it. I don't know if there is a better way of doing it. Me gut instinct is that whatever method I use to display the string, it will expect it in a file.

I don't know if it's worth creating my own function which can mimic this, and it seems to low level as well.

Thanks.

Any views?

Read only

0 Likes
483

Hi Sims

I used the interface i_oi_document_viewer to display online created PDFs in a SAPGUI client since it possible to load the data from an internal table. By using the where-used list you should be able to find some examples (e.g. report SAPRDEMOVIEWING).

Regards

Roger

Read only

0 Likes
483

Thanks for that - I think i'm on the right track now!!!