I'm beginner in SAP enviroment.
My boss has given a task to me on last monday but until now I could not get success.
My problem is:
I need to create a simple BSP Component with a Main Window and one View Set with two View Areas. According some user action (such as button event), it's necessary to change the content of one of View Areas (per example: Earlier, I have created 3 Views (View 1, View 2 and View 3, respectively associated to View Area 1, View Area 2, no associated). According the button event, I want to change the content of View Area 1, removing View 1 and putting View 3).
Does anybody help me to be not fired?
Many thanks and regards,
Your button will trigger and event Handler (method), and within that just set a global variable to a number to indicate the view that you want to see. The global variable will be an attribute of the View controller implementation class. Anyway, once this is done, edit your BSP code for the viewset and add code to check what value the global attribute contains, via an IF statement, and then display one whichever view is required.
In your BSP code:
Code: Select all
<% IF .... %> <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'view1' ) %>" url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'view1' ) %>" /> <% ELSE. %> <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'View2' ) %>" url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'View2' ) %>" /> <% ENDIF. %>