Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

Tags:
replied

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

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question