Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
krish469
Contributor
0 Kudos
Recently I have come across a requirement to display Icon along with Message type. I have used FM ‘ICON_CREATE’ to display ICON with message type for its respective message type. But, this solution only works in SAP GUI not in ITS Mobile.

To display image in ITS Mobile, we need to add the image tag from INCLUDE/MESGS from ITSMOBILE Service.
`<img class="MobileMessageLogo" src="`mimeURL(~service="itsmobile", ~theme=99, ~language="", ~name=mymessageimg)`" `sh()`>`



 

My Requirement is display Error image/icon for error message type and Success image/icon for success message type.

                                       

 

Code Required:

As I am populating message types from back-end, we need to write below mentioned code in HTML Template for the screen before displaying the message type.
`if( 'LV_MESSAGE_TYPE'[1] == "Error" )  
mymessageimg = "images/all/error.gif";
else
mymessageimg = "images/all/enter.gif";
end`

Variable 'mymessageimg' will have respective image based on the message type from the program.
Labels in this area