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

Enabling screen field

Former Member
0 Likes
1,360

Hi Friends,

I am validating value of a field and showing an error message in an user exit. When the error message appears all the screen fiedls are disabling for input. I want to enable the checked field for input.

Please note the error message code is in vendor master user exit before saving. As of my knowledge we can use loop at screen for a field at PAI of dialogue program. How to handle this in the exit.

Regards.

7 REPLIES 7
Read only

Former Member
0 Likes
968

From the help on MODIFY SCREEN:

"This statement can be used in the statement block after LOOP AT SCREEN only
and makes sense only during PBO processing."

Rob

Read only

Former Member
0 Likes
968

You didnot select correction user exit.

You have a mistake in PAI.

If a warning or error message occurs in a module that is not linked with a *FIELD or CHAIN* statement, none of the fields on the screen will be ready for input. In this case, the user can only exit the program, but only if a corresponding unconditional module call is provided.

Read only

Former Member
0 Likes
968

hello

what you need to do is write the module for validation along with the keyword field < fieldname> like :

field <fieldname > module validation.

write your code in this module.

if any error comes in this module,the field which is mentioned here will remain open for input and others will be disabled. but if you want other fields also to be open for input when any error message comes the use the varios field name in between chain and endchain like :

chain

field <field1>

field <field2>

field <field3>

field <field4>

module validation.

endchain.

now if any error comes in this module,the fields which are

mentioned here will remain open for input and others will be disabled.

hope this helps.

regards

geeta gupta

Read only

Former Member
0 Likes
968

HI,

try this out,

PROCESS AFTER INPUT.

MODULE user_command_0100.

FIELD: change_type,

partner_fct.

MODULE validate_entries. "Validate inputs

MODULE validate_entries INPUT.

  • Validate Partner Function

IF partner_fct IS NOT INITIAL.

( CHECK FOR VALIDATION )

IF sy-subrc NE 0.

LOOP AT SCREEN.

IF screen-name = gv_partner_fct.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

sy-ucomm = 'OK'.

MESSAGE (............)

ENDIF.

ENDIF.

ENDMODULE. " VALIDATE_ENTRIES INPUT

Read only

Former Member
0 Likes
968

Your requirement can be fulfilled if:

FIELD <FIELD_NAME> MODULE <CHECK_MODULE>.

In Module <CHECK_MODULE> " you give error message

You have to make sure that the User-Exit is being called by the Std Program in above fashion

Read only

Former Member
0 Likes
968

Hi Friends,

Thanks for the replies. But, I am writing my code in an user exit which executes before saving the transaction. So, I can not be able to modify at PAI level. Can you suggest the alternative please.

Regards

Read only

0 Likes
968

>

Can you suggest the alternative please.

a) Find a more suitable exit.

2) do a mod.

Rob