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

Table control

Former Member
0 Likes
282

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

1 REPLY 1
Read only

Former Member
0 Likes
237

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