2007 May 04 2:14 PM
Hi, Guru:
when I developed the dialog programming. I have an issue need your help.
in the screen, there are five fields and one control table to need validate.
I seperate them into two CHAIN ... ENDCHAINs. but when doing validate five
fields, if have errors, table control automatically diabled ( grayed),
User don't want that. I try to put all those five fields and table control to one CHAIN
...ENDCHAIN. even can't pass compile.
Thank you in advance.
victor
Hello,
You can try this.
loop at itab <-----the table passed to table control
chain.
itab-tab_fld1.
itab-tab_fld2.
itab-tab_fld3.
module validate.
endchain.
endloop.
module validate input.
*do your validations for table control fields.
if sy-subrc <> 0.
loop at screen.
if screen-name = scrn_fld1.
screen-input = 1.
modify screen.
if screen-name = scrn_fld2.
screen-input =2.
modify screen.
endloop.
end module.
regards.
2007 May 04 2:24 PM
Hello,
Try to put all the fields in one chain-endchain.
And try to build the logic something like below.
chain .
field <screen fielname> module <module name> .
endchain .
module <modulename> input.
if <screen fieldname> is initial.
*error message
endif .
endmodule.
Regards
2007 May 04 2:33 PM
Hi, kesi rahul :
my table control also need validate, I try to put table control and other fields in one
CHAIN. but can't pass compile.
Thanks,
2007 May 04 3:12 PM
Hello,
You can try this.
loop at itab <-----the table passed to table control
chain.
itab-tab_fld1.
itab-tab_fld2.
itab-tab_fld3.
module validate.
endchain.
endloop.
module validate input.
*do your validations for table control fields.
if sy-subrc <> 0.
loop at screen.
if screen-name = scrn_fld1.
screen-input = 1.
modify screen.
if screen-name = scrn_fld2.
screen-input =2.
modify screen.
endloop.
end module.
regards.
2007 May 04 7:04 PM
Hi, kesi rahul:
I mean except table control. on screen, there are some other Input/Output fields.
when validate_text_fields have some error, table control diabled (grayed).
I want it still enable. how to solve it.
Chain.
Fields:
Field1 xxx,
Field2 yyy,
module validate_text_fields.
EndChain.
Loop it_tab.
Chain.
Fields:
table_field1,
table_field2,
module validate_table_control.
EndChain.
Endloop.
Regards,
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |