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

SELECT-OPTIONS questions

Former Member
0 Likes
645

Hello friends,

Couple of questions: I have the following code:

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY DEFAULT 0.

I would like to:

1) Display value 0 as default but the DEFAULT 0 for this currency field displays only a '?' instead. It works with other digits but not 0. How do I do this?

2) I would like to make the HIGH (i.e. the upper limit) of this select options as OBLIGATORY. That is to say, the LOWer limit is set to zero by default and the HIGHer limit/part is obligatory and must be filled by users. How to do this please?

Much obliged for your help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
602

Hi,

Use the below code.

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY DEFAULT 0.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'P_AMOUNT-HIGH'.

screen-required = 1.

ELSEIF screen-name = 'P_AMOUNT-LOW'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Edited by: Velangini Showry Maria Kumar Bandanadham on May 22, 2008 4:16 PM

Hello friends,

Couple of questions: I have the following code:

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY DEFAULT 0.

I would like to:

1) Display value 0 as default but the DEFAULT 0 for this currency field displays only a '?' instead. It works with other digits but not 0. How do I do this?

2) I would like to make the HIGH (i.e. the upper limit) of this select options as OBLIGATORY. That is to say, the LOWer limit is set to zero by default and the HIGHer limit/part is obligatory and must be filled by users. How to do this please?

Much obliged for your help.

4 REPLIES 4
Read only

Former Member
0 Likes
602

Try this:

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY.

INITIALIZATION.

p_amount-low = 0.

append p_amount.

Read only

Former Member
0 Likes
602

Hi,

1) Display value 0 as default but the DEFAULT 0 for this currency field displays only a '?' instead. It works with other digits but not 0. How do I do this?

This is a currency field and if it is left blank its 0 by default anyways.

try this for your second validation.

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY default.

at selection-screen on p_amount.

loop at p_amount.

if p_amount-high is initial.

message 'Upper limir is mandatory' type 'E'.

endif.

endloop.

Read only

Former Member
0 Likes
603

Hi,

Use the below code.

SELECT-OPTIONS: p_amount FOR dfkkop-betrh OBLIGATORY DEFAULT 0.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'P_AMOUNT-HIGH'.

screen-required = 1.

ELSEIF screen-name = 'P_AMOUNT-LOW'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Edited by: Velangini Showry Maria Kumar Bandanadham on May 22, 2008 4:16 PM

Read only

Former Member
0 Likes
602

Hi,

try like this.

data : v_matnr type mara-matnr.

select-options so_matnr for v_matnr obligatory default '0'.

at selection-screen on so_matnr.

if so_matnr-high is initial.

message e000(z50871msg) with 'you should enter the value'.

else .

write : 'success'.

endif.

Reward points if helpful.

Regards

Sandeep Reddy

Edited by: Sandeep Reddy on May 22, 2008 3:46 PM

Edited by: Sandeep Reddy on May 22, 2008 3:49 PM