‎2007 May 14 9:43 AM
Hi i am a new commer in this field. i am working with table control.
i have a table control with 10 fields of which first 2 are key fields and should be input disabled. and for example i have 10 records. When i press a button 'ADD New Records' i should u get a blank table control. AFter that when i m entering the first row and click save. i should get the first 2 colums input disabled and other inputenabled. and this should be only for the first row. when i click back this row should be appended to the table which was displyed at first.
Thanks in advance
‎2007 May 14 9:57 AM
Hi
Using the Field attributes You make the first 2 fields of that table control as OUTPUT fields only, so that they are disbaled for input.
for creating new entries in PAI write the logic:
sample code:
New Entries
WHEN 'NEWE'.
CLEAR: v_new, okcode,v_del_flag.
v_new = 'X'.
CLEAR v_lines.
DESCRIBE TABLE t_102_tc LINES v_lines.
ctr2-lines = v_lines + 10.
ctr2-top_line = v_lines + 1.
WHEN 'SAVE'.
CLEAR okcode.
IF v_input = c_flag.
loop at Itab(table control).
first check whether the record exists in DB table. if not
then update the datavbase table with the records of internal table
(Table control).
endloop.
ENDIF.
clear_102_data.
LEAVE TO SCREEN 101.
ENDIF.
Reward points if useful
Regards
Anji