cancel
Showing results for 
Search instead for 
Did you mean: 

Printing a SAP Icon - URL to Resource

kai_mattern2
Explorer
0 Kudos

Hello together,

I have a Table with a SAP Icon in it for example (~sapicons/s_s_locl.gif)

Now I was asked to print this Icon (we are using the iText Library to print).

But to do so I think I need the full qualified URL to that resource. I tried a couple of the WDURLGenerator methods but without any success.

Does anybody know how I can get the URL to these Icons?

Best regards,

Kai

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi

Have you tried these API ?

For SAP icons: WDURLGenerator.getSAPIconWebResourcePath(java.lang.String iconName)

For Portal Icons: WDURLGenerator.getPortalIconWebResourcePath(java.lang.String iconName)

Regards, Siarhei

kai_mattern2
Explorer
0 Kudos

Hi Toether,

thanks. Yes WDURLGenerator.getSAPIconWebResourcePath(java.lang.String iconName) is one part. I had to do some subString'ing and concatonations because the Servername  (WDURLGenerator.getAbsoluteWebResourceURL("/");) and the getSAPIconWebResourcePath are overlapping each other.

But it works now and the Icon is printed in the PDF.

Thanks for your both Help!

Best regards,

Kai

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kai,

Where are the tables located ABAP/Java? But still below options can be useful:

Option 1: write code to save the file in server, some fixed location use it to display on wd-views.. use iText api to print...! When saved in EP server, you can access it thru the URL too..!

Option 2: write a code to print the wd-view content using HTML code, and use the HTML print options to print the forms.

Tnx,

MS