Application Development 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: 

table entries

Former Member
0 Kudos

hi all,

i need to copy the GLPCA TABLE into Ztable.

i have cpoied the table but i am not getting the entries(data) in the ztable.

could anyone please tell me what to do to get the data.

thanks in advance.

6 REPLIES 6

Former Member
0 Kudos

Hi

Write a Zprogram and get the entries from GLPCA and insert into u r new table

Kiran

0 Kudos

Hi Neethu,

Create a report program with select statement which fetches all the data fronm the source table into internal table.Using loop at that internal table insert the records into ur ztable.

Regards,

Lakshman.

Former Member
0 Kudos

Hi ,

First you need to create a internal table to hold the data GLCPA.

Then select the records from the GLCPA to the internal table .

Then insert the records to the Ztable from the internal table.

Write the followed code to insert data from GLPCA to ZTABLE .

DATA : t_itab TYPE TABLE OF GLPCA .

SELECT  * FROM GLCPA INTO TABLE t_itab.   " Selecting records from GLCPA

INSERT ZTABLE FROM TABLE t_itab. " Inserting records to Ztable created by you

Note : Execution of that code Populate the Ztable

Regards

Pinaki

0 Kudos

Actually i need to COPYstandard report and add one of the field in zreport, the standard report fetches all the fields from GLPCA and displays the same to output fields, so i cannt add new field in GLPCA,

so ineed to copy the GLPCA table to ztable and add new field.

do i need to write the select query in my zreport

0 Kudos

First copy the entries into the ZTABLE, as suggested by Pinakee.

Also, as GLPCA does not have the new field, u fill the new filed with the desired values, either programatically or through table maintainance.

Then, copy the standard report into a ZREPORT, there replace the GLPCA with ZGLPCA(the ztable, that u have created) .and in the report u make changes to diplay one more field (the one that u have added.)

Hope it works.

0 Kudos

Hi,

I felt that it is better to use a code to populate a table.

Because it reduces the time as well as other complexcity

You do one thing.

First copy the table GLCPA to Ztable and add a field to that ZTABLE.

Then select the records from the table GLCPA into a internal table Typed ztable.

In SELECT query use CORRESPONDING FIELDS OF .

Then insert the entries fom the internal table.

I have made some changes to previous code.

Please check that.

DATA : t_itab type TABLE OF ZTABLE.
 
SELECT  * FROM GLPCA INTO 
                 CORRESPONDING FIELDS OF TABLE t_itab.   " Selecting records from GLCPA

INSERT ZTABLE FROM TABLE t_itab. " Inserting records to Ztable created by you

Regards

Pinaki