‎2007 Jun 14 9:36 AM
Hello Friends,
is it possible to make some of the table control fields as mandatory ?
Regards,
‎2007 Jun 14 2:37 PM
hi SHAh
<b>u can define the error message in the PAI of the screen
case sy-ucomm.
when 'CLICK' ***** function code of button
move field to <variable of type field>
if sy-subrc ne 0.
message eoo1(<message class>)***** define message class in se91
endif.
end case.</b>
plz close the thread if u have got the sol and award points accordingly.
regards
ravish
<i><b>plz dont forget to reward points if helpful</b></i>
‎2007 Jun 14 9:43 AM
Hi,
I don't know if it is possible for table control, but it is possible in alvs.
1) Create a dynamic internal table.
2) Create the field catalog for the internal table.
3) Call the alv display function.
4) make the grid editable to simulate a table control.
<b>Reward points</b>
Regards
‎2007 Jun 14 9:44 AM
Hi ,
Yes,
when creating Table control in screen painter u can assign mandatory field in properies.
Rewards points if helpfull
Regards
Suresh.d
‎2007 Jun 14 9:47 AM
Hi suresh,
Whih property it is ?
I have seen did not find out...
Regards,
‎2007 Jun 14 9:46 AM
Hi,
You can do that in the PBO's LOOP AT ENDLOOP over the table control by executing a module and inside the module you can use LOOP AT SCREEN.
ENDLOOP and then use the code as follows.
LOOP AT table control.
MODULE init_tab.
ENDLOOP.
MODULE init_tab OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-NAME = 'TABLE-FILED2' OR ....
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
You can as well make the field mandatory when you create the table control in the Screen painter.
<b>Double click on the field you want to make mandatory to open the attributes screen there in the attributes section under tab Program, for the dropdown Input select Required</b>.
Regards,
Sesh
.
‎2007 Jun 14 9:48 AM
hi,
it will be possible go to element list -> special attributes -> tick on req field
‎2007 Jun 14 9:49 AM
HI
yes it is very much possible. u can mark the fields as mandatory there is an option when u define the fields of the table control
regards
ravish
<b>reward if useful</b>
‎2007 Jun 14 9:54 AM
hi Sesh,
Thanks for your reply, it works,
One question: where I can define the error msgs, if the field is not filled ?
Regards,
Message was edited by:
Shah H
‎2007 Jun 14 9:56 AM
hi,
when you have created your table control, all its fields will be include in the element list
‎2007 Jun 14 2:37 PM
hi SHAh
<b>u can define the error message in the PAI of the screen
case sy-ucomm.
when 'CLICK' ***** function code of button
move field to <variable of type field>
if sy-subrc ne 0.
message eoo1(<message class>)***** define message class in se91
endif.
end case.</b>
plz close the thread if u have got the sol and award points accordingly.
regards
ravish
<i><b>plz dont forget to reward points if helpful</b></i>