2010 Nov 30 8:20 AM
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
2010 Nov 30 6:24 PM
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.
2010 Nov 30 7:58 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |