Using View Assemblies in SAP ABAP

Thorsten Desef
A free video tutorial from Thorsten Desef
SAP Senior Consultant
4.3 instructor rating • 1 course • 2,654 students

Lecture description

This lesson shows you how to use view assemblies.

Learn more from the full course

SAP Web Dynpro ABAP

Web Dynpro for ABAP is one of SAP's UI technologies of choice, and this course will show you why.

11:05:21 of on-demand video • Updated August 2014

  • Understand the role and application of Web Dynpro for ABAP in SAP’s UI strategy
  • Develop Web Dynpro ABAP-based applications
  • Integrate Adobe technology into Web Dynpro
  • Prepare you for advanced Web Dynpro topics
English [Auto] This lesson I'm going to show you how to use view assemblies that window defines what views are displayed in what combination. In Holland you can manage your changes by firing up plaques when you create a window. Remember the following points. You must embed all the possible views that can exist in the interface of the component in the window to display multiple views in parallel and not one after the other. You have to define the layout and position of these views in a special view. And this special view has to contain what my table view container UI elements in a play that you convey to you or an image it's just a normal lay out element. Like for example the Partnering with you and this container you now use embedded in the window and all the possible views that you want to display together in parallel. For this view container area are also embedded inside each area which is defined in this view container. I animate one default view is displayed at start up for each view Montaner UI element. Then you have to define that are links between the different views. Only one view is displayed in the view Contini area at the time because you can have my that would be an area containing areas that means you can display actually views at a time. But in one such container you want to replace the contents of a huge container area you find navigation links between the views you can areas can be blacked out by embedding the view which is gone into view of all of these sites see that in the previous unit. This interview is automatically created together with all of these and if you as an Imbolc like which can respond to the appropriate navigation event. Now let's have a look at the viewer assembly. Following are the features of your assembly. The subset of views visible at any one time is known as such a view. Secondly navigation causes either specific use within a view in area to be replaced or it can cause entire combinations within the window to be replaced outbound plus other triggers that cause of you can take the area to contain a particular view. For all we know definitions in which my view views are embedded in the contained areas many interpretations of use are possible. Exactly what is displayed depends on the navigation links that the user follows the subset of views usable at any time is known as View assembly. Now we want to practice what we learned about new assemblies. Remember the previous lecture I've created a component with two views and I was able to navigate back and forth between the two years but I was not able to display post views at the same time. And this is exactly what I want to enable now. So one of the steps to make it very clear what's going on I create a second window in the second window. I will create a view that consists only to view containers. Nothing else that this can do containers. I would then display varying other views like the manga with the second view or the empty view. All right. So this is what we currently are able to do. You have made you hit the next button and the second view hit the previous button or back to main one view at a time. Now this is our carriage window set up thats the default clock for the window itself and once we are in the window we end up on main view menu is displayed here with a darker blue color. This is indicating it is the default the second view is a light blue color indicating its not the focus. Now let me create another window so we don't confuse this with the first video. Second when. So for this window I need a new view which allows me then to internally embed my existing views. So I would create this new view first to make good that does you for other views containing other views of college you can Tiina what I need to embed now is the container element. You could tell when we see one and two these elements are also available here in the list of elements in the layout section here. All right. This view is basically done. There's nothing more to do with it. It's not displaying anything. If not other views are put into this container. So what we can do now is in our second view we add this to your container so we created three views plus we have an interview that means we have all together for use. This one is what we need. All right. Here we see the two empty areas. You see that the container of view here is already displayed in dark blue which means because it's the first one and it gets automatically used as a default right now and the first contained area and and that's my main view then I do the same thing in the second container. And here I'm going to bed first my interview because I want to make the empty view the default and then I'm researching this a bit and we'll also add another area which is then my second view. You see it doesn't allow me to add empty view again. It's taken from the list because displaying the same view two times or try to display the same two times in a new assembly will lead to a. So now we got the second view. Also embedded in our new container Do you see the second view here. The second area is light. So the initial view assembly in our case will be on top showing the main view and then showing nothing into view. What I want to do is whenever the user clicks the navigation button next on the menu this empty area should be replaced with the second view. So what I need to do is link the up on pluckier from the main to the ENBOM block of the second. We have seen this already in the previous lecture it is navigation. All right now any ideas is a little bit uncomfortable always resort to some uncomfortable Forsythe's just to make a move again. So if we then navigate back from the second you hit the button on the second button was called previous Then the second view should be removed. And how can we remove the second if you only display the main you that is replace the second view with an empty view. So all I need to do is link up on floor from the second view because this is linked to my second use button to the in-born plug of the empty view. And now it's done to make it clear again what is going on with each structure. You are the blocks on inbound flights. Initially main and nothing empty. Then I hit the button on main display now Main and say Main is not to place because Main is sitting in its own view area hitting the button the second your triggers the auction block a second view that navigates into the empty view that's actually made all we gotta do is refresh our application because the UI hasn't been changed. Before we refresh the application we have to make sure that our you are hell knows which of the windows to display. Remember we have two windows here. Second window in the first window. These are completely different windows and therefore we open the application. And when you look at the application here then it says in the interface view field when you enter the UI you end up in the interface view when Which means you end up in the window when this is what we don't want. We want to end up in the second window. So what we need to do here is exchange when with second when Save and now we can refresh the application. And when I'm hitting the next button now it does face the boss views main here. And second when it hit the previous button the second view is taken or removed and replaced with an empty view. That's hard to deal with the assemblies on the last.