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: 

Reporting Issue

Former Member
0 Kudos

Dear All,

How we can Restrict the values in Parameters/ Select-Options.

Rewards

Regards

Vikas

1 ACCEPTED SOLUTION

GauthamV
Active Contributor
0 Kudos

hi,

you can use F4IF_INT_TABLE_VALUE_REQUEST function module for that.

check this.


tables:pa0000.
DATA: BEGIN OF IT_SEL OCCURS 0,
       massn LIKE pa0000-massn,
       mntxt like t529t-mntxt,     
END OF IT_SEL."

select-options :  s_pernr  for pa0000-pernr no intervals no-extension ,
                  s_massn  for  pa0000-massn  obligatory  no intervals.
at selection-screen on value-request for s_massn-low .

  REFRESH: IT_SEL.
  clear: it_sel.
  it_sel-massn = '10'.
  it_sel-mntxt = 'Retirement process'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '18'.
  it_sel-mntxt = 'Deputation Inward'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '19'.
  it_sel-mntxt = 'Deputation Outward'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '20'.
  it_sel-mntxt = 'Termination/Seperation'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '28'.
  it_sel-mntxt = 'Pre-Seperation'.
  append it_sel.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      RETFIELD               = 'MASSN'
*   PVALKEY                = ' '
     DYNPPROG               = SY-REPID
     DYNPNR                 = SY-DYNNR
     DYNPROFIELD            = 'S_MASSN-LOW'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     VALUE_ORG              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = 'SY-REPID'
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      VALUE_TAB              =  IT_SEL
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .

5 REPLIES 5

Former Member
0 Kudos

Hi,

You cannot restrict any values, but you can validate using

At Selection-screen event.

Incase it is not correct dont proceed give a mesage and stay on selection screen.

Thanks & Regards,

Naveneeth K.

Former Member
0 Kudos

Hi Vikas,

I think By Validating we can Restrict the values (At selection screen event)

GauthamV
Active Contributor
0 Kudos

hi,

you can use F4IF_INT_TABLE_VALUE_REQUEST function module for that.

check this.


tables:pa0000.
DATA: BEGIN OF IT_SEL OCCURS 0,
       massn LIKE pa0000-massn,
       mntxt like t529t-mntxt,     
END OF IT_SEL."

select-options :  s_pernr  for pa0000-pernr no intervals no-extension ,
                  s_massn  for  pa0000-massn  obligatory  no intervals.
at selection-screen on value-request for s_massn-low .

  REFRESH: IT_SEL.
  clear: it_sel.
  it_sel-massn = '10'.
  it_sel-mntxt = 'Retirement process'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '18'.
  it_sel-mntxt = 'Deputation Inward'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '19'.
  it_sel-mntxt = 'Deputation Outward'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '20'.
  it_sel-mntxt = 'Termination/Seperation'.
  append it_sel.

  clear: it_sel.
  it_sel-massn = '28'.
  it_sel-mntxt = 'Pre-Seperation'.
  append it_sel.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      RETFIELD               = 'MASSN'
*   PVALKEY                = ' '
     DYNPPROG               = SY-REPID
     DYNPNR                 = SY-DYNNR
     DYNPROFIELD            = 'S_MASSN-LOW'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     VALUE_ORG              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = 'SY-REPID'
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      VALUE_TAB              =  IT_SEL
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
            .

Former Member
0 Kudos

hi,

if u want to validate the values which one has entered in the parameter/select-options fields then fire the AT SELECTION_SCREEN event .

if u want to restrict the values that appear on pressing F4 then fire AT SELECTION_SCREEN OUTPUT and select only the data u want to display in parameter/select-options in a internal table and pass it to function module -F4IF_INT_TABLE_VALUE_REQUEST .

former_member182426
Active Contributor
0 Kudos

hi,

u can restirct the values.

just go through this...

tables:pernr.

selection-screen begin of block b1.
select-options: i_pernr for pernr-pernr.
selection-screen end of block b1.

now if u run this report u sill see the selection screen...

like this...

i_pernr |---| to |----| |=>|

now click on the |=>| button..

u will see a dialoug box...

here u will see 4 tabs...

click on Red color Single Values tab, here u enter all the values to restrict individual pernrs.

If u want restrict a set of pernrs click on Red color Ranges tab

here u enter from to end pernrs to restrict...

Regards,

shankar.