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

Input Validations

Former Member
0 Likes
729

hi,

My program require 4 inputs. One parameter(obligatory) and remaining are select-options.I am validating all the fields.

When I enter wrong value for obligatory field remaining select-options are being disabled(grayed) untill I click on them.

How to enable them automatically.

Please help me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
700

Hi ,

You can use Chain...enchain event for particular field.

regards,

Nitin.

7 REPLIES 7
Read only

Former Member
0 Likes
701

Hi ,

You can use Chain...enchain event for particular field.

regards,

Nitin.

Read only

faisalatsap
Active Contributor
0 Likes
700

Hi, Sreedhar.

Use AT SELECTION-SCREEN.

and if you are working in Screen Programing than you can use chain. endchain. in PAI

Please Reply if any confusion.

Best Regards,

Faisal

Read only

Former Member
0 Likes
700

Hi,

Set the screen attribute to screen-active = 1 for the select-option fields. Try like this



select-options: s_input for mara-matnr MODIF INP.

after validation of the parameter.
if sy-subrc NE 0.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'INP'.
screen-active = 1.
screen-input = 1.
screen-output = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.

Regards,

Vik

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
700

Hello Sreedhar,

I think for validation you have used AT SELECTION-SCREEN ON <param> because of which your selection-screen is behaving this way.

If you DONOT want this behaviour, then change the event to AT SELECTION-SCREEN. This should suffice.

Hope i am clear.

BR,

Suhas

Read only

RaymondGiuseppi
Active Contributor
0 Likes
700

- Put the parameters/select-options in a [SELECTION-SCREEN BLOCK|http://help.sap.com/abapdocu/en/ABAPSELECTION-SCREEN_BLOCK.htm].

- Execute you check in a [AT SELECTION-SCREEN|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN.htm] [ON BLOCK|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_4@4@] blo.

When the error will be sent, the whole block keeps editable and the cursor is at the first field of the block.

Regards,

Raymond

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
700

Hi,

You can use at selection-screen block as suggested. It will work. Here is the sample.

tables mara.

selection-screen begin of block b1.

parameters p1 type matnr obligatory.

select-options s1 for mara-matnr.

selection-screen end of block b1.

at selection-screen on block b1.

if p1 ne '123'.

message e000 with 'Error'.

endif.

Read only

Former Member
0 Likes
700

Thank you all for your help