Application Development 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: 

Fetch Image from Portal in ABAP

Former Member
0 Kudos

Hello,

I have an image in a HTML published in the portal (with broadcaster). Now I want to use this image in an ABAP program. I can't call the web address directly because my program can't handle the Portal authentication. So I have two questions:

- is there any way to call Portal-websites which require authentication from ABAP?

or

- how can I directly get access to the image file without detour over the Portal.

Thank you very much!

Martin

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

where the image is stored? on the portal KM or is it from SAP back end system?

- is there any way to call Portal-websites which require authentication from ABAP?

yes you can call it using cl_http_client with the option to either pass userid/pwd or certificate

- how can I directly get access to the image file without detour over the Portal.

it depends on where the image is stored

Raja

5 REPLIES 5

athavanraja
Active Contributor
0 Kudos

where the image is stored? on the portal KM or is it from SAP back end system?

- is there any way to call Portal-websites which require authentication from ABAP?

yes you can call it using cl_http_client with the option to either pass userid/pwd or certificate

- how can I directly get access to the image file without detour over the Portal.

it depends on where the image is stored

Raja

0 Kudos

Hello Raja,

thanks for your reply.

> where the image is stored? on the portal KM or is it

> from SAP back end system?

I publish it in "My Portfolio" - don't know where it is in the filesystem/database but I guess it is in KM.

Martin

0 Kudos

> yes you can call it using cl_http_client with the

> option to either pass userid/pwd or certificate

I have tried it - it seems like cl_http_client can not login to the portal because this uses JavaScript:

Response from server:

"...iView is not compatible with your browser, operating system or device. Contact your system administrator..."

Any ideas?

0 Kudos

you can log in.

use cl_http_client create by url method where the url should be the direct url to the image file.

is your portal using http or https?

Raja

0 Kudos

> the url should be the direct url to the image file.

that was it! Thank you Raja. If I call my image directly there appears a normal authentication-window and no JavaScript/HTML-window. It works for me.