‎2006 Oct 03 7:59 AM
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!!!
‎2006 Oct 03 10:39 AM
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.
‎2006 Oct 03 10:14 AM
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
‎2006 Oct 03 10:39 AM
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.
‎2006 Nov 02 7:11 AM
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.