cancel
Showing results for 
Search instead for 
Did you mean: 

Select-options in Selection Screen to show more rows for entering values

Former Member
0 Kudos

Hi all,

In my webdynpro abap I have added the SELECT-OPTIONS componenet and working fine.

User need in the Selection Screen for select options more rows to show entering values in single time.

THe Default Rows show only 5 .

user need to change to 10 or 15 Rows to show.

Pl help .

THanks in advance.

Dev

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Here is the way which I just tested and found working.

This is the main code which needs to be written.

TYPES:

ty_r_vbeln TYPE RANGE OF vbeln,

ty_s_vbeln TYPE LINE OF ty_r_vbeln.

data ls_vbeln type ty_s_vbeln.

field-symbols <fs_range> TYPE INDEX TABLE.

ASSIGN lt_range->* TO <fs_range>.

do 10 times.

APPEND ls_vbeln TO <fs_range>.

enddo.

For further refinement, you can create a input field in view for number of lines to be shown as enabled.

The complete code is as below.

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

lo_cmp_usage = wd_this->wd_cpuse_select_options( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .

lo_interfacecontroller = wd_this->wd_cpifc_select_options( ).

DATA lo_r_helper_class TYPE REF TO if_wd_select_options.

lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).

  • Creating range table

DATA lt_range TYPE REF TO data.

CALL METHOD lo_r_helper_class->create_range_table

EXPORTING

i_typename = 'VBELN'

RECEIVING

rt_range_table = lt_range.

  • Disabling the global options

CALL METHOD lo_r_helper_class->set_global_options

EXPORTING

i_display_btn_cancel = abap_false

i_display_btn_check = abap_false

i_display_btn_reset = abap_false

i_display_btn_execute = abap_true.

TYPES:

ty_r_vbeln TYPE RANGE OF vbeln,

ty_s_vbeln TYPE LINE OF ty_r_vbeln.

data ls_vbeln type ty_s_vbeln.

field-symbols <fs_range> TYPE INDEX TABLE.

ASSIGN lt_range->* TO <fs_range>.

do 10 times.

APPEND ls_vbeln TO <fs_range>.

enddo.

  • Adding the selection field

CALL METHOD lo_r_helper_class->add_selection_field

EXPORTING

i_id = 'VBELN'

I_OBLIGATORY = ABAP_TRUE

I_NO_EXTENSION = abap_false

i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP

it_result = lt_range.

Edited by: Jayanthi Jayaraman on Dec 2, 2010 8:29 AM

Former Member
0 Kudos

Hi Jayanthy,

Thanks for the help.

I am getting 10 rows in selection screen- Multiple selection but 5 rows are showing in single page.

but only default 5 rows are visible in a single page . User wants to enter single time for all the 10 rows data in a single page

How to show/visible all the 10 rows in a single page with out pressing next page.and enter for value for all 10 rows in single time.

Pl help.

Thanks in advance.

Dav

Former Member
0 Kudos

Hi Jayanthy,

Thanks for all help,.

My client is asking Seelct-options available in dialog/dynpro the same way they are asking.

They have to enter 1000 of material in the select option manually it is not possible.

in the dynpro select option one of the functiona;lity to load data from File.'

is it poossible to do in Webdynpro .

Kindly help.

THanks in advance.

dav

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

As posted in my second reply, using the code you can make it visible and editable lines in select-options.

Check this link which helps to upload file.

http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Import from clipboard is possible. Check the standard program WDR_TEST_SELECT_OPTIONS.

Note: The normal code for select options will do that but only in higher versions. For lower versions, the icons are not available.

Edited by: Jayanthi Jayaraman on Dec 3, 2010 4:17 AM

Former Member
0 Kudos

Hi Jayanthy,

THanks for the excellent explanation and very much helped to solve my problem.

THanks for the help.

Dav

Former Member
0 Kudos

Jayathi stated that Importing from clipboard is possible and to check program program WDR_TEST_SELECT_OPTIONS. I did not see within this program how to allow the import option. What version of the IF_WD_SELECT_OPTIONS allows for the import option? Or could you guide me to the code in the test program that is setting the option to allow the import from the clipboard.

Thanks Jim Bates

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I'm sorry but Jayathi is not correct. This clipboard import functionality is not available in any release level currently available to customers or partners. It is a feature currently under development for a future release level.

Answers (1)

Answers (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You can increase the visiblity of rows by right clicking a row. But it will just make the rows visible and not editable.