‎2007 Jul 05 3:35 PM
I have a requirement to display a list of values for a parameter decalred as follows:
PARAMETERS: KSCYC LIKE T811C-CYCLE OBLIGATORY.
The problem I have is a don't get a list of values to chose from. I then created an internal table called ISELOPT that contained all of the values from T811C-CYCLE and had my parameter defined as
DATA: BEGIN OF ISELOPT OCCURS 0,
CYCLE LIKE T811C-CYCLE,
END OF ISELOPT.
PARAMETERS: KSCYC LIKE ISELOPT-CYCLE OBLIGATORY.
I still can't get the list of values to be selected from at the selection screen. Can someone tell me how to get my parameter to show me all of the values from T811C-CYCLE?
‎2007 Jul 05 3:40 PM
u need to use FM F4IF_INT_TABLE_VALUE_REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR KSCYC.
* use FM F4IF_INT_TABLE_VALUE_REQUEST
‎2007 Jul 05 3:40 PM
u need to use FM F4IF_INT_TABLE_VALUE_REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR KSCYC.
* use FM F4IF_INT_TABLE_VALUE_REQUEST
‎2007 Jul 05 3:42 PM
Hello,
The main difference between select-options and parameter is
If the value which is given in the slection screen for a parameter,
the select staement will check for the exact value else it wont fetch anything.
For example if u give XXXXX as material number then it will search for the exact material. If the Material XXXXX is not availbkle then it wont return anything.
My Suggestion is declare the variable as select-options.
Thanks !!!
Vasanth
‎2007 Jul 05 3:51 PM
Hi try to use below code
at selection-screen on value-request for p_a.
clear zvalue_tab.
refresh zvalue_tab[].
refresh field_tab[].
refresh return_tab[].
field_tab-fieldname = 'Fieldname'.
field_tab-tabname = 'table name of the field from which it is declared'.
append field_tab.
select field name from table into table zvalue_tab.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = field_tab-fieldname
tables
value_tab = zvalue_tab
field_tab = field_tab
return_tab = return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
p_a = return_tab-fieldval.
endif.
Plz don't forget to give reward points if helpful
‎2007 Jul 05 7:47 PM
I had to change my parameter to a select-option. Do I use the same logic for a select-option, becuase it seems when I click on the the second value to populate about half of my internal table entries are missing?
‎2007 Jul 05 8:19 PM
If it is a select option, you will have to put the same subroutine call in
AT SELECTION-SCREEN ON VALUE-REQUEST FOR selopt-low.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR selopt-high.
‎2007 Jul 05 7:55 PM
Do you only need single values, like in a listbox?
report zrich_0001.
type-pools: vrm.
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
parameters: p_kscyc type t811c-cycle as listbox visible
length 20 obligatory.
at selection-screen output.
name = 'P_KSCYC'.
types: begin of tt811c,
tab type t811c-tab,
cycle type t811c-cycle,
sdate type t811c-sdate,
end of tt811c.
data: it811c type table of tt811c with header line.
select * into corresponding fields of table it811c from t811c.
loop at it811c.
xvrm_values-key = it811c-cycle.
append xvrm_values to ivrm_values.
endloop.
call function 'VRM_SET_VALUES'
exporting
id = name
values = ivrm_values.
Regards,
RIch HEilman
‎2007 Jul 12 6:58 PM