Skip to Content
{code:html}

When I was searching the forum for a way to include a page fragment depending on a variable I came across Dynamic Includes for BSP which dates back to june 2004, and basically states that this cannot be done.

Since I don’t like things that are impossible, I created a method within my bsp-application that does just that : read the content of my page fragment and return it.

Here is how I did it :

The method is called LOAD_PAGE and has 3 parameters :

image

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Brian McKellar
    Hallo Dries,

    You have an interesting approach to get page fragments expanded inline. However, you approach has the disadvantage that these fragments may only include text (HTML) sequences, and not any ABAP statements or BSP print sequences. Also tags can not be handled on the page fragments that you include this way.

    Our usual recommendation for cases where such flexibility is required, is to have one controller that can imbed any number of views. Each page fragment is then placed on a view. This way, the view can be processed normally, benefitting from the full power of the BSP compiler. And the one controller has the fragment name as parameter to imbed. (In IT05 I use such a dummy controller to embed a number of different views.)

    No so much a comment on the approach you took (which is something new for me), but to show you that there are other alternatives which might be more intuitive!

    regards, brian

    (0) 

Leave a Reply