cancel
Showing results for 
Search instead for 
Did you mean: 

How to create dynamic image path in ITS NW7

Former Member
0 Kudos

Hi folks,

i'll have a nice challange.

The 'basic' way to use images / mimes on my ITS templates is

<img src="

`mimeUrl(~service="YSERVICE", ~theme="99", ~language="", ~name="IMG.JPG")`">

This works since years fine. No doub about it.

Now i want to handle the ~name parameter dynamic. for different situation in my application i want to show different images.

Sounds simple, but i try different solutions.

It bothers to write like this and this is not really dynamic. (img means a Field on R/3 Dynpro --> serverside handling)

`if (img == "1")`

  

<img src="

`mimeUrl(~service="YSERVICE", ~theme="99", ~language="", ~name="IMG1.JPG")`">

`elseif (img == "2")`

  

<img src="

`mimeUrl(~service="YSERVICE", ~theme="99", ~language="", ~name="IMG2.JPG")`">

etc.

`end`

Does anyone have experience with using a variable for the ~name parameter?

When I tried this  

<img src="

`mimeUrl(~service="YSERVICE", ~theme="99", ~language="", ~name="`VARIABLE`")`">

the mime path would not build correctly. I'll think this depends on the ` ` inside the brackets (The first will close the mimeUrl statement).

Also, i tried to put the whole mimeUrl in a variable or parts of it, but it does'nt work.

Have anyone an Idea?

Thanks for your attention

Thorsten

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear colleagues,

there should not be an easy answer to my problem. Due to time of implemention, i'll close this thread with unanswered issue.

Feel free to reply if you find a better way.

With best regards

Thorsten