Application Development and Automation 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: 

Pop_Up_To_Confirm: Creating text question with variable

0 Kudos
387

Hi all. I'm trying to do abap funtion pop_up_to_confirm.

i need to calculate something and display the value to ask confirmation from user. This is what i did. But there is error in msg declaration, saying (Comma without preceding colon (after MSG ?).)

total = ( price1 * quantity1 ) + ( price2 * quantity2 ).
msg = ' Total price is ' , total.


CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar     = 'User Prompt'
text_question     = msg
text_button_1    = 'YES'(001)
text_button_2    = 'NO'(002)
default_button    = '1' 
display_cancel_button = ' '
IMPORTING
answer = user_response
EXCEPTIONS
text_not_found    = 1
OTHERS        = 2
1 REPLY 1

Patrick_vN
Active Contributor
283

try

CONCATENATE ' Total price is ' total INTO msg.

Or something like this

msg_string = |Total price is { total }|.