cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas 3.0 changing picture in the MM03

0 Kudos

Hallo everybody,

i want to create a HTML window in the MM03 and combine it with a switch case function. That i have a picture who change by check of the material number.

Switch (check this number)

     case (NR.XY)

               show in HTML = this picture;

          break;

     case (Nr.ZB)

               show in HTML = another picture;

          break;

default:

          show in HTML = empty

I try a lot but it seems like my base idea is wrong.

Is something like this possible in that way or know anybody another way how i can create something like this?

with kind regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think your idea is fine in principle. So long as you have a URL for your image data you should be able to display it in an HTML control. You can set the control's "url" property if the whole content you want to display comes from the same URL, or you can set the "content" property if you need to wrap the image URL in further HTML to display it properly.

So:

session.findById("HTML control").url = "http://path/to/image/data";

or:

session.findById("HTML control").content = "<html><head>...</head><body>...</body></html>";

Does that help?

Steve.

0 Kudos

Thanks! Now it works.

0 Kudos

also, if you don't want to have HTMl control, switch will even work for image control.

session.findbyid("image_control_id").url = 'SAPR3://GUID';

You can upload some images and make then public from personas admin transaction.

Then get the GUID (resource maintenance screen /personas/resources) of your uploaded images from admin into your script.

Remember, 'SAPR3://' has to be there...

Regards,

Sushant

Former Member
0 Kudos

Hello everybody,

we've an issue on dynamic images changing in "MM03" transaction (see image below).



TEST1: HTML CONTROL

Visualize "shopping basket" image on HTML viewer control box.

  1. session.findById("wnd[0]/usr/htmlViewerPersonas_1448532780423").url =

'https:///sap/bc/personas3/resource/020D94509F7F1ED5A38E5D78EEA90158?sap-client=001&salt=145634&sid=0...

where:

  1. session.findById("wnd[0]/usr/htmlViewerPersonas_1448532780423").url is the HTML viewer control box

TEST2: IMAGE CONTROL

Change dynamically "shopping basket" image with "head" image

  1. session.findById("wnd[0]/usr/imagePersonas_1448541127774").url = 'SAPR3://020D94509F7F1ED5A58497EB39272161';

where:

  1. session.findById("wnd[0]/usr/imagePersonas_1448541127774").url is the "shopping basket" url property and

SAPR3://020D94509F7F1ED5A58497EB39272161 is the "head" GUID

In Test1 or Test2 no images changing happens.

Images are sets as "Public" on /PERSONAS/RESOURCES personas admin transaction.

Are there some customizing steps for this issues?

Thanks & Regards

0 Kudos

Hi Laura,

did you have set the pictures URL in the whiteliste?

You find the whitelist in Personas/admin -> Go to -> whiteliste.

Former Member
0 Kudos

Hi Matthias,

thanks a lot for your response.

We have already declared the picture URL in the Whilelist, but the images aren't uploaded. Below our Whitelist and our script:

Could you kindly give us some suggestion?

Thank you very much,

Kind regards

Answers (0)