‎2008 Dec 24 2:46 PM
Hi,
I have created a screen using Table control Wizard. While created I used an Internal table.
Some of the fields in this internal table should have values selected only from respective check table and should not take any other data.
How do I do this ?
Ex: i_tab-kunnr field should have values selected from KNA1-kunnr only. And when this field is selected from screen, a screen should display values and when selected it should be assigned to this field in screen.
Regards
Sudhaker
‎2008 Dec 27 6:18 AM
‎2008 Dec 27 6:29 AM
Hi,
if you are declaring this filed in the screen as the check table field it will solve your problem.
(or).
you can put the validation also for the value of that filed, what ever values your are entering.
‎2008 Dec 27 6:59 AM
hi,
have you assigned a check table for your field in table control in screen attributes.
if not you can assign the check table in screen attributes. it will solve your problem. and it will give a list of possible values from the same check table also.
‎2008 Dec 27 8:24 AM
Hi Sudhaker,
For fetching values...
We can use a process on value request (POV) for the field in PAI
and manually populate it
process on value-request.
field internaltable-XXXX module f_get_f4.
in the subroutine fill the F4 with the data we need as restricted and use a
F4IF_INT_TABLE_VALUE_REQUEST to poulate data on pop up F4
For Validation....we can always do a check in the chain..endchain of PAI for the field
***********PAI
loop at internal table.
chain.
field: internaltable-XXXX..
module f_check_field on chain-request.
endcahin.
modify _data.
endloop.
in subroutine we can check if value is present or not in the main table with a direct select:eg:
if internaltable-field is not initial.
select single XXX from tbale where XXX = internaltable-field.
if sy-subrc <> 0.
Message 'Value not maintained in table ' type 'E'.
endif.
endif.
Hope it helps
Regards
Byju
‎2008 Dec 27 11:06 AM
hi look at this..
get the screen elements from the button get fields from the button then assign these values to the fields on the screen.
‎2009 Jun 15 5:40 AM