‎2012 Feb 10 5:34 AM
Hi All,
I have a created a table control in modulepool, where I have language,material and description as columns. The requirement is to have english(EN) as default in all rows and non editable.
This should be applicable for all lines...
as of now I tried showing 10 lines as default rows with EN as language. But after pressing enter, new rows are not getting editable. I dont think this is right approach..
any ideas/approach on this would go a long way.
Thanks & Regards
Himayat
‎2012 Feb 10 8:28 AM
Please search on sdn you will find many example. Headstart is you have to initializae the parameter TC_TABLE_CONTROL-LINES dynamically in PBO.
Nabheet
Edited by: nabheetmadan09 on Feb 10, 2012 1:58 PM
‎2012 Feb 10 10:48 AM
Thanks Nabheet for your reply,
In PBO of the screen, I wrote this but I dont think this is good way of doing. I did search on sdn, couldnt get much help.
Can you please elaborate on this ?
IF it_copy_to_mat IS INITIAL .
DO 20 TIMES.
CLEAR w_copy_to_mat.
w_copy_to_mat-lang = 'EN'.
APPEND w_copy_to_mat TO it_copy_to_mat.
CLEAR w_copy_to_mat.
ENDDO.
ENDIF.Thanks & regards
Himayat
‎2012 Feb 10 11:03 AM
Himayat can you please specify your requirment clearly . do you want to default values or make table control lines editable.
Nabheet
‎2012 Feb 10 11:17 AM
Hi Nabheet,
My requirement is like this : I have a table control in which there are three columns. Material , Material description, Language.
As part of requirement, the language is always to be EN only. So I need to have EN as default value and non editable in all rows.
So user will fill value for rest two columns only which are editable.
As I mentioned in my earlier post , I wrote the code in PBO for default value as EN in say twenty rows. But I dont think that is write of doing it.
Thanks & Regards
Himayat
Edited by: Himayatullah Md on Feb 10, 2012 12:18 PM
‎2012 Feb 10 1:59 PM
Okie..You can simply keep the column as input disabled while designing and in PAI loop default the value to EN inside Loop endloop.
Nabheet
‎2012 Feb 10 2:53 PM
Well, don't do it in the PBO; do it in the PAI if any other field is completed.
Rob
‎2012 Feb 11 2:34 AM
Thanks Nabheet and Rob,
The approach you guys suggested works beautifully.
Marking question as resolved.
Himayat.