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

View cluster - access data from the view

0 Likes
2,578

Hi People,

I have a view cluster with 3 views, What I need is to capture the values of the current view, Example: The current view in view cluster i am in, has a text box with some value inside it or table with values in them, I need to be able to access this values in my form routine. My scenario is that I want an event (Before saving data to database) in which I check for values in the current view whether they are valid or not & then allow save to database. Can you please guide on how to achieve this? an abap example which provides more info on this could be helpful.

Thanks & Regards,

Deepak

5 REPLIES 5
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,821

Hi,

Please refer this sap documentation [Event SV/VC: Define a Data Save Routine|http://help.sap.com/saphelp_nw04s/helpdata/en/a7/513643407a11d1893b0000e8323c4f/content.htm] which is derived from [View cluster maintenance events|http://help.sap.com/saphelp_nw04s/helpdata/en/a7/513602407a11d1893b0000e8323c4f/content.htm]

You have to make use of tables VCL_STRUC_TAB & function VIEW_MAINTENANCE_LOW_LEVEL

Kesav

Read only

0 Likes
1,821

Hi Keshav,

The internal tables( VCL_STRUC_TAB & TOTAL ) which you have suggested are not accessible in the form routine that I have created for the event "SV"(Instead of saving data in the database) of view cluster. The internal tables which you have mentioned are accessible outside the call of my form routine & the call to the for routine is happening dynamically. Kindly help me access these tables entries in the my form routine.

Thanks & Regards,

Deepak

Read only

0 Likes
1,821

Hi,

It is not very clear if you want to check only the content of one table/view, or if you want to cross-check between several tables/view at the same time.

Sandra

Read only

0 Likes
1,821

Hi Sandra,

I need to check the contents of one view in the view cluster, I am doing some user input validations hence when the user enters some wrong data in a view of the view cluster, I need to be able to check that input & throw an error message. For this I should be able to access the contents of that view right? Can you give me some code snipped or an example program where this

has been implemented?

Thanks & Regards,

Deepak

Read only

0 Likes
1,821

Hi

You can insert the control in the events of maintenance program for the single view, here you can use the event 05 for a new input or 21

Max