2007 Jul 09 10:40 AM
Hi All,
I have to use the function module POPUP_TO_CONFIRM to display an error message. In that error message i need to pass the error value also, (i.e) 'THE LABEL NUMBER 100000100 IS NOT CORRECT'.How can i pass the variable to the function module. Can you please help me in clearing this doubt.
POINTS PROMISED.
Regards,
Buvana
2007 Jul 09 10:44 AM
Hi,
Use concatenate statement to combine string with label no and then pass it to FM as character variable..
data :v_text(100).
v_label = '100000100'.
Concatenate 'THE LABEL NUMBER' v_label 'IS NOT CORRECT'
into v_text.
CALL FUNCTION 'POPUP_TO_CONFIRM'
Exporting
TEXT_QUESTION = v_text
Message was edited by:
Vigneswaran S
2007 Jul 09 10:41 AM
hi,
check the sy-subrc condition and write the error whatever u want after the function module.
2007 Jul 09 10:42 AM
2007 Jul 09 10:44 AM
Hi
use a message with &&&& in that message class and display the error message
but at this fun module place see that Label number field is present..
call function 'POPUP_TO_CONFIRM'
export...
import...
exceptions...
if sy-subrc <> 0.
message e021 with ''THE LABEL NUMBER' itab-labelno 'IS NOT CORRECT'.
endif.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 09 10:44 AM
Hi,
Use concatenate statement to combine string with label no and then pass it to FM as character variable..
data :v_text(100).
v_label = '100000100'.
Concatenate 'THE LABEL NUMBER' v_label 'IS NOT CORRECT'
into v_text.
CALL FUNCTION 'POPUP_TO_CONFIRM'
Exporting
TEXT_QUESTION = v_text
Message was edited by:
Vigneswaran S
2007 Jul 09 11:00 AM
hi,
try like this,
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = TEXT001 //// message to be dispalyed for user in the pop up screen
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER = ans //// give yes or no for pop up screen which is displayed for u at runtime when this FM is executed
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc NE 0.
message 'ERROR MESSAGE' TYPE 'E000'
or
message I000( zlauri) with ' executed successfully'. ////////// where zaluri is a message class which should be created in SE91 with message parameters & & & & for having dynamic text at runtime.
ENDIF.
if helpful reward some points.
with regards,
Suresh.A
2007 Jul 09 11:01 AM
Hi Buvana,
Declare a string variable, concatenate the value with the Error Message and assign this concatenated value to the string variable.
Pass this string variable to the FM.
Regards,
Mayank
2007 Jul 09 12:30 PM
Use the following syntax to convert message and data into text
MESSAGE ID sy-msgid
TYPE 'I'
NUMBER sy-msgno
WITH sy-msgv0
Sy-msgv2
sy-msgv3
sy-msgv4
INTO message.
Regards