2009 Feb 10 10:38 AM
Hi all,
I would like to write the content of an internal table in a dictionary table (ztable).
I do not know how to get this. I was trying an example with sflight and zsflight.
Can some one please show me some coding?
Please give me some help.
Kind regards
Peter
2009 Feb 10 10:48 AM
Hi
DATA: ITAB TYPE TABLE OF SFLIGHT WITH HEADER LINE.
*Assign values to each column as ITAB-FIELD = VALUE. OR
SELECT * FROM SFLIGHT INTO TABLE ITAB. "Copy from Sflight into internal table
LOOP AT ITAB.
INSERT ZSFLIGHT FROM ITAB. "Copy from internal table to zsflight
ENDLOOP.
Hope this helps
Regards,
Jayanthi.K
Hi all,
I would like to write the content of an internal table in a dictionary table (ztable).
I do not know how to get this. I was trying an example with sflight and zsflight.
Can some one please show me some coding?
Please give me some help.
Kind regards
Peter
2009 Feb 10 10:40 AM
Hi,
insert ztable from table itab.
This query works fine...
Regards,
Siddarth
2009 Feb 10 10:43 AM
Tables : zsflight.
DATA : BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE ZSFLIGHT.
DATA END OF ITAB.
ITAB-FNAME = XXXX.
ITAB-FNAME = XXXX.
APPEND ITAB INTO ZSFLIGHT.
OR ELSE TRY THE UPDATE STATEMENT.
OR ELSE THE INSERT STATEMENT WORKS FINE.
I THINK THIS SHOULD WORK.
2009 Feb 10 10:43 AM
2009 Feb 10 10:43 AM
Hi,
If you want to write new contents then use INSERT statement.
INSERT INTO zsflight FROM TABLE <internal table>.
If you want to modify the existing record in table then use MODIFY statement.
MODIFY zsflight FROM TABLE <internal table>
Hope this helps u.
Thanks.
2009 Feb 10 10:45 AM
HI,
INSERT ztable FROM TABLE itab.
But make sure that itab has a same structure of ztable.(Number of fields and type of fields).
2009 Feb 10 10:48 AM
Hi Peter ,
DATA: t_sflight LIKE TABLE OF sflight.Now populate internal table t_sflight with the required records.
INSERT sflight FROM TABLE t_sflight.Regards
Pinaki
2009 Feb 10 10:48 AM
Hi
DATA: ITAB TYPE TABLE OF SFLIGHT WITH HEADER LINE.
*Assign values to each column as ITAB-FIELD = VALUE. OR
SELECT * FROM SFLIGHT INTO TABLE ITAB. "Copy from Sflight into internal table
LOOP AT ITAB.
INSERT ZSFLIGHT FROM ITAB. "Copy from internal table to zsflight
ENDLOOP.
Hope this helps
Regards,
Jayanthi.K
2009 Feb 10 10:49 AM
Hi,
refer this code.
DATA :
fs TYPE <tablename>.
( fill the field string with values required )
ex:
fs-id = 10.
fs-name = 'XYZ'.
INSERT into <tablename> values fs.
OR
U can also use internal table dirrectly.
insert <tablename> from table itab.
This works fine.
2009 Feb 10 10:50 AM
2009 Feb 10 10:51 AM
Hi,
Go through this abap help.
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/frameset.htm
Hope this helps.
Regards,
Deepthi.
2009 Feb 10 10:52 AM
Hi,
you may use the statement as:
insert <ztable name> from table <ITAB>.
this will update your ztable.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |