‎2008 Jul 01 2:46 PM
Hello,
I implemented a own Help Screen and want to pre-select (highlight) and locate to specific entry, which I include the index already in lt_mark_tab, but it doesn't work. If I used multiselect it is working, but I dont want to include multiselect.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
ddic_structure = 'ZCL_V_PRE_US_VER'
retfield = 'VERTEILER'
mark_tab = lt_mark_tab
value_org = 'S'
multiple_choice = ' '
tables
value_tab = itab_data
return_tab = itab_ret
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
Can anybody help me.
Thanx a lot in advance.
M.Retschmeier
‎2008 Jul 01 2:52 PM
Hi,
Try like this...
PARAMETERS : p_state TYPE char20.
DATA : BEGIN OF t_state OCCURS 0,
state TYPE char20,
END OF t_state.
DATA : r_state TYPE TABLE OF ddshretval WITH
HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_state.
REFRESH t_state.
APPEND 'hi' TO t_state.
APPEND 'bye' TO t_state.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'STATE'
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_STATE'
window_title = 'State'
value_org = 'S'
TABLES
value_tab = t_state[]
return_tab = r_state[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
Regards,
Sai
Edited by: Saikumar on Jul 1, 2008 3:52 PM
‎2008 Jul 01 2:53 PM
You need to choose "MULTIPLE_CHOICE" switch is on then only multiple preselect will work.
Please find the short documentation of this import field
"Defaults for Selected Lines when Multiple Selection is Switched On"
a®
‎2008 Jul 01 3:08 PM
Hello,
thanks a lot for your quick answer, but you misunderstood. I don't want to activate multi-select. I need single-select. I have e.g. 10 entries and want to high-light number 5 as pre-selection (because this is defined as default by each user). Anyway the user should be able to use also another one. Therefore I include one line in Mark_table with index 5, but it doesn't work.
Regards.
M.Retschmeier
‎2008 Jul 01 3:42 PM
Hi!
1st u need to pass 'X' for MULTIPLE_CHOICE and then populate the index for the record that u want to show as selected.
data: MARK_TAB TYPE DDSHMARKS.
data: mark like line of mark_tab.
mark = '2'.
append mark to MARK_TAB.
call fucntion for search help
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = l_retfld
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = l_dynfld
MULTIPLE_CHOICE = 'X'
callback_program = sy-repid
MARK_TAB = mark_tab
TABLES
value_tab = l_i_value
field_tab = l_i_fields
return_tab = l_i_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i000
WITH 'No search help found'(090) .
ENDIF.
Regards,
Joy.
‎2008 Jul 01 4:52 PM
Hello,
I don't want to activate MULTIPLE_CHOICE, because only one value should be selected.
Is there any possiblity.
Best regards.
M.Retschmeier