Application Development and Automation 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: 
Read only

table data

Former Member
0 Likes
539

hi,

i need to COPY standard 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 as it is standard table

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

while copying the table GLPCA i am not getting the entries(data) to ztable.

so some of the experts in forum suggested to write the select query and fetch the data.

in the zreport if i write the select query all the data comes into the 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.

if once the GLPCA table has updated how can i get the new values into my ztable or if the GLPCA has the same vaulues with out any update data , if i run the report 2 times

the select again fetches the same data and how i get the new field data.

new field is monat from BKPF.need to compare with GLPCA-DOCNR TO BKPF-BELNR.

thanks in advance

3 REPLIES 3
Read only

Former Member
0 Likes
501

Why cant you continue here:

pk

Read only

Former Member
0 Likes
501

Hi neetu,

In that case you need to fire SELECT query in both tables and compare the contents and update the the disimilar data to your Z-table.

sort the table and add binary search to it for improving performance.

Loop at i_ztable into wa.

read table it_glpca with key in wa binary search.

is sy-subrc ne 0.

add record to a third internal table i_ztable_temp.

endif.

endloop.

update ztable from table i_ztable_temp.

hope this will solve your issue.

cheers,

Suvendu

Read only

Former Member
0 Likes
501

Hi Neethu,

Instead of creating Ztable you can create view .

Regards

Pinaki