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

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

Similar Messages

  • BSP Element Expressions XML Parameters : ABAP Question

    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

    This post has now been answered in the BSP forum.
    Best regards
    David Lawn

  • BSP Programming: BSP Element Expressions (BEEs)

    Hi,
    Alex reported a difficulty with
    BSP Programming: BSP Element Expressions (BEEs)
    /people/brian.mckellar/blog/2003/10/30/bsp-programming-bsp-element-expressions-bees
    back in March.
    Since I also set up the example contained in that paper recently, and since I permitted myself to add in some lines of code with which it works well, I give those lines here:
    1) the bee call:
    <%
    if bee is bound.
    %>
    <bsp:bee bee="<%= bee %>" />
    <%
    endif.
    %>
    2) in the xml part of onInputProcessing:
    2.1)
    data: xml_errors type TIXMLTERR.
    2.2)
    append <xml_parm> to xml_parms.
    also seemed a good idea.
    I hope this is useful.
    Best regards
    David Lawn

    Oops ... I dont need the append statement of course (because I have insert .. assigning). Sorry about that.

  • BEE(BSP Element Expression)

    Hi Forums,
        What is the use of BEE and where do we use it ? can any body explain with the help of example.
         Documents with example will really helpful.
    Thanks in advance.
    Regards,
    Ravi.

    Hi,
    Did you check /people/brian.mckellar/blog/2003/10/30/bsp-programming-bsp-element-expressions-bees
    Eddy

  • BSP Element Expressions

    Hi,
       I am practicing on BSP Element Expressions and i have gone through the weblog by Brain McKellar. I am trying the same example given in the weblog but i am getting an exception at the statement 
    <bsp:bee bee = "<%= bee%>" /> in the layout.
        I have not instantiated but i have declared it as an page attribute as given in the weblog.
        Why am i getting an error? any help is highly appriciated.
    Regards,
    Azaz.

    You have to instantiate the bee before you use it. otherwise the bee is not bound or is null so u'll get exception. The right way is to check the bee before you use it i.e.
    change the html layout code this way.
    <% if bee is bound. %>
    <bsp:bee bee = "<%= bee%>" />
    <% endif. %>
    This is the first step. This way even if you don't instantiate the bee, u'll not get any exception or crash.
    Second point is using the bee if instantiated properly.
    Instantiation of bee is compulsory if you want to use it.
    Do the instantiation anywhere where u think its correct. you can do it in OnInitialization handler or in inputProcessing etc. In the blog it is done in the OnInputProcessing.
    As I said earlier, the fixes to make that code work properly are mentioned at the bottom of the blog.
    Regards,
    Kumar

  • How to check the element  in xml file by xpath

    hi all,
    * How to check the element in xml file by xpath
    for the following XML file,
    * I want to check whether
    the element (sage) is present or not in the following xml file XPATH expression...
    * I have tried by the following expression ,
    NodeList result = (NodeList) xpath.evaluate("//*:student/*:sage/text()",xml_dom,XPathConstants.STRING);
    System.out.println(result.item(0).getLocalName()); * I want to get the Element sage as String value....
    but i am not able to get the element,why that ??? and How to do that ???
    MyXML File :
    <x:student>
    <x:sname>aaa</x:sname>
    <x:sage>26</x:sage>
    </x:student>
    Thanks,
    JavaImran

    <code>* Thanks for reply....
    * </code><code>In </code>
    <code>x:student element x represents the namespace...thats why i put *:student in my expression....
    "//*[local-name() = 'student']/*[local-name() = 'sage']/text()"* By the above code , i am not able to get the sage as string from
    </code> resul.item(0).getLocalName() method.......?
    * How to get that as string format ?

  • Remove element from xml using dom.

    i want to remove an element from an xml file using dom.
    i remove the element but the whole content of the file is also deleted.
    how can i rewrite the file.

    vij_ay wrote:
    subject :Remove element from xml,but if empty element in input file then output should be <tag></tag>, not like <tag.xml/>I assume you mean <tag/> but why do you want this? Any application that will not accept this valid XML construct is flawed and a bug report should be raised against it.

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

  • Schema Validation on attributes of an element in XML againt XSD schema

    Hi,
    I had generated artifact java classes from XSD schema file.Now i am validatiing one sample XML document by using these classes in JAXB.The XML document is validated successfully.but only elements are validated ,but not attributes of that elements.for example ,i am giving wrong element which is not defined inside the schema file,it throws validation error as expected ,whereas validation against wrong attributes of elements in XML it is not working anyway,it does not throw any validation errors,but it should throw validation errors.kindly help me to solve this issue.
    Here The sample validation code snippets :
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.bind.ValidationEventLocator;
    public class MyEventHandler implements ValidationEventHandler{
         public boolean handleEvent(ValidationEvent ve) {
              if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
                        ve .getSeverity()==ValidationEvent.ERROR){
                   ValidationEventLocator locator = ve.getLocator();
                   //Print message from valdation event
                   System.out.println("Invalid booking document: "
                             + locator.getURL());
                   System.out.println("Error: " + ve.getMessage());
                   //Output line and column number
                   System.out.println("Error at column " +
                             locator.getColumnNumber() +
                             ", line "
                             + locator.getLineNumber());
              return true;
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new MyEventHandler());

    Here is my analagous 'strange' behavior. I am jaxb processing and then marshalling generated classes to XML ( following the simple Sun 'PurchaseOrder' example )
    1. This works:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'>
    </xsd:complextType>
    </xsd:schema>
    2. This doesn't:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'/>
    <xsd:attribute name='name2'/>
    </xsd:complextType>
    </xsd:schema>
    That is, using more than one attribute line within this simple complex type causes nothing to be marshalled to XML.
    Ideas?

  • How to display string which has BSP elements correctly?

    Hi,
       I have a string variable lv_text which content is:
    <htmlb:group height = "100%"
                         width  = "100%" >
              <htmlb:groupHeader>
                <xhtmlb:toolbar id="toolbar1" >
                  <xhtmlb:toolbarItem placement="LEFT" >
                    <htmlb:textView design = "HEADER3"
                                    text   = "AAAA"/>
                  </xhtmlb:toolbarItem>
                </xhtmlb:toolbar>
              </htmlb:groupHeader>
              <htmlb:groupBody>
                <%
      if gv_if_dis_message = 'X'.
                %>
                <%@include file="message.htm" %>
                <%
      Endif.
                %>
              </htmlb:groupBody>
            </htmlb:group>
        I want to use it in my BSP page and display the content correctly. Because it has some BSP elements, so now it can not be displayed correctly. How to solve this problem?
        Thanks a lot!

    you cannot do this way. what you can do is call the factory method of the htmlb:<tab> to get the element and render the element to a string and you can now use this string in your bsp page.
    Regards
    Raja

  • Bindable attribute for BSP elements in BSP extensions

    Hey all
      Can anyone explain what the 'Bindable' attribute in BSP elements, in BSP extensions, is for? It has no F1 help documentation and is not documented in the SAP library with the rest of the BSP element attributes.
    Many thanks
    Mark

    Which field is? Has translate value content to spanish for this field?.
    In SAP CRM UI, press F2 and tell me which is the field

  • FixedHeaders atribute in configTable bsp-element

    Hi!
    The task is make column headers of bp search results table fixed when scrolling.
    E.g.
    Component BP_HEAD_SEARCH displays BP search results in view MainSearchResult.
    In view-layot html-page of this view i find bsp-element configTable calling.
    This bsp-element have an attribute fixedHeaders with default value "False".
    Description for this attribute says "Whether headers should be fixed when scrolling".
    I try to pass "True" in to fixedHeaders attribute, but it doesn't changed anything in UI logic -
    scroll work as ussual.
    Anyboy know how to use this attribute?
    Regards,
    Marat.

    Hello, Marat.
    I think that this parameter works only if you have vertical scrollbar in the table. Because it cann't handle the vertical scrolling in "parent" frame.

  • Prevent rendering of inner BSP elements

    Hi all,
    does anyone know a possibility to prevent the rendering of the inner elements of a custom BSP element? I want to do something like this:
    <mat:elem hideInner="true">
      <htmlb:inputfield ... />
    </mat:elem>
    I would like to control from the <mat:elem/> whether or not the  <htmlb:inputfield/> is rendered....
    I know that I could use a simple <% if ... %>, but an element would be nicer
    Any help is appreciated,
    Matthias

    I would look at the BSP Element BSP:findAndReplace.  I looks like you could grab the inner content during the DO_AT_END using:
      data: content type string.
      content = m_out->get_content( ).
    I haven't tried it, but instead of changing a small part of the content, you could just wipe it out.

  • Making htmlb:listbox bindable by new BSP-Element

    Hi,
    I tried to built a new bsp element which renders a listbox and where the table attribute is bindable.
    So far I declared the element listBoxBindable in my own BSP-Extension with the same atrributes as htmlb:listBox.
    For Element content I marked 'empty'.
    For More Options I marked 'User defined Validation' and 'No return of PAGE DONE...'.
    In element-handler-class I copied the methods IF_BSP_ELEMENT~COMPILE_TIME_IS_VALID
    IF_BSP_ELEMENT~RUNTIME_IS_VALID
    from HTMLB:ListBox.
    method if_bsp_element~do_at_beginning.
      resolve_model_binding( ).
      data: listbox type ref to cl_htmlb_listbox.
      listbox ?= cl_htmlb_listbox=>factory(
                id                          = me->id
                backgroundcolor             = me->backgroundcolor
                disabled                    = me->disabled
                encode                      = me->encode
                multiple                    = me->multiple
                nameofbackgroundcolorcolumn = me->nameofbackgroundcolorcolumn
                nameofkeycolumn             = me->nameofkeycolumn
                nameoftextcolorcolumn       = me->nameoftextcolorcolumn
                nameofvaluecolumn           = me->nameofvaluecolumn
                selection                   = me->selection
                selections                  = me->selections
                size                        = me->size
                table                       = me->table
                textcolor                   = me->textcolor
                width                       = me->width ).
      rc = co_element_done.
    endmethod.
    method resolve_model_binding.
      data: model_name type string.
    * table
      if _table is not initial.
        call method cl_bsp_model=>if_bsp_model_util~split_binding_expression
          exporting
            binding_expression = _table
          importing
            attribute_path     = m_table_path
            model_name         = model_name.
        m_table_model  = m_page_context->get_model( model_name ).
        table = m_table_model->get_attribute_data_ref( attribute_path = m_table_path ).
      endif.
    endmethod.
    <b>Unfortunately nothing is rendered - anybody an idea where I forgot something?</b>
    Thx in advance!

    Just off the top of my head, I would say you are missing the rendering loop for the listbox.
    Add the following after the method call to cl_htmlb_listbox=>factory.
        while m_page_context->element_process( element = listbox ) = co_element_continue.
        endwhile. "End Listbox Render

  • ISA changing web.xml parameters for ordering

    Dear all,
    I have the following problem. I would like to set the web.xml parameters in such a way that when I click add to basket from a product, to create a basket directly and add it rather than navigating to createdocument.jsp and having to choose between order and order template. I think this is possible, could someone please tell me some details on how to do it?
    thank you very much in advance

    Hello Alkis!
    Do you want to disable choose document type and create only a Basket type (neither Order nor Quotation) document while choosing product from product catalog?
    Please give more clear requrements.
    regards, Lev

Maybe you are looking for

  • Setup problem with acquired ipad

    When setting up a 16gb ipad I acquired from a former employee, I use my apple ID the same as for my iphone but it doesn't accept it and when selecting the "forgot password" option, I get the message Cannot Load iForgot. I'm stuck in setup right now.

  • Creating Outbound deliveries based on the sales order schedule lines

    Dear all. Is it possible to create outbound delivery documents based on the sales order schedule lines? Eg: Let's say I have sales order line item 10 with below mentioned requested delivery dates in its schedule line level. 30.07.2009 10.08.2009 20.0

  • Send a mail to the agents

    hi my question is send the mail to the assigned agents after the task is go through a condition, and condition fails it also have send mail and true it has send mail to the agents. I have designed the workflow and all other parts are working fine whe

  • How to call the function 5 times

    hi i have a function 'a'  with array 1x2, 1x3, 1x4... every step its 1x2 > answer 1x3 > answer.. ans so on if answer correct i call my function 'a' again. how i can call my function 'a' just 3 times? thank you.

  • Data load in BI7 for an single infoobject

    Hi   I had added a new info object (PO number) in ODS and mapped to the corresponding R/3 field (BSTNK). Now i want to load data only to the newly added field (PO number) in BW from R/3 with out deleting the existing data. I came to know it is possib