Skip to Content
avatar image
Former Member

select-options

hi all,

in selection when i press on f4 .

field is assiging as jan , feb....

but it should take 01, 02...

below code will refer to that....

please tell me how to get only numbers

DATA:BEGIN OF itab OCCURS 0,

mnr like t247-mnr,

KTX like t247-KTX,

END OF itab.

select-options : mnr for t247-mnr obligatory.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-low.

SELECT ktx mnr FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 's_MONTH-low'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 's_MONTH-low'

value_org = 'S'

display = 'F'

TABLES

value_tab = itab.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-high.

SELECT mnr ktx FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 's_MONTH-high'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 's_MONTH-high'

value_org = 'S'

display = 'F'

TABLES

value_tab = itab.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 16, 2008 at 07:08 AM

    Hi

    after the function module

    F4IF_INT_TABLE_VALUE_REQUEST

    create a workarea and change the values of

    jan feb ....... to 01 02 ......

    this will work after the selection screen event

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      suppose if i give

      JAN -


      FEB in selection screen

      its giving error as lower limit is greater then upper limit

      so i thought of giving numbers

  • avatar image
    Former Member
    Oct 16, 2008 at 07:09 AM

    Hi Suprith,

    After selecting data from table t247, assign 1 to 12 to the respective months and pass into another internal table.

    Pass new internal table to F4 FM.

    Regards

    Kiran

    Note : While selecting data using this Select-option use shoud use Jan to Dec for 1 to 12

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:17 AM

    Hi,

    change retfield value to 'MNR' .

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MNR' " try with this value

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    dynprofield = 's_MONTH-low'

    value_org = 'S'

    display = 'F'

    TABLES

    value_tab = itab.

    Regards,

    Suresh.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:20 AM

    Hi Suprith,

    Just make the following changes.

    In your select-options, declare the screen field name as s_month.

    in your FM call, make the retfield as 'MNR'. This is parameter that specifies which field has to be returned from the record that you have selected.

    regards,

    Anoop Panackal

    Edited by: Anoop Panackal on Oct 16, 2008 12:51 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 07:16 AM

    Hi,

    Do the changes that is in bold:

    Tables: T247.

    DATA:BEGIN OF itab OCCURS 0,

    mnr like t247-mnr,

    KTX like t247-KTX,

    END OF itab.

    select-options : mnr for t247-mnr obligatory.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-low.

    SELECT ktx mnr FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MNR' "change here

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    dynprofield = 's_MONTH-low'

    value_org = 'S'

    display = 'F'

    TABLES

    value_tab = itab.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_month-high.

    SELECT mnr ktx FROM t247 INTO CORRESPONDING FIELDS OF TABLE itab WHERE spras = 'EN'.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MNR' "change here

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    dynprofield = 's_MONTH-high'

    value_org = 'S'

    display = 'F'

    TABLES

    value_tab = itab.

    Regards,

    Saba

    Add comment
    10|10000 characters needed characters exceeded