Application Development 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: 

dialog programming?

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

0 Kudos

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,

Former Member
0 Kudos

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.

0 Kudos

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,