‎2008 Dec 15 7:56 PM
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.
‎2008 Dec 15 8:02 PM
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
‎2008 Dec 16 3:31 AM
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.
‎2008 Dec 16 4:45 AM
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
‎2008 Dec 16 5:38 AM
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
‎2008 Dec 16 5:44 AM
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
‎2008 Dec 16 10:11 AM
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
‎2008 Dec 16 2:05 PM
>
Can you suggest the alternative please.
a) Find a more suitable exit.
2) do a mod.
Rob