Problems to handle Viewset

CRM related discussion only

Moderators: Snowy, thx4allthefish, Lost Identity

Post Reply
Posts: 2
Joined: Fri Mar 23, 2012 3:58 pm

Problems to handle Viewset

Post by Plateu » Fri Mar 23, 2012 4:23 pm

Hello dear friends, is everybody ok?

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,

Pedro Rosa!

Posts: 180
Joined: Thu May 03, 2012 9:35 am

Re: Problems to handle Viewset

Post by DrSidewalk » Thu May 17, 2012 6:15 am

Should be okay.

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' ) %>" />
          <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'View2' ) %>"
                    url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'View2' ) %>" />
Or something like that.

Dr Sidewalk

Post Reply