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

How modify data one view from another view in Cluster view

Former Member
1,418

Hi,

I have a cluster view which includes two independent maintenance views. These views have not a direct relationship.

If I would append or change or delete records in the first view I want to add or change or delete some records in the second view.

1.

I have tried to use Extended Table Maintenance Events of the first view to modify the second but I cant access to the TOTAL and EXTRACT tables the second view from the fist view.

Is there any way to get access from one view to another using Extended Table Maintenance Events?

2.

I have tried to use the Event 04/VC: Before Saving the Data in the Database of the cluster view. I can access and modify the second view internal table using routines

READ TABLE vcl_struc_tab WITH KEY object = 'ZFIRST_VIEW' INTO structab_wa.

if not structab_wa-UPD_REQU is initial.

perform VCL_SET_TABLE_ACCESS_FOR_OBJ using 'ZSECOND_VIEW' changing error_flag.

it_tbl_second = <VCL_TOTAL>.

loop at it_tbl_second into wa_second.

.....

wa_tbl_second-vim_action = 'U'.

modify it_tbl_second from wa_second

endloop.

endif.

But to save modified entries of the second view to database I have to twice press SAVE buttons.

The first time I have pressed SAVE above routines are executed and modified entries appear only in the second view internal table. The second time I have pressed SAVE modified entries appear in the database.

I would like user press SAVE button only once. How I can do it?

Regards,

Malnor

Edited by: Malnor on Nov 30, 2010 9:11 PM

Hi,

I have a cluster view which includes two independent maintenance views. These views have not a direct relationship.

If I would append or change or delete records in the first view I want to add or change or delete some records in the second view.

1.

I have tried to use Extended Table Maintenance Events of the first view to modify the second but I cant access to the TOTAL and EXTRACT tables the second view from the fist view.

Is there any way to get access from one view to another using Extended Table Maintenance Events?

2.

I have tried to use the Event 04/VC: Before Saving the Data in the Database of the cluster view. I can access and modify the second view internal table using routines

READ TABLE vcl_struc_tab WITH KEY object = 'ZFIRST_VIEW' INTO structab_wa.

if not structab_wa-UPD_REQU is initial.

perform VCL_SET_TABLE_ACCESS_FOR_OBJ using 'ZSECOND_VIEW' changing error_flag.

it_tbl_second = <VCL_TOTAL>.

loop at it_tbl_second into wa_second.

.....

wa_tbl_second-vim_action = 'U'.

modify it_tbl_second from wa_second

endloop.

endif.

But to save modified entries of the second view to database I have to twice press SAVE buttons.

The first time I have pressed SAVE above routines are executed and modified entries appear only in the second view internal table. The second time I have pressed SAVE modified entries appear in the database.

I would like user press SAVE button only once. How I can do it?

Regards,

Malnor

Edited by: Malnor on Nov 30, 2010 9:11 PM

2 REPLIES 2
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
764

If I would append or change or delete records in the first view I want to add or change or delete some records in the second view

Without a dependant field how will you perform this operation ?

You have to link the fields in the tables, generate maintenance view, add it to cluster view and do it.

Read only

0 Likes
764

Hi Keshav,

I thought I wrote clearly how I can do these operations. I do them programmatically in event handler.

I describe a simple situation. In actuality there are more tables.

Question is how I can programatically modify one table if user have modified another table in the cluster view.