‎2008 Aug 16 8:02 AM
Hi,
I have developed a Module-pool Prg
in Which i gave a error message if
User enters a particular Contry & enter the ban
color code for that particular country....
But the problem is whenever the error message is
Trigger the Ban color code field is disabled..
I am not been able to enter new color code instead
of ban color or i have to refresh again...and reenter all
entries...
Can any one.....
‎2008 Aug 16 8:19 AM
Hi,
In module pools ,do the validations in CHAIN END CHAIN only.
See below eg:
For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.
CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
*&---------------------------------------------------------------------*
*& Module modify_screenfields INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
ENDMODULE. " modify_screenfields INPUTRegards,
Anversha
‎2008 Aug 16 8:19 AM
Hi,
In module pools ,do the validations in CHAIN END CHAIN only.
See below eg:
For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.
CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
*&---------------------------------------------------------------------*
*& Module modify_screenfields INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
ENDMODULE. " modify_screenfields INPUTRegards,
Anversha
‎2008 Aug 16 8:32 AM
Hi,
You need to include ur field in between chain and end chain.
And use Field statement.
When ever an error or warning message occurs on a scree n field validation,
Fields automatically gets disabled.
In order to make them in put enabled use Field Statement.
Syntax: Field field_name Module Module_name [on input or On Request]