09-05-2007 4:52 PM
Hi, I need to show a popup that lets write a value.
I've tried POPUP_GET_VALUES function, but I need to write the text to show, not the description of the field. With POPUP_GET_VALUES I inform a field from a table and when the popup appears, it shows the description of the field. I need a popup where I can write the description and retrieve the data entered.
For example, I'd like to show a popup with the question: What's your name? and a textbox where the user can write the answer, does it exist?
Thanks!
Carles
09-05-2007 4:58 PM
Hi,
Check the table SVAL have a field FIELDTEXT here you can pass the description you want
aRs
09-05-2007 4:56 PM
Can the question be the title of the popup?
data: ivals type table of sval.
data: xvals type sval.
xvals-tabname = 'USR01'.
xvals-fieldname = 'BNAME'.
append xvals to ivals.
call function 'POPUP_GET_VALUES'
exporting
popup_title = 'What is your name?'
tables
fields = ivals
exceptions
error_in_fields = 1
others = 2.
read table ivals into xvals with key fieldname = 'BNAME'.
if sy-subrc = 0.
write:/ xvals-value.
endif.
Regards,
Rich Heilman
09-05-2007 4:58 PM
Hi,
Check the table SVAL have a field FIELDTEXT here you can pass the description you want
aRs
09-05-2007 4:59 PM
Or, how about this, although it is not very elegant.
data: value type spop-varvalue1.
call function 'POPUP_TO_FETCH_ONE_VALUE'
exporting
textline1 = 'What is your name?'
* TEXTLINE2 = 'Can you tell me please?'
* TEXTLINE3 = ' '
title = 'Question'
valuelength = '30'
importing
* ANSWER =
value1 = value
exceptions
titel_too_long = 1
others = 2.
Regards,
Rich Heilman
09-05-2007 4:59 PM
Thanks, but no, it can't be the title. And I also need to show more text, like:
Hi, my name is ....
What's your name? [textbox]
Thanks