Skip to Content
author's profile photo Former Member
Former Member

BSP Element Expressions XML Parameters

Hi, can anyone please give me a tip or a small example of a use of parameters in XML BEE? They are defined in a BSP and then set there in the bee SET method of CL_BSP_BEE_XML. Brian McKellar gives an example in his Weblog /people/brian.mckellar/blog/2003/10/30/bsp-programming-bsp-element-expressions-bees but I have a different situation and dont understand what they might mean for me. Thanks for any information. Best regards David Lawn

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jul 16, 2004 at 08:51 AM

    Hallo David,

    One other remark first. Where it is possible, it is always recommeded to use the BSP tableBee, as its performance is a factor or ten better than that of the xmlBee.

    Effectively the call will be:

    <bsp:bee xml="<%=string_with_source%>" xml_parms = "<%=parms%>" />

    Here parms must be TYPE TABLE_BSP_BEE_PARMS.

    This table has as line structure records of type BSP_BEE_PARM.

    NAME: This is the name of the variable that you are using within your generated source code that will now be interpreted.

    BIND_EXPRESSION: This is not used at all. Hmmm.... Wonder what happened there.

    VALUE (TYPE STRING): This can be any value that you want to set into the attribute. Normally you will only use this string, as you can transfer string, integers, enumerations and boolean values via this field. Later on the assing we do onto the correct attribute of the instance will do the correct transformation.

    VALUE_REF (TYPE REF TO DATA): There are some parameters that can not be transfered via a string. One example would be a table for a dropdown listbox. In this case, you just pass a reference onto your data via this field. Use the GET REFERENCE OF sequence.

    Maybe if you give us an example of a control you want to process, I can set up the code for you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2004 at 02:25 PM

    Hi Brian, thank you very much.

    In fact I have success with the tutorials you have given. I still have some difficulties but believe they can be overcome:

    1. I am in a method of the bsp application class. I have dumped the code into this method from a bsp page include fragment.

    2. Thus, in this method, I now have business logic abap determining which <htmlb elements are created and what values the variables of these elements have. Thus at runtime I pass to the bee a concatenated string like '<htmlb:textView id ="' l_id_element_name ' text = "' l_text 'design = "' l_design '"' ... '/>'. I had figured I had, at runtime, no variables and so needed no parameters. In fact, I have had to find that if I do not code parameters then adding in a second piece of <htmlb code crashes the bee and I loose the browser display of the first one. If I parameterise the first and the second, then I have both. So thats clear. I have also found that bee string syntax is totally strict. I also looked at bee->m_dom dom_table in the debugger, together with the parameters, which helped me understand.

    I am adding in bits of the huge amount of business logic at a time to keep the bee string consistent.

    3. After setting the bee I pass it back to the view include that called my method (I have a nice ddic structure for that) and display the result as you do in your tutorial.

    4. The total result thus is that I no longer need business logic in my view includes and can create html from htmlb in the application class method, which is what I need. Thanks!

    4. My need: I firstly just need to get a form onto the browser as quickly as possible so that other project members can see it and plan. Performance is secondary at the moment. I am happy to use the xml bee.

    5. The bsp I work with has a strange structure, with a page with flow logic <bsp:goto-ing a controller which calls a view with many includes, one of which is mine (which also has includes). So your other suggestion, using views, will also be followed up as soon as I get my page up and visible.

    Kind regards David

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2004 at 04:11 PM

    Thank you very very much for the discussion, clear how-tos and in fact the solution. The Bee was fine, but limited for where I was. What works beautifully is the new controller and <bsp:call - ing it and its new view inside the previous view. Beautiful!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.