Skip to Content
avatar image
Former Member

select-options default values

Hi,

I wrote the code for select-options default values.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_matnr FOR afpo-matnr . " material number

SELECT-OPTIONS : s_dauat FOR afpo-dauat. " Order Type

SELECT-OPTIONS : s_dwerk FOR afpo-dwerk OBLIGATORY. " Plant

*SELECT-OPTIONS : s_ftrmi for afko-ftrmi. " Actual release date

*SELECT-OPTIONS : s_date FOR date. " 28 May 2008

SELECTION-SCREEN END OF BLOCK b1.

***INITIALIZATION

INITIALIZATION.

S_MATNR-SIGN = 'I'.

S_MATNR-OPTION = 'BT'.

S_MATNR-LOW = '94000000001'.

S_MATNR-HIGH = '94999999999'.

APPEND S_MATNR.

CLEAR S_MATNR.

S_MATNR-SIGN = 'I'.

S_MATNR-OPTION = 'BT'.

S_MATNR-LOW = '95000000001'.

S_MATNR-HIGH = '95999999999'.

APPEND S_MATNR.

CLEAR S_MATNR.

S_MATNR-SIGN = 'I'.

S_MATNR-OPTION = 'BT'.

S_MATNR-LOW = '96000000'.

S_MATNR-HIGH = '96999999'.

APPEND S_MATNR.

CLEAR S_MATNR.

S_DAUAT-SIGN = 'I'.

S_DAUAT-OPTION = 'EQ'.

S_DAUAT-LOW = 'ZM02'.

APPEND S_DAUAT.

CLEAR S_DAUAT.

S_DWERK-SIGN = 'I'.

S_DWERK-OPTION = 'EQ'.

S_DWERK-LOW = '1010'.

APPEND S_DWERK.

CLEAR S_DWERK.

After executing the report ,the output is not showing any data.

But without default values (removing Initialization Part)when i am entering the same data manually ,the output is containing data.Please suggest where I am wrong.

Thanks

Venkat

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 18, 2008 at 07:20 AM

    Hi ,

    Add Preceeding zeroes to MATNR field ....

    "like
    
    INITIALIZATION.
    S_MATNR-SIGN = 'I'.
    S_MATNR-OPTION = 'BT'.
    S_MATNR-LOW = '000000094000000001'.
    S_MATNR-HIGH = '000000094999999999'.
    APPEND S_MATNR.
    CLEAR S_MATNR.

    Thanks

    Edited by: Always Learner on Oct 18, 2008 9:21 AM

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 18, 2008 at 07:17 AM

    may be there is no data for those values you filled in the selection scree. check it once in the database.

    Add comment
    10|10000 characters needed characters exceeded

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

    Hello venkat rao,

    Hello try this way it is working fine just know i have tested.

    TABLES: mara.

    SELECT-OPTIONS: s_matnr FOR mara-matnr.

    AT SELECTION-SCREEN OUTPUT.

    s_matnr-sign = 'I'.

    s_matnr-option = 'BT'.

    s_matnr-low = '94000000001'.

    s_matnr-high = '94999999999'.

    APPEND s_matnr.

    CLEAR s_matnr.

    Add comment
    10|10000 characters needed characters exceeded