‎2007 Aug 31 12:46 PM
hi frnds,
how to declare select option with default value,
for example in my select-options i want to display sales org with default of LPKZ.
how to do this?
Gowri
‎2007 Aug 31 12:48 PM
Hi,
SLECT-OPTIONS : S_MATNR for MARA-MATNR.
INITILIZATION.
S_MATNR-LOW = '1234'.
S_MATNR-HIGH = '4321'.
S_MATNR-OPTION = 'BT'.
S_MATNR-SIGN = 'I'.
Append S_MATNR.
Regards
Sudheer
‎2007 Aug 31 12:50 PM
Hi,
try this:
TABLES: VBAK.
*
SELECT-OPTIONS: S_VKORG FOR VBAK-VKORG.
*
INITIALIZATION.
S_VKORG-SIGN = 'I'.
S_VKORG-OPTION = 'EQ'.
S_VKORG-LOW = 'LPKZ'.
APPEND S_VKORG.
*
Regards, Dieter
‎2007 Aug 31 12:50 PM
Hi
under the INITIALIZATION event
Select-option acts like an internal table
Ex:-
Select-options : s_matnr for mara-matnr.
Initialization.
S_matnr-low = 1000.
S_matnr-high = 2000.
S_matnr-option = bt.
S_matnr-sign = i.
Append s_matnr.
Here low = lower limit value
High= higher limit value
Sign = inclusive or exclusive
Option = equal , between , lessthan etc..
reward if usefull
‎2007 Aug 31 12:50 PM
hi,
try this.
*SELECT OPTIONS
SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
*INITIALIZATION
INITIALIZATION.
CUST_NO-LOW = '01'.
CUST_NO-HIGH = '5000'.
CUST_NO-SIGN = 'I'.
CUST_NO-OPTION = 'BT'.
APPEND CUST_NO.
‎2007 Aug 31 12:51 PM
SELECT-OPTIONS - value_options
Syntax
... [DEFAULT val1 [TO val2] [OPTION opt] [SIGN sign]]
These additions allow you to specify a start value, allow lower case, and integrate a search help or a SET/GET parameter.
This addition defines start values for the columns in the first line of the selection table . Without the addition DEFAULT, initial values of the corresponding type are used as start values.
val1 and val2 are used to define start values for columns low and high. These start values can either be specified as literals or as previously defined data objects. If the data type of the specified start values does not match the data type of the columns, these are converted according to the conversion rules.
The addition OPTION is used to define the start value for the option column. If the addition TO is not specified, you must specify one of the expressions eq, ne, ge, gt, le, lt, cp, or np directly for opt. If the addition TO is specified, you must either specify bt or nb. If the addition OPTION is not used, the content of the option column is set to "EQ" or "BT". If you specify cp or np, the start value in val1 must contain at least one of the wildcard characters "*" oder "+" when data transfer takes place to the selection table, otherwise the program terminates.
The addition SIGN is used to define the start value for the sign column. You must either specify i or e directly for sign. If the addition SIGN is not used, the content of column sign is changed to "I".
The times at which the start values are transferred to the first position in the selection table are processed in the same way as with the addition DEFAULT to the PARAMETERS statement. If the selection table is not empty when the transfer takes place, the start values are not transferred to the first position. Only the header line in the selection table is filled with these values, which does not influence the selection criterion.
The corresponding input fields on the selection screen are only filled with the start values if the first line in the selection table is not changed before the selection screen is sent. The system displays the value contained in the selection table when the event AT SELECTION-SCREEN OUTPUT has been processed. Start values for multiple selection can only be defined by inserting lines in the selection table.
eg :
SELECT-OPTIONS s_vkorg FOR vbrk-vkorg DEFAULT 'LPKZ'.
reward if useful
‎2007 Aug 31 12:51 PM
Hi,
Check the following
SELECT-OPTIONS: so_vkorg FOR tvko-vkorg DEFAULT 'JP40'.
<b>Reward if helpful.</b>
‎2007 Aug 31 12:51 PM
select-options s_vkorg for bseg-vkorg.
initialization.
s_vkorg-low = 'LPKZ'.
Reward points if useful, get back in case of query...
Cheers!!!
‎2007 Aug 31 12:53 PM
SLECT-OPTIONS : S_vkorg for vbak-vkorg.
INITILIZATION.
S_vkorg-LOW = 'LPKZ'.
S_vkorg-HIGH = ' '. [ if u want assign any thing there if not dont write this statement at all ]
S_vkorg-OPTION = 'eq'.
S_vkorg-SIGN = 'I'.
Append S_MATNR.
reward points if helpful
‎2007 Aug 31 12:53 PM
Hello Gowri Shankar,
Select option is an internal table with 4 fields: sign, option, low, high.
<b>possible values:</b>
sign --> E, I.
Option --> = <> <= >=
low --> lower interval.
High --> Higher interval.
Youcan declare select option with default values using <b>INITIALIZATION</b> event.
s_sample-sign = 'I'
s_sample-option = 'EQ'
s_sample-low = 'LPKZ'
s_sample-high = ' '.
append s_sample.
clear s_sample.
now automatically when u run this code you will get default value.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
‎2007 Aug 31 1:13 PM
hi,
selection-screen : begin of block blk1 with frame title text-001.
select-options : s_sorg for vbak-vkorg default 'LPKZ'.
selection-screen : end of block blk1.
Reward with points if helpful.
‎2007 Aug 31 1:14 PM
Hi,
Use the following line.
SELECT-OPTIONS: so_vkorg FOR tvko-vkorg DEFAULT 'JP40'.
Try and reward if found useful.