‎2006 Nov 30 11:43 AM
Hello;
I have a question.
I put a table controls object in to screen.
After entering the data, when I push the save button I want to insert these data into the db table.
Could you help by giving me a simple example?
Thanks a lot.
‎2006 Dec 01 6:56 AM
case sy-ucomm.
when 'SAVE'.
loop at itab.
<databasetable>-field1 = itab-field1.
<databasetable>-field2 = itab-field2.
................
.................
insert <databasetable>
clear itab.
endloop.
endcase.
this is the answer for ur thread
Regards,
Shankar
‎2006 Nov 30 11:48 AM
‎2006 Nov 30 11:57 AM
This page not found (404 - The requested resource is not available.)
‎2006 Nov 30 11:59 AM
Hi
Please check these threads
https://forums.sdn.sap.com/click.jspa?searchID=239682&messageID=2773115
https://forums.sdn.sap.com/click.jspa?searchID=239682&messageID=2337199
I have already answered in your other thread.. please close one of them....
thanks
dominic
‎2006 Nov 30 12:14 PM
‎2006 Nov 30 12:04 PM
this tc is defined as a internal table in ur program. so u have data in the tc and now ur pressing save...so, the data gets transferred internally to the internal table...write code as...
case sy-ucomm.
when 'SAVE'.
loop at itab.
<databasetable>-field1 = itab-field1.
<databasetable>-field2 = itab-field2.
................
.................
insert <databasetable>
clear itab.
endloop.
endcase.
‎2006 Dec 01 6:56 AM
case sy-ucomm.
when 'SAVE'.
loop at itab.
<databasetable>-field1 = itab-field1.
<databasetable>-field2 = itab-field2.
................
.................
insert <databasetable>
clear itab.
endloop.
endcase.
this is the answer for ur thread
Regards,
Shankar
‎2006 Dec 01 7:05 AM
HI,
CHECK THE BELOW CODE.
TABLES: LFA1.
Data: ITAB LIKE LFA1 OCCURS 0.
CONTROLS: TCONTROL TYPE TABLEVIEW USING SCREEN '100'.
module_-------_
case sy-ucomm.
when 'save'.
MOVE LFA1 TO ITAB.
APPEND ITAB.
INSERT INTO LFA1 VALUES ITAB..
ENDCASE.
ENDMODULE.
IF U FIND IT USEFUL MARK THE POINTS
REGARDS,
GNK
‎2006 Dec 01 7:45 AM