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: 

how to change the select-options fields length to long

Former Member
0 Kudos

Dear friends:

I had develop a program for sent email,and it have a field for fill mail address as below:

data: lmail like adr6-smtp_addr.

select-options: mailadd for lmail no intervals.

my customer complain that the field is too short,but I can not change it to longer,the select-options component limit the visible length , how can i do for this problem!

4 REPLIES 4

Former Member
0 Kudos

Hi Jery,

The display looks small, but you can enter the full email with no problem,,, you can continue your own code,, no need to change into long...

Thanks & regards,

Dileep .C

martin_voros
Active Contributor
0 Kudos

Hi,

I am not 100% sure but I think you can not set length for select-options to more than 20 characters. You can use addition VISIBLE LENGTH but this works only until 20 characters. As a workaround you can create your own dynpro with longer field and then implement button for adding additional e-mail addresses.

By the way why don't use field from the table directly in your SELECT-OPTION definition.


SELECT-OPTIONS: mailadd FOR adr6-smtp_addr.

Cheers

Former Member
0 Kudos

Hi Jery tang,

You can't do it with your Select-Options, If your customer really want to be display too longer then

you need to define screen and use the screen in yur program.

Regards,

Suneel G

Former Member
0 Kudos

Dear All:

I had realized this function.

I defined a parameter and a pushbutton to replace the select-option componet,

the code share as below.

-


data: lmail like adr6-smtp_addr.
SELECTION-SCREEN BEGIN OF LINE.
parameters: mailCopy like lmail.
selection-screen:pushbutton 64(5) pubu user-command mailButt.
SELECTION-SCREEN END OF LINE.
select-options: mailadd for lmail NO INTERVALS no-display.

at selection-screen output.
  CLEAR l_count.
  DESCRIBE TABLE mailadd LINES l_count.
  IF l_count > 1.
    write ICON_DISPLAY_MORE as icon to pubu.
  ELSE.
    write ICON_ENTER_MORE  as icon to pubu.
  ENDIF.

at selection-screen.
  CLEAR l_count.
  DESCRIBE TABLE mailadd LINES l_count.
  IF NOT mailCopy IS INITIAL AND mailadd[] IS INITIAL.
    MailAdd-low = mailCopy.
    Append mailadd.
  ENDIF.

  IF l_count = 1 and mailCopy IS INITIAL.
    refresh mailadd.
    clear mailadd.
  endif.

  if sy-ucomm = 'MAILBUTT'.
    perform show_box.
  endif.


*---------------------------------------------------------------------*
*       FORM show_box                                                 *
*---------------------------------------------------------------------*
FORM show_box.
  TYPE-POOLS aqadh .
  DATA: tab_and_field TYPE  rstabfield.

  tab_and_field-tablename = 'ADR6'.
  tab_and_field-fieldname = 'SMTP_ADDR'.

  CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
       EXPORTING
            TEXT           = 'SET E-Mail To '
            tab_and_field  = tab_and_field
       TABLES
            range          = MAILADD
       EXCEPTIONS
            no_range_tab   = 1
            cancelled      = 2
            internal_error = 3
            OTHERS         = 4.

  IF NOT MAILADD[] IS INITIAL.
    READ TABLE MAILADD INDEX 1.
    MAILCopy = MAILADD-LOW.
  ELSE.
    CLEAR MAILCopy.
  ENDIF.
ENDFORM.