05-06-2009 3:30 AM
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!
05-06-2009 3:42 AM
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
05-06-2009 3:45 AM
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
05-06-2009 3:49 AM
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
05-06-2009 7:35 AM
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.