cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-line input for parameters

Former Member
0 Kudos

hi,

Is it possible to display the parameters input box in a selection screen as a multiline text box?

Don't ask me to tell a scenario for this....This is just out of curiosity...:-)

kind regards,

PJ

Accepted Solutions (0)

Answers (3)

Answers (3)

athavanraja
Active Contributor
0 Kudos

Yes, it is possible, you can use an text edit control on the selection screen.

Check out class and associate demo programs(SAPTEXTEDIT_DEMO_3) of class

CL_GUI_TEXTEDIT

Regards

Raja

Former Member
0 Kudos

I m talking of selection screens for reports....not dialog programs...

regards,

PJ

Former Member
0 Kudos

Hi PJ,

as you are defining a parameter this is just one field, no internal table, no array or whatever.

So I think, the way to achieve what you like is a select-option which is stored as a table (array) in the program. To have a select-option of type C(50) you can try the following.

types: t_char(50) type c.

data: l_field type t_char.

select-options: so_field for l_field no intervals.

After that you can access each line using the loop or the read statement. E. g.

loop at so_field.

  • so_field-low will contain your entered value.

endloop.

regards

Siggi

Former Member
0 Kudos

Hi PJ,

try the following:

instead of usgin parameters ...

use

select-options: so_test for <fieldname> no intervals.

regards

Siggi

Former Member
0 Kudos

hi,

Well i m not trying to restrict select options. Have a look at the following code.

PARAMETERS P1 type c length 50.

now the parameter P1 should appear not as a single line for a 50 character input but rather it should span multiple lines (rows)....is this possible?? (something like a textarea for people who are comfortable with HTML)

regards,

PJ

athavanraja
Active Contributor
0 Kudos

<b>even on selection screen you can have controls.</b>

for the specific example you have given, there is no standard option available.

but some work around has to be done, something like having two fields of 25 chars length each, and in your processing concatenate them together.

Regards

Raja

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi PJ,

Check this link.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi Priyank,

I think you are talking about restricting select option.

SELECT-OPTIONS : S_VKORG FOR TVKO-VKORG MEMORY ID VKO.

INITIALIZATION.

PERFORM F1000_RESTRICT_VKORG. " Restricting Sales organisation

Form F1000_RESTRICT_VKORG.

  • Define the object to be passed to the RESTRICTION parameter

DATA lw_restrict TYPE SSCR_RESTRICT.

  • Auxiliary objects for filling RESTRICT

DATA lw_opt_list TYPE sscr_opt_list.

DATA lw_ass TYPE sscr_ass.

  • Assign selection screen objects to option list and sign

  • NOINTERVLS: BT and NB not allowed

CLEAR lw_opt_list.

MOVE 'NOINTERVLS' TO lw_opt_list-name.

MOVE 'X' TO: lw_opt_list-options-cp,

lw_opt_list-options-eq,

lw_opt_list-options-ge,

lw_opt_list-options-gt,

lw_opt_list-options-le,

lw_opt_list-options-lt,

lw_opt_list-options-ne,

lw_opt_list-options-np.

APPEND lw_opt_list TO lw_restrict-opt_list_tab.

  • KIND = 'S':

CLEAR lw_ass.

MOVE: 'S' TO lw_ass-kind,

'S_VKORG' TO lw_ass-name,

'I' TO lw_ass-sg_main,

'*' TO lw_ass-sg_addy,

'NOINTERVLS' TO lw_ass-op_main.

APPEND lw_ass TO lw_restrict-ass_tab.

CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'

EXPORTING

restriction = lw_restrict

EXCEPTIONS

too_late = 1

repeated = 2

selopt_without_options = 3

selopt_without_signs = 4

invalid_sign = 5

empty_option_list = 6

invalid_kind = 7

repeated_kind_a = 8

OTHERS = 9.

IF sy-subrc <> 0. "Restriction error encountered for Select

"Option

MESSAGE I001 WITH 'ERROR IN SELECT OPTION'."ERROR IN SELECT OPTION

ENDIF.

endform. " F1000_RESTRICT_VKORG

Just try this and let me know.

Regards,

J.Jayanthi