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

Enable fields after error message

Former Member
0 Likes
3,475

Hi All,

Thanx in advance n will award points for the usefull answers

Please help me out from the following situation

I have a table control. i have 3 buttons on it. INSERT, DELETE and SAVE.

When ever i SAVE the data in the table control saves into table ZVTW.

so my point is right now iam having 2 records in the table control from the table ZVTW. now am clicking on the insert button so that it enables one record to enter the data into it. 4 fields are mandatory. without entering any data iam trying to save. iam showing one error message 'PLEASE ENTER MANDATORY FIELDS'.

fileds are getting disabled.

Now i need to enable the fields again to enter the data.

Please help me out.

19 REPLIES 19
Read only

former_member188770
Active Participant
0 Likes
2,283

Hi ,

Use AT SELECTION-SCREEN ON <Fieldname > FOR <Fieldname >

Thanks,

Poonam

Read only

0 Likes
2,283

Use AT SELECTION-SCREEN ON <Fieldname > -


for Parameter

or AT SELECTION-SCREEN ON <Fieldname > FOR <Fieldname >-low

---For select options.

Read only

0 Likes
2,283

Hi Poonam,

those fields are either parameters or selectoptions. those are from a tablecontrol.

Please let me know how to use that type of condition for tablecontrol.

Thanx in advance.

Read only

Former Member
0 Likes
2,283

well in this case dont put a error message .. try putting in a warning message so that the fields will remain input enabled ...

Read only

0 Likes
2,283

Hi Rohit i tried with warning message. however the fields are still disabled

Read only

0 Likes
2,283

ya eric is quiet write .. u have to validate the fields using chain endchain statement .. for more details in this press f1 on chain to see detials .

Read only

JozsefSzikszai
Active Contributor
0 Likes
2,283

hi,

in table control loop you have to place CHAIN...ENDCHAIN

CHAIN.

FIELD ...

do the chck, issue error message and all the fields, which are listed here (with FIELDS statement) will be open

ENDCHAIN

hope this helps

ec

Read only

0 Likes
2,283

Hi Eric,

I already used the CHAIN and ENDCHAIN on the fields. But still it is disabled.

Read only

0 Likes
2,283

copy the flow logic of ur table control and paste here ..

Read only

0 Likes
2,283

process before output.

  • PBO FLOW LOGIC FOR TABLECONTROL 'TCTRL_CYL_RECOV'

module tctrl_cyl_recov_init.

  • MODULE TCTRL_CYL_RECOV_CHANGE_TC_ATTR.

  • MODULE TCTRL_CYL_RECOV_CHANGE_COL_ATTR.

loop at g_tctrl_cyl_recov_itab

into g_tctrl_cyl_recov_wa

with control tctrl_cyl_recov

cursor tctrl_cyl_recov-current_line.

  • MODULE TCTRL_CYL_RECOV_CHANGE_FIELD_ATTR

module tctrl_cyl_recov_move.

module tctrl_cyl_recov_get_lines.

endloop.

module status_2030.

*

process after input.

  • PAI FLOW LOGIC FOR TABLECONTROL 'TCTRL_CYL_RECOV'

loop at g_tctrl_cyl_recov_itab.

chain.

field zvtw-matnr.

field zvtw-zserialid.

field zvtw-zccylcd.

field zvtw-zprotx.

field zvtw-zcweiqy.

field zvtw-zowfl.

field zvtw-zrweiqy.

field zvtw-zrecd.

field zvtw-zoucd.

field zvtw-zpweiqy.

field zvtw-zrstatuscd. "mod010

field zvtw-zdserialno. "mod010

*{ INSERT DGEK970544 1

field zvtw-zdispcd. "mod013

field zvtw-zconsno. "mod013

field zvtw-zconsdt. "mod013

field zvtw-zcustrepdt. "mod013

field zvtw-zearepdt. "mod013

*} INSERT

field zvtw-zdprocdt. "mod010

module tctrl_cyl_recov_modify on chain-request.

endchain.

field g_tctrl_cyl_recov_wa-flag

module tctrl_cyl_recov_mark on request.

chain. "mod010

field zvtw-zdserialno. "mod010

field zvtw-zdprocdt. "mod010

module tctrl_cyl_recov_check on chain-request. "mod010

endchain. "mod010

endloop.

field ztq_flds-zzhazdcd "Mod016

module m2030_validate_hazcd on request. "Mod016

module tctrl_cyl_recov_user_command.

  • MODULE TCTRL_CYL_RECOV_CHANGE_TC_ATTR.

  • MODULE TCTRL_CYL_RECOV_CHANGE_COL_ATTR.

<u><i><b> module user_command_2030. </b></i></u>

process on value-request. "mod010

field zvtw-zserialid module zserialid_f4_v1. "mod010

Read only

0 Likes
2,283

my logic is in that bold,italic and underlined module.

Read only

0 Likes
2,283

which fields have he problem?

in which module do you issue the error message?

Read only

0 Likes
2,283

do you mean in module user_command_2030? That is not good, it has to be between CHAIN and ENDCHAIN.

Read only

0 Likes
2,283

dont write it in ur user command module .. write it in a module inide ur chain endchain statemnt .

Read only

0 Likes
2,283

yes but that module will be in loop and will it give any problem in the functionality

Read only

0 Likes
2,283

no not at all .. infact it should be in loop so that ur each data of ur table control is properly validated .

Read only

0 Likes
2,283

hi rohit,

i tried this and iam facing strange problem. though i have a record in the first line it is giving a warning to enter record.

Read only

Former Member
0 Likes
2,283

resolved.

Read only

0 Likes
2,283

hi

i read yr post. I gt similar problem in my table control. My field is disable after a message class. How u resolve the problem which u the field can be enable. Thank urgent.