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

Former Member
0 Likes
1,674

Hi ,

When validating a field on the selection screen ( using AT SELECTION SCREEN ON FIELD ) , if there is an error then the whole screen is frozen wid only the error filed being open ..

my requirement is dat along with the error field , some other fields should also be open for input ..

how do i do go about it...please help..

Thanx and regards,

Srestha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,638

use information message instead of error message

14 REPLIES 14
Read only

Former Member
0 Likes
1,638

Hi,

Use a BLOCK and then validate in

AT SELECTION SCREEN ON BLOCK b0.

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/34a23ad9b511d1950e0000e8353423/content.htm

Cheers

VJ

Read only

0 Likes
1,638

Hi ,

thanx 4 da prompt reply...but i have two different blocks... if a field in block 1 is in error den another field in block 2 has to be open 4 input in addition to the error field..

Please help.

Thanx nd regards,

Srestha

Read only

0 Likes
1,638

Define both the blocks in a third block and use the validation on that block.

I guess u can have upto 5 nested blocks. SAP has provided blocks only for the above requirment scenarios..

Cheers

VJ

Message was edited by: Vijayendra Rao

Read only

0 Likes
1,638

Hi ,

I cannot use blocks for this because the fields to be validated are not placed serially...there other fields in between which remain open if i use the validation on the block .

Thnx nd regards,

Srestha

Message was edited by: Srestha Dutta

Read only

Former Member
0 Likes
1,639

use information message instead of error message

Read only

Laxmana_Appana_
Active Contributor
0 Likes
1,638

Hi,

Define screen groups on related fields and do the validations.

sample code :

REPORT demo_at_selection_screen_pbo.

PARAMETERS: test1(10) TYPE c MODIF ID sc1,
            test2(10) TYPE c MODIF ID sc2,
            test3(10) TYPE c MODIF ID sc1,
            test4(10) TYPE c MODIF ID sc2.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 = 'SC1'.
      screen-intensified = '1'.
      MODIFY SCREEN.
      CONTINUE.
    ENDIF.
    IF screen-group1 = 'SC2'.
      screen-intensified = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Regards

Appana

Read only

Former Member
0 Likes
1,638

Hi Srestha,

try this.

Define a S message and then trigger LEAVE LIST-PROCESSING to return back to the selection screen.

MESSAGE S999(ZM) with 'ERROR TESTING'.

LEAVE LIST-PROCESSING.

My 2 cents on this.. Best is to rearrange the selection fields and use the validation at blocks.

Cheers

VJ

Read only

0 Likes
1,638

Hi ,

i cannot use a s message...have to use an error message..any other way of doin it since i cant re-arrange the fields.

Plz help .

Thanx nd regads,

srestha

Message was edited by: Srestha Dutta

Read only

0 Likes
1,638

use only AT SELECTION_SCREEN instead of AT SELECTION-SCREEN ON FIELD and try

Read only

0 Likes
1,638

If you define all the fields in a single block than it would make all the fields as enabled.

Regards

Anurag

Read only

0 Likes
1,638

Hi,

I think as mentioned above by Chandrasekhar ,

in ur case best option is to simply use AT SELECTION-SCREEN.

AT SELECTION-SCREEN.
  IF CARRID-LOW IS INITIAL 
    OR CITY_FR IS INITIAL 
    OR CITY_TO IS INITIAL. 
    MESSAGE E000(HB). 
  ENDIF.

You can verywell display a error message...

Cheers

VJ

Read only

Former Member
0 Likes
1,638

Hi,

One solution is:

Set a flag if an error occurs at selection-screen validation.

And, AT SELECTION-SCREEN OUTPUT, use this flag and loop at screen to set the other field enabled for input...

Hope you understood....

Regards,

Raj

Read only

0 Likes
1,638

But i need to display an error message also...

Read only

0 Likes
1,638

Hello,

Can you paste your selection-screen and the conditions on which you want to raise error?

Regards.

Naimesh