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: 

Parameter Help

former_member422932
Participant
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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?

0 Kudos

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.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

former_member422932
Participant
0 Kudos

Resolved