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: 

FM FREE_SELECTION_DIALOG length in Popup too short (max. 16 Character)

0 Kudos

Hello,

I have a problem with the FM’s FREE_SELECTION_INIT and FREE_SELECTION_DIALOG.

When I display the material number (18 digits) in popup (parameter as_window = abap_true), only 16 digits are displayed and the user has to scroll.

But if I display the screen in full screen mode, the full 18 digits are displayed.

If I display only single values (parameter) it also works in popup, but if I switch to ranges (selopt) the problem occurs again.

Can someone explain this to me?

I tried using another data element with 17 digits but there are also only 16 digits shown.
Is the maximum length in the popup limited to 16 digits?

See the screenshots.

Popup:

Popup single values:

Fullscreen:

BR
Julian

5 REPLIES 5

Sandra_Rossi
Active Contributor

Maybe it's due to the font you have defined in SAP GUI, or linked to your SAP GUI version.

What did you use?

Did you check the SAP notes?

0 Kudos

Hi Sandra,

thx for your reply.

I have the same Font Setting like in your Screenshot.
The thing that astonishes me here is that it works in the popup with single values but not with ranges, that's why I think it must be due to the blocks

I am just checking the sap notes but at first glance I have not found anything

BR

Sandra_Rossi
Active Contributor

If you post minimal code, people can test it on their SAP GUI, with different SAP GUI version, different screen resolution, different DPI, different Windows system, etc., and can tell you in case they don't experience the same issue.

jules1337dev
Discoverer

data(lv_selection_id) = value dynselid( ).

data tables_tab type standard table of rsdstabs.

tables_tab = value #( ( prim_tab = 'MVKE' ) ).

data fields_tab type standard table of rsdsfields.

fields_tab = value #( ( tablename = 'MVKE' fieldname = 'MATNR' )

( tablename = 'MVKE' fieldname = 'VKORG' )

( tablename = 'MVKE' fieldname = 'AUMNG' )

).

call function 'FREE_SELECTIONS_INIT'

exporting

kind = 'F'

importing

selection_id = lv_selection_id

tables

tables_tab = tables_tab

fields_tab = fields_tab

exceptions

fields_incomplete = 1

fields_no_join = 2

field_not_found = 3

no_tables = 4

table_not_found = 5

expression_not_supported = 6

incorrect_expression = 7

illegal_kind = 8

area_not_found = 9

inconsistent_area = 10

kind_f_no_fields_left = 11

kind_f_no_fields = 12

too_many_fields = 13

dup_field = 14

field_no_type = 15

field_ill_type = 16

dup_event_field = 17

node_not_in_ldb = 18

area_no_field = 19

others = 20.

data field_ranges type rsds_trange .

call function 'FREE_SELECTIONS_DIALOG'

exporting

selection_id = lv_selection_id

status = 1

as_window = abap_true

no_intervals = abap_false

just_display = abap_false

tree_visible = abap_false

importing

field_ranges = field_ranges

tables

fields_tab = fields_tab

exceptions

internal_error = 1

no_action = 2

selid_not_found = 3

illegal_status = 4

others = 5.

Sandra_Rossi
Active Contributor

Thanks. Sorry, I completely misunderstood your question, you are asking why SAP designed the screen like that or whether it's a bug or if there's a workaround.

No idea why it was done like that. You can't increase the Visible Length. Probably SAP won't consider it's an issue and spend time to fix that.

Popup (SAPLSSEL 1105):

Popup single values (SAPLSSEL 1150):

Full screen (SAPLSSEL 0100):

NB: Please select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!

I also added code so that people can test both modes, window and full screen:

PARAMETERS window   RADIOBUTTON GROUP rb1 DEFAULT 'X'.
PARAMETERS winsingl RADIOBUTTON GROUP rb1.
PARAMETERS fullscrn RADIOBUTTON GROUP rb1.
DATA(lv_selection_id) = VALUE dynselid( ).
DATA tables_tab TYPE STANDARD TABLE OF rsdstabs.
tables_tab = VALUE #( ( prim_tab = 'MVKE' ) ).
DATA fields_tab TYPE STANDARD TABLE OF rsdsfields.
fields_tab = VALUE #( ( tablename = 'MVKE' fieldname = 'MATNR' type = 'P' )
                      ( tablename = 'MVKE' fieldname = 'VKORG' )
                      ( tablename = 'MVKE' fieldname = 'AUMNG' )
                      ).
DATA(field_ranges) = VALUE rsds_trange( ( tablename = 'MVKE' frange_t = VALUE #( ( fieldname = 'MATNR'
              selopt_t = VALUE #( ( sign = 'I' option = 'EQ' low = '009016 170090   10' ) ) ) ) ) ).
CALL FUNCTION 'FREE_SELECTIONS_INIT'
  EXPORTING
    kind                     = 'F'
    field_ranges_int         = field_ranges
  IMPORTING
    selection_id             = lv_selection_id
  TABLES
    tables_tab               = tables_tab
    fields_tab               = fields_tab
  EXCEPTIONS
    fields_incomplete        = 1
    fields_no_join           = 2
    field_not_found          = 3
    no_tables                = 4
    table_not_found          = 5
    expression_not_supported = 6
    incorrect_expression     = 7
    illegal_kind             = 8
    area_not_found           = 9
    inconsistent_area        = 10
    kind_f_no_fields_left    = 11
    kind_f_no_fields         = 12
    too_many_fields          = 13
    dup_field                = 14
    field_no_type            = 15
    field_ill_type           = 16
    dup_event_field          = 17
    node_not_in_ldb          = 18
    area_no_field            = 19
    OTHERS                   = 20.
DATA(as_window) = xsdbool( window = abap_true OR winsingl = abap_true ).
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
  EXPORTING
    selection_id    = lv_selection_id
    status          = 1
    as_window       = as_window
    no_intervals    = winsingl
    just_display    = abap_false
    tree_visible    = abap_false
  IMPORTING
    field_ranges    = field_ranges
  TABLES
    fields_tab      = fields_tab
  EXCEPTIONS
    internal_error  = 1
    no_action       = 2
    selid_not_found = 3
    illegal_status  = 4
    OTHERS          = 5.