Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

doubt in FM popup_to_confirm

Former Member
0 Kudos
121

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

1 ACCEPTED SOLUTION

former_member491305
Active Contributor
0 Kudos
73

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

7 REPLIES 7

Former Member
0 Kudos
73

hi,

check the sy-subrc condition and write the error whatever u want after the function module.

Former Member
0 Kudos
73

Hi,

Use PARAMETER table to pass the values.

Reward if useful!

Former Member
0 Kudos
73

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

former_member491305
Active Contributor
0 Kudos
74

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

Former Member
0 Kudos
73

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

Former Member
0 Kudos
73

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

raymond_giuseppi
Active Contributor
0 Kudos
73

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