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

error in validations module pool

Former Member
0 Likes
1,503

I have decalred select options in module pool.. and  i  have declared a event to check validations in  top incude .

now in my screen field when i enter any wrong value , all my other screen fields are disabled , can any one tell me how to enable other screen fields when there is error message.

the below code is in my top include.

SELECTION-SCREEN BEGIN OF SCREEN 0116 AS SUBSCREEN.
SELECT-OPTIONS:g_struct FOR LXE_OBJCTS-OBJECT_NAM NO INTERVALS.
SELECTION-SCREEN END OF SCREEN 0116.

AT SELECTION-SCREEN ON G_STRUCT.
PERFORM validation_struc.

13 REPLIES 13
Read only

gouravkumar64
Active Contributor
0 Likes
1,389

Hi,

Check the validation in AT SELECTION  event after E type messages,

For Screen programming try with CHAIN ENDCHAIN...

Thanks

Gourav.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,389

Define a BLOCK in SELECTION-SCREEN and use AT SELECTION-SCREEN ON BLOCK so every field define in the BLOCK will be available for input when an error is raised. Usually group parameters which are used in a common check like a SELECT using multiple parameters in the WHERE criteria.

SELECTION-SCREEN BEGIN OF BLOCK block.

    SELECT-OPTIONS: g_struct FOR LXE_OBJCTS-OBJECT_NAM NO INTERVALS.

    SELECT-OPTIONS: g_others ...

SELECTION-SCREEN END OF BLOCK block.

AT SELECTION-SCREEN ON BLOCK block.

    PERFORM validation_struc.

    PERFORM validation_others...


Regards,

Raymond

Read only

0 Likes
1,389

hi Raymond,

i have two  select option fields and i have also designed other normal screen fields like input fields, check boxes, radio buttons in module pool,. 

when i enter wrong value in selectoption field , all other screen fields are disabled,

instead of that i need to show only error message and all other screen fields must be enabled.

Read only

0 Likes
1,389

Hello Kiran,

Try to use Chain and Endchain statement to enable remaining fields for input. Hope this will solve your problem.

OR

Try to display error message in a popup screen using following statement

MESSAGE 'text' TYPE 'I' DISPLAY LIKE 'E'.

write the following statement after above statement.

LEAVE TO SCREEN sy-dynnr. 

Shravan

Read only

0 Likes
1,389

HI shravan,

I am facing problem with the validations and screen navigations,

i have called select option in my tabstrib and i did validations for this select option in top include

this is my selec option called in my tabstrip

SELECTION-SCREEN BEGIN OF SCREEN 0116 AS SUBSCREEN.
SELECT-OPTIONS:g_struct FOR LXE_OBJCTS-OBJECT_NAM NO INTERVALS.
SELECTION-SCREEN END OF SCREEN 0116.

this is the validation .

AT SELECTION-SCREEN ON G_STRUCT.
PERFORM validation_struc.

I have number of tabs in my tab strip , when my cursor is in this select option , when i click other tab

it doesent respond , how to handle this.

 


Read only

0 Likes
1,389

Hello Kiran,

Have you followed any of my previous suggestion.  If yes, then which one you followed?

Give a try with other one also.

Shravan

Read only

0 Likes
1,389

I tried both of them , but i am still facing the problem with the tab strip,

when my cursor is in the selecoption field , when i click other tab button , it doesent respond ...

Read only

0 Likes
1,389

Hello Kiran,

In the second option try to modify the statement Leave... , use the main screen number in which your tabstrip is present instead of using sy-dynnr. let me know how it goes.

One more question, without my suggested code, are you able to access other tabs when cursor is in the select option field?

Shravan

Read only

0 Likes
1,389

I have tried the option with call screen statement it works ,

but I got one more problem , when i am switching repeatedly between two tabs my program

goes to dump saying that

'No further list processing possible , you requested too many consecutive nested call screens .at present maximum number of permitted nested screen levels is restricted to  50'.

then it shows my code what i have written in validations,,...

FORM VALIDATION_STRUC .

DATA: lv_tabname TYPE dd02l-tabname.

CASE OK_CODE.

WHEN 'TRANSL'.

if g_struct-low IS INITIAL.
   MESSAGE ID g_mid TYPE 'E'  NUMBER '001'.
ELSE.
SELECT SINGLE tabname INTO lv_tabname
                       FROM dd02l WHERE tabname = g_struct-low.
         IF sy-subrc <> 0.
         MESSAGE ID g_mid TYPE 'E'  NUMBER '000'.
        ENDIF.

ENDIF.
WHEN OTHERS.
call SCREEN 110.
ENDCASE.
ENDFORM.          

Read only

0 Likes
1,389

Hello Kiran,

I believe this is due to the following code.

" WHEN OTHERS.

call SCREEN 110. "


in the validation which is called every tab in the tabstrip control repeatedly and every Ok_code other than TRANSL.

Try to remove the above code and give a try.

Shravan

Read only

0 Likes
1,389

it is not resolved yet...

Read only

0 Likes
1,389

Hello Kiran,

yes it is because of this code,

you can  replace  the call screen with leave to  screen xxx.

" WHEN OTHERS.

leave to screen 110.

for your validations: why dont you try CHAIN ENDCAHIN instead of doing all these.

Read only

former_member214709
Participant
0 Likes
1,389

Dear Kiran,

Try the event AT SELECTION-SCREEN ON OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = " ".

SCREEN-ACTIVE = 'X'.

ENDIF.

ENDLOOP.

Regards

Dinesh