Application Development and Automation 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: 
Read only

Initilization of select-options help req?

Former Member
0 Likes
1,991

Hi

I have to initilized the select options as default value:

1.doc type : bsart with a 'zimp' .2.doc date :bedat with sy-datum.

I had used :

Initilization.

bsart-low = 'zimp' .

bedat-low = 'sy-datum'.

But its not working.Plz tell me the way?

regards

vipin

Hi

I have to initilized the select options as default value:

1.doc type : bsart with a 'zimp' .2.doc date :bedat with sy-datum.

I had used :

Initilization.

bsart-low = 'zimp' .

bedat-low = 'sy-datum'.

But its not working.Plz tell me the way?

regards

vipin

13 REPLIES 13
Read only

Former Member
0 Likes
1,967

Hi,

You forgot to use append statement.

Use the append statement .

Initilization.

bsart-low = 'zimp' .

bedat-low = 'sy-datum'.

<b>append bsart.

append bedat.</b>

I hope your problem is fully solved now.

Regards,

Rama chary.Pammi

Read only

Former Member
0 Likes
1,967

Hi

do like this

Initilization.

bsart-low = 'zimp' .

bsart-sign = 'I'.

bsart-option = 'EQ'.

append bsart.

bedat-low = 'sy-datum'.

bedat-sign = 'I'.

bedat-option = 'EQ'.

append bedat.

Regards

anji

Read only

0 Likes
1,967

hey..thnaks i got what to do....but tell me one thing,what is this ?

bsart-sign = 'I'.

bsart-option = 'EQ'.

what they are going to do??

Read only

0 Likes
1,967

Hi,

as u know select-options gives u a table with four feilds

1>SIGN

2>OPTION

3>LOW

4>HIGH

when we want to preapre default values to it. we generally use....

go through the below link

http://www.sap-img.com/abap/difference-between-select-options-ranges.htm

Reward if helpful.

Regards,

nagaraj

Read only

0 Likes
1,967

Hi vipin,

sign have the options like 'I' for inclusive 'E' for exclusive

Inclusive means between the input provided in the fields, vice versa for exclusive

OPTION have the options 'EQ ' 'NEQ' 'BT'for between etc

Thanks & Regards,

vinesh

Read only

0 Likes
1,967

ok,

Thanks a lot to all of u..

one more thing...if user does put vaules in both the low & high for bsart-low & bsart-high,it will work fine na?also if he only put vale in bsart-high,will this bsart-option = 'EQ' will create any prob or not?

Read only

0 Likes
1,967

Hi Vipin..

hope u have seen my prev post.

You can set the values for both LOW and HIGH in this way.

INITIALIZATION.

S_BEDAT-SIGN = 'I'. "Include

S_BEDAT-OPTION = 'BT'. "between

S_BEDAT-LOW = SY-DATUM - 30.

S_BEDAT-LOW = SY-DATUM.

APPEND S_BEDAT.

Note: If u set the Value of HIGH then u cant use the Option = 'EQ'. it compares only LOW.

REWARD IF HELPFUL.

Read only

0 Likes
1,967

p_doc-low = 'ZIMP'. " default value for import PO.

p_doc-sign = 'I'.

p_doc-option = 'bt'.

APPEND p_doc.

p_date-low = sy-datum. " default vaule as current date.

p_date-sign = 'I'.

p_date-option = 'bt'.

APPEND p_date.

If i am using this ,its displaying error. both if i used 'EQ' or 'BT'.its error meaasge.

what to do?

Read only

0 Likes
1,967

Hi Vipin..

p_doc-low = 'ZIMP'. " default value for import PO.

p_doc-sign = 'I'.

p_doc-option = 'BT'. "Upper case

APPEND p_doc.

p_date-low = sy-datum. " default vaule as current date.

p_date-sign = 'I'.

p_date-option = 'BT'. "Upper case

APPEND p_date.

Note: You can do this only for SELECT-OPTIONS or Ranges. Check it.

Reward if helpful.

Read only

0 Likes
1,967

thnak you very much to you all!!!my prob is solved

Read only

Former Member
0 Likes
1,967

pass the correct select option name.

select-option:bsart

select-option:bedat

initil..

bsart-low = 'zimp' .

bedat-low = 'sy-datum'.

Read only

varma_narayana
Active Contributor
0 Likes
1,967

Hi Vipin..

This is the code for u.

Initilization.

bsart-low = 'zimp' .

APPEND BSART.

bedat-low = sy-datum. "dont give the quotes

Append Bedat.

Reward if Helpful.

Read only

Former Member
0 Likes
1,967

Hi

SELECT-OPTION ALLWAYS LOOKS LIKE A STRUCTURE

WHICH IS HAVING FILEDS LIKE

<b>LOW

HIGH

OPTION

SIGN</b>

Initilization.

bsart-low = 'zimp' .

<b>BSART-SIGN = EQ OR BT OR LT ETC..

BSART-OPTION = I OR E

APPEND BSART .

CLEAR BSART</b>

bedat-low = 'sy-datum'.

<b>BEDAT-OPTION = I OR E

BEDAT-SIGN = EQ ETC..

APPEND BEDAT

CLEAR BEDAT</b>

<b>rEWARD IF USEFULL</b>.