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

selection screen validations

Former Member
0 Likes
934

In my selection screen i have 1. vbeln as select-options

2. radiobutton1

3. radionbutton2

4. radiobutton3 all these 3 in block.

Now my requirement is when the users enters value in VBELN field and comes out of focus then Radiobuttons has to be disabled.

my problem is i am not getting in which event i have to write the logic

i.e Either he can enter value in VBELN field or select an radiobutton.

9 REPLIES 9
Read only

Former Member
0 Likes
902

AT SELECTION SCREEN. You have to handle this.

Refer this code

Initiate the 'AT selection-screen' EVENT from radiobuttons.

In-order for the Radiobutton selection process to initiate the 'AT selection-screen' event you need to

add the 'USER_COMMAND' option to the parameter declaration. See code below.

*Code used to Initiate the 'AT selection-screen' EVENT from radiobuttons.

selection-screen begin of block group with frame title text-s04.
parameters: p_sel1 type c radiobutton group sel user-command upd.
parameters: p_sel2 type c radiobutton group sel.
parameters: p_sel3 type c radiobutton group sel.
selection-screen end of block group.

http://www.sapdevelopment.co.uk/reporting/selscr/selscr_sameline.htm

http://www.sapdevelopment.co.uk/reporting/selscr/selscr_loopscreen.htm

Message was edited by:

Judith Jessie Selvi

Read only

Former Member
0 Likes
902

Hi,

try the same in at selection-screen.

use loop at screen.

Regards

Shiva

Read only

Former Member
0 Likes
902

REPORT zex31 .

PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X',

field1(10) modif id md1,

field2(10) modif id md1.

PARAMETERS : R2 RADIOBUTTON GROUP RG ,

field3(10) modif id md2,

field4(10) modif id md2.

AT SELECTION-SCREEN output.

if r1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD1'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

elseif r2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

endif.

start-of-selection.

Read only

Former Member
0 Likes
902

when the cursor comes out of focus of that field i have to write the logic ,and not at selection screen event.

Read only

Former Member
0 Likes
902

Hi,

Try this.

At selection-screen output.

loop at screen.

if screen-name = 'RADIOBUTTON1' or screen-name = 'RADIOBUTTON2'

or screen-name = 'RADIOBUTTON3' .

if vblen is not initial.

screen-input = '0'.

modify screen.

endif.

endif.

endloop.

Thanks,

Sutapa.

Read only

Former Member
0 Likes
902

Enter vbeln number in select options and hit enter .


tables : vbak.

data: dynfields type table of dynpread with header line.

selection-screen begin of block b1 with frame.

select-options : so_vbeln for vbak-vbeln.
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND
              R DEFAULT 'X' modif id abc.
PARAMETERS : R2 RADIOBUTTON GROUP RG modif id abc.
PARAMETERS : R3 RADIOBUTTON GROUP RG modif id abc.
selection-screen end of block b1.

at selection-screen output.
if not so_vbeln[] is initial.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

//Now my requirement is when the users enters value in VBELN field and comes out of focus then Radiobuttons has to be disabled

what do u mean by out of focus ?

and brief in detial if any more modification is required.

substituting screen-input = '0' for

screen-active = '0' will make the radiobuttons disappear .

u can try this also .

regards,

vijay

Read only

Former Member
0 Likes
902

actually i have to write the logic when the cursor is in the selection screen .

i.e after entering values in the Field and press tab (so that cursor comes out of that field) automatically radiobuttons has to be disabled.

Read only

Former Member
0 Likes
902

hi vijay .

out of focus means after entering values in the Field VBELN when press TAB

cursor comes out of field at that time it has to check whether the Field has value ,

if it has value the it should disable radiobutton..

the thing is 1. i know the logic to disable 2. how to check whether values r there or not.. my main problem is where or which event i have to write this logic.

if i get a solution it will be good.

Read only

0 Likes
902

Hi nagaraju,

1. VBELN field and comes out of focus

In sap gui, (abap) ,

there is no such facility of tracing the

events like ON FOCUS, LOST FOCUS, etc,

which are available in most other programming languages like vb, vc++ etc.

2. Hence, if the user presses TAB,

and the VBELN field is out of focus,

there is no way we can trace this particular out of focus event.

regards,

amit m.