‎2009 May 28 6:51 AM
Hello all,
I want to display icons in my message.
For ex. Message is 'Entries with ICON can not be selected'.
Here on ICON place i want to display the actual icon.
Could u plz help me on this?
thanks,
regards.
‎2009 May 28 7:09 AM
Hi,
Only MESSAGE TYPE I (Information) you can pass icon.
Here is the piece of code.
INCLUDE <ICON>.
DATA : V_ICON TYPE ICON-ID VALUE '@0P@'.
MESSAGE I001(00) WITH V_ICON.
Hope this will help you.
Regards,
Smart Varghese
‎2009 May 28 6:54 AM
‎2009 May 28 6:55 AM
chk the icon table.
SELECT SINGLE id
FROM icon
INTO v_val
WHERE name = (the name u nerd to get).
and pass this by concatenating.
‎2009 May 28 6:57 AM
‎2009 May 28 7:02 AM
You should give the reference of [this|http://www.erpgenie.com/xi/833-abap-code-to-display-sap-icons?format=pdf] document instead of pasting the code!
‎2009 May 28 6:58 AM
Hi,
Just check this code and you will understand.
DATA : icon TYPE icon.
SELECT SINGLE * FROM icon INTO icon WHERE name = 'ICON_MATERIAL'.
IF sy-subrc EQ 0.
MESSAGE i001(00) WITH icon-id.
ENDIF.
Regards,
Ankur Parab
‎2009 May 28 6:58 AM
Hi,
Try This.
DATA : g_ques(80) TYPE c,
g_ans(1) TYPE c.
CLEAR: g_ques, g_ans.
g_ques = text-013. "Do you want to save data?
PERFORM get_confirmation
USING g_ques
CHANGING g_ans.
FORM get_confirmation USING g_ques TYPE any
CHANGING g_ans TYPE any.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = text-015
text_question = g_ques
text_button_1 = text-006
icon_button_1 = 'ICON_OKAY' " Icon as per req.
text_button_2 = text-007
icon_button_2 = 'ICON_CANCEL' " Icon as per req.
default_button = c_one
display_cancel_button = ' '
IMPORTING
answer = g_ans
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF g_ans <> c_one.
MESSAGE i000(zps_msg_01) WITH text-016. "Action Cancelled by User
ENDIF.
ENDFORM.
‎2009 May 28 7:09 AM
Hi,
Only MESSAGE TYPE I (Information) you can pass icon.
Here is the piece of code.
INCLUDE <ICON>.
DATA : V_ICON TYPE ICON-ID VALUE '@0P@'.
MESSAGE I001(00) WITH V_ICON.
Hope this will help you.
Regards,
Smart Varghese
‎2009 May 28 7:37 AM
Hi,
Follow the code along with threads,...and search fm: iconcreatemessage*.
include <icon>.
tables: icon.
data: v1 type icon-id.
v1 = '@00@'.
message e001(znaveen) with v1.
Naveen M.
‎2009 May 28 8:29 AM
‎2009 May 28 8:32 AM
Hi all.
I am fine with displaying icon in the message.
Further, i am facing a few difficulties as below:
1. more than one icon cannot be displayed in a single message.
2. when displaying, icon has to be at first position.
More expressively, icon first and then the text can be displayed.
But, text first and then the icon cannot be.
Suggestions appreciated.
Regards,
Prati
‎2009 May 28 9:17 AM
Hi Prati,
Please keep these points.
1. Message should be of type I (Information).
2. The ICON should be the first part of the message.
i.e. MESSAGE I001(00) WITH V_ICON (Icon variable) V_MESSAGE (The message text).
3. We cannot CONCATENATE the V_ICON and V_MESSAGE as it will never give the ICON
instead its value.
Regards,
Smart Varghese.
‎2009 May 28 9:40 AM
Hi,
thanks for reply.
Is there any other way to do this i want my message to display like this:
'Entries with ICON1 or ICON2 can not be selected.'
thanks,
regards.