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
416

Hi All,

Can anyone tell me tht how can we store the records in table control 2 a database table wit a field nt displayed in table control as 001, 002 and so on wit each record in table control for a particular personel no.??

Many Thanks in Advance!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
395

Hi Vikas,

U just need to write name of the table control with current line instead of using sy-tabix or ay-index tht is-

PROCESS AFTER INPUT.

LOOP AT itab.

MODULE table.

ENDLOOP.

MODULE table INPUT.

itab-<fieldname> = tc100-current_line.

MODIFY itab INDEX t300-current_line.

ENDMODULE.

also when u press save jus write-

when 'SAVE'.

modify <dbtab> from table itab.

Hope this helps.

Regds,

Seema.

3 REPLIES 3
Read only

former_member378318
Contributor
0 Likes
395

Hi Vikas,

You can either have it as a hidden field as part of the table control and maintain its value each time a record is added/deleted on the table control. Then on save you can transfer the value straight to the database from your table control.

Or you can determine the value of the field on pressing save. If it is part of the database table key then you will have to determine the next available value by reading the database table first and work out the next number in the sequence.

Hope it helps

Read only

Former Member
0 Likes
396

Hi Vikas,

U just need to write name of the table control with current line instead of using sy-tabix or ay-index tht is-

PROCESS AFTER INPUT.

LOOP AT itab.

MODULE table.

ENDLOOP.

MODULE table INPUT.

itab-<fieldname> = tc100-current_line.

MODIFY itab INDEX t300-current_line.

ENDMODULE.

also when u press save jus write-

when 'SAVE'.

modify <dbtab> from table itab.

Hope this helps.

Regds,

Seema.

Read only

Former Member
0 Likes
395

Hi

U can also hide them there is also an attribute in the layout format and u can also use screen-invisible property

Hope this helps.

Regds,

Seema.