‎2009 Nov 23 5:15 AM
Sir,
I would like to copy sflight table to zsflight with data on same client.
How can I do that, please explain me.
Thanks
Manoj.
‎2009 Nov 23 6:16 AM
‎2009 Nov 23 8:26 AM
Hi Manoj,
For creating table ZSFLIGHT, follow what Pulokesh has said.
To copy data from SFLIGHT to ZSFLIGHT write a small program like below,
TABLES zsflight.
DATA: itab TYPE STANDARD TABLE OF sflight.
SELECT * FROM sflight INTO TABLE itab. " Get data from SFLIGHT
IF NOT itab[] IS INITIAL.
INSERT zsflight FROM TABLE itab. " Insert data into ZSFLIGHT
ENDIF.
Note: By default current client will get filled in 'MANDT' field.
Thanks,
‎2009 Nov 23 10:23 AM
SE11 --> dictionary object --> Copy
And write a report program to copy the records of existing table to new table.
Hope you get it.
‎2009 Nov 23 11:36 AM
Hi,
To copy a table goto SE11 --> Write the table name ---> dictionary object > Copy-> give new table name -
> press the ok button.
To copy the contains of table to the new table a new code need to write.
DATA: itab TYPE STANDARD TABLE OF sflight.
SELECT * FROM sflight INTO TABLE it_sflight.
IF NOT itab[] IS INITIAL.
INSERT zsflight FROM TABLE it_sflight.
ENDIF.
Thanks,
Suman