Skip to Content

BSP Value Input Help Popups Version 3.0


In the past, I have shared my implementation for Value Help in BSP via Weblogs:

Finally I have the latest version of this Value Help available here on SDN via this weblog. Unlike the last major revision that focused on enhancing the user interface, this update has no changes or additions to the UI. The interface still supports elemental and complex search helps via popup windows. Although we will be making some major additions to the internal coding of the object, no changes will be made to the UI rendering (InputHelp.bsp)

method do_request.

  • if any of the controllers has requested a navigation,
  • do not try to display, but leave current processing

  if is_navigation_requested( ) is not initial.

****Requested Simple Help Values
  if not model2->data_ref is initial.
    model2->get_helpvalues_complex( ).
****Requested Help Values Via an RFC Exit
  elseif not model2->rfcfunction is initial.
    model2->get_helpvalues_exit( ).
  elseif not model2->objtype is initial.
    model2->get_helpvalues_bapi( ).
    model2->message = ‘Element ID can not be blank'(e03).

****Multi or Single Select?
  if model2->multiple = abap_true.


You must be Logged on to comment or reply to a post.
  • Hi thomas
      You done a great job,but one thing i want to share with u is,
         After getting the values from fm ‘DD_SHLP_GET_HELPVALUES’ the data is in string format and you are splitting it into different columns and storing  them into the internal table . for this purpose i think there is a funcion module
            Is this fm work properly if it works then the complex part of your code will go away.
    • Thanks for the tip.  I will try and play around with that function module this morning.  I’m not sure it will completely solve that section of code.  It looks like it will extract the value from the string offset (giving better compatibility with Unicode) and pass it through a conversion exit.  But I still have to line it up with the correct field in my internal table. 
      • Sorry for the delay getting back with your question, but I was out of the office last week on vacation. ***We had a problem in Unicode systems because SHLP-FIELDDESCR OFFSET<br/>**contained Byte Length instead of Character length.  Therefore we will<br/>**Divide it by the system byte length per character to convert it back.<br/>**This will have no effect in a non Unicode system.  If SAP changes<br/>**DD_SHLP_GET_HELPMETHOD to return character length instead of byte<br/>***this code can be removed.

        • It was not urgent, so no problem. I hope you had a nice vacation.

          >I touched this code just a few weeks ago
          Hehe. It seems to be one of your favorite topic 🙂

          Thanks a lot for your help.

          Unfortunately my code has to be 46C compatible as well, so I cannot use cl_abap_char_utilities=>charsize directly, but I’ll find a way to make it work in 46C and not to get a syntax error.


  • Hi Thomas,

    using your great InputHelp Extension today I recognized a Bug.

    The Problem comes if you have defined the F4-Help explicit to a structure field and the structure fieldname is not equal to the fieldname of the referring ddic table-field. In that case the dynamic typedescr of IDATA-attribute differs in the fieldnames to the structure fieldnames.

    So you have to be aware that key_field gets the correct fieldname using the interface-definitons of the search help. If not the method build_accept_selection_script does not find the any value of your selection. New Coding for the last 10 lines of GET_HELPVALUES_COMPLEX:


      DATA: wa_interface LIKE LINE OF shlp-interface.
      IF me->key_field IS INITIAL.
        IF l_compname IS INITIAL.
        READ TABLE shlp-interface WITH KEY valfield = l_typename
                                 INTO wa_interface
                                 TRANSPORTING shlpfield.
          me->key_field = wa_interface-shlpfield.
        READ TABLE shlp-interface WITH KEY valfield = l_compname
                                 INTO wa_interface
                                 TRANSPORTING shlpfield.
          me->key_field = wa_interface-shlpfield.


    Another problem I’m hardly working at is that the fields in the search-help iframe are mixed up in their order. The positioning I defined in the ddic searchhelp is not taken but the fields are shown in alphabetical order of their ddic-fieldnames. Where can I change this?

    • Thanks for the fix, I had not ran across that situation yet.  Now that you comment leads me back to this weblog, I can see that the formatting on the code has been all messed up by the changes SDN had been making.  I guess I will have to try and clean that up. 

      As to your order problem, I don’t seem to be having the same problem.  Things seem to be ordering correctly.  Have you have the problem with the input fields or the Table output, or both.

      • Hi Thomas,

        the ordering problem occurs in both input fields & table output.

        That comes from that shlp->fielddescr-position (line 159) is used – but shlp->fieldprop-shlpselpos and shlp->fieldprop-shlplispos are to be taken for correct ordering.

        While looking shlp->fieldprop I will try to give more than on helpvalue if there are more than 1 searchhelp-fields are signed as output parameters.

        If ready I will post (including the code recognizing the ordering).

        Greetings from Germany 🙂

  • Problem: The Ordering of the Fields in the Inputhelp IFrame is not shown as defined in DDIC-F4 Search Help<br/><br/>Solution in get_helpvalues_complex (modelclass):<br/><br/>Replace the corresponding part (some rows deleted / added)<br/><br/>***Build our listing of what fields where returned by the BAPI – and their specifications<br/>  FIELD-SYMBOLS: <wa_fields> LIKE LINE OF shlp-fielddescr.<br/>  DATA:          wa_fieldprop LIKE LINE OF shlp-fieldprop.<br/>  LOOP AT shlp-fielddescr ASSIGNING <wa_fields> WHERE fieldname NE ‘_HIGH’.<br/>    APPEND INITIAL LINE TO fcat ASSIGNING <wa_fcat>.<br/>    READ TABLE shlp-fieldprop WITH KEY fieldname = <wa_fields>-fieldname<br/>    INTO wa_fieldprop.<br/>    <wa_fcat>-col_pos = wa_fieldprop-shlplispos.<br/>    should work 🙂

    • I really appreciate your fixes.  I had never noticed that the order was off and the muliple return values has been on my to-do list for a while (I will look at your suggestion on that one in a minute).  <br/><br/>Your suggestions come in enough time that I can include them in the sample source code for the BSP book Brian McKellar and I have been working on. My email address is in my SDN Business Card.  If you want to email me your Snail Mail address, I will send you a free copy of the book as thanks for providing these additional features.<br/><br/>I did make a few changes to your code.  First I broke out the building of hte SHLP_MVC and TBL_DEF since one controls the input fields and the other the output table.  In search helps you can have a different order for the two. I also put in code to hide input fields that aren’t set for display. <br/><br/>***Build our listing of what fields where returned by the BAPI – and their specifications<br/>  FIELD-SYMBOLS: <wa_fields>    LIKE LINE OF shlp-fielddescr,<br/>                 <wa_fieldprop> LIKE LINE OF shlp-fieldprop.<br/>  LOOP AT shlp-fielddescr ASSIGNING <wa_fields> WHERE fieldname NE ‘_HIGH’.<br/>    APPEND INITIAL LINE TO fcat ASSIGNING <wa_fcat>.<br/>    READ TABLE shlp-fieldprop WITH KEY fieldname = <wa_fields>-fieldname<br/>    ASSIGNING <wa_fieldprop>.<br/>    <wa_fcat>-col_pos =   <wa_fieldprop>-shlpselpos.<br/>    <wa_fcat>-fieldname = <wa_fields>-fieldname.<br/>    <wa_fcat>-datatype  = ‘CHAR’.<br/>    <wa_fcat>-inttype   = ‘C’.<br/>    <wa_fcat>-intlen    = <wa_fields>-leng.<br/>  ENDLOOP.<br/><br/>  SORT fcat BY col_pos.<br/>  LOOP AT fcat ASSIGNING <wa_fcat>.<br/>    READ TABLE shlp-fieldprop WITH KEY fieldname = <wa_fcat>-fieldname<br/>     ASSIGNING <wa_fieldprop>.<br/>    IF new_shlp = ‘X’.<br/>      IF <wa_fcat>-col_pos ne 0.<br/>        READ TABLE shlp-fielddescr ASSIGNING <wa_fields> WITH KEY fieldname = <wa_fcat>-fieldname.<br/>        APPEND INITIAL LINE TO me->shlp_mvc ASSIGNING <wa_mvc>.<br/>        <wa_mvc>-select_fld = <wa_fcat>-fieldname.<br/>        <wa_mvc>-title      = <wa_fields>-scrtext_m.<br/>      ENDIF.<br/>    ENDIF.<br/>    <wa_fcat>-col_pos =   <wa_fieldprop>-shlplispos.<br/>  ENDLOOP.<br/><br/>***Fill TBL_DEF

      • Didn’t recognize to be in time – but thanks for rewarding the book instead of points 🙂 I’m really glad about that – snail mail address is on the way.
  • Like the F4 Help you can also fill more than 1 Field in your BSP-Site – simply trying to get the fields on the bsp by Javascript if they are defined as Output-Parameters in the DDIC SearchHelp.<br/><br/>First add in the model a private attribute<br/>shlp // instance // private // type SHLP_DESCR<br/><br/>Delete Line: DATA shlp type SHLP_DESCR. in get_helpvalues_complex method.<br/><br/>In build_accept_selection_script the following coding is needed (from line 83 a snippet):<br/><br/>***Are there new selections?<br/>  IF NOT me->sel_tab IS INITIAL.<br/>    DATA: key TYPE string,<br/>          value TYPE string,<br/>          wa_fieldprop LIKE LINE OF shlp-fieldprop,<br/>          wa_fieldif LIKE LINE OF shlp-interface.<br/>**Loop through the selections<br/>    LOOP AT me->sel_tab ASSIGNING <wa_sel>.<br/><br/>      IF me->values_for_field IS NOT INITIAL.<br/>        READ TABLE me->values_for_field INDEX <wa_sel> ASSIGNING <wa>.<br/>        key = <wa>.<br/>        value = <wa>.<br/>      ELSE.<br/>**Read the data table for each selection index<br/>        READ TABLE <tab> INDEX <wa_sel> ASSIGNING <wa>.<br/>        IF sy-subrc = 0.<br/>          CLEAR: key, value.<br/>**For each component (field) in the table -Output the data<br/>          LOOP AT struct ASSIGNING <wa_desc>.<br/>**Only pull the fields that match what we were given as our key or value field<br/>            ASSIGN COMPONENT sy-tabix OF STRUCTURE <wa> TO <f>.<br/>            CHECK sy-subrc = 0.<br/>            IF <wa_desc>-fieldname = me->key_field OR<br/>               <wa_desc>-fieldname = me->value_field.<br/>              IF <wa_desc>-fieldname = me->key_field.<br/>                key = <f>.<br/>              ENDIF.<br/>              IF <wa_desc>-fieldname = me->value_field.<br/>                value = <f>.<br/>              ENDIF.<br/>            ELSE.<br/>***Read additional Field Value marked as output parameters            

    • I’m afraid this one, doesn’t work in my more complex uses of the Help.  I supose it would work if you could always control the other field’s element ids on the frontend.  However the element id (that is accessed via JavaScript) is often prefixed by the controller or model Id.  Also I have re-created select options in BSP.  Naturally not all of my fields (High, Low, Additional input) can all have the same element ID.

      The Value help in WebDynpro ABAP does bring back all fields.  But then again WDA is always stateful.  They don’t have to rely on JavaScript to move the field values back.  They can update the context node attributes and allow the whole page to refresh with the new values.

      • Well you’re right its not the solution for all cases but only if some conditions are fullfilled.

        So it was the challenge to me, to give back additional values to the view, where the field with inputhelp and the additional fields (deactivated just for information purposes) all are bind to the same model and appear in the same form of one view – controlled by one controller. So the fields must have the same prefix and must be declared in a structure attribute of the model (where of course the DDIC Searchhelp is mapped). 

        If there would be more time there should be a more general solution 🙂

  • Hi Thomas,

    its me again 🙂 After some steps further i got another proplem:

    When using the BSP-Element in a TableView passed by a TableView iterator there occur some scripting errors.

    Of course I extended the InputHelp by the property ‘cellValue’ and simply gave it to the cl_htmlb_inputfield->factory.

    The tableview is rendered with the element but when clicking in edit mode the help symbol a javascript error occurs:

    ‘onValueHelpa1_a2_a3’ is not defined

    a1 -> id of controller
    a2 -> id of model
    a3 -> attribute name in model class of the table bound to the tableview.

    Searching the htmloutput the correct function nam should be:

    a4->fieldname of the table from a3

    Do you have an idea to get the iframe?

    Another problem is when leaving the edit-mode a bsp error: Structure component ‘a4__inputfield’ does not exist.

    Nice weekend !


    • Yah, I a tableView.  No that doesn’t work. 🙂
      The element was never really designed to be ran from within a tableView. It is an interesting idea, but with having to pre-build the JavaScript to open the iframe it becomes a little more complicated. 

      I have to attend an ISUG meeting all day today.  But I will look at this tonight.  It might not be possible with the current version of the value help, but I am think I might be able to make this work with the version we put in the book (it uses a completely different mechanism to launch the help window).

      • Sorry for the delay getting back to you.  Things came up this weekend.

        I tried this out this morning and everything seemed to work OK for me.  In your iterator, how you are creating the value help element?  I used the p_cell_id as the id for my inner element and it seemed to work just fine (the row index was included). 

          CASE p_column_key.
            WHEN ‘CARRID’.
              p_replacement_bee ?= zcl_es_bsp_elmnt_input_help_v2=>factory(
                 id = p_cell_id
                 value = m_row_ref->carrid
                 dataref = ‘sflight-carrid’

        I will do another more extensive test with MVC, but I don’t really expect it to go any different.  

        • And now it all becomes clear.  It does appear the that ID is built differently when you use MVC.  The ID now includes periods and [].  <br/><br/>I had used the element id in the name of the JavaScript functions to easily make sure that they remained unique.  However the [] and period are not allowed characters in function names.  This is why you got the error that you did.<br/><br/>Please add the following lines of code to the DO_AT_BEGINNING method of the element handler class. Then use the l_id instead of me->id when building any JavaScript function names.<br/><br/>***TPJ Fix on 11/14/2005 To support Value Help within <htmlb:tableView><br/>***when Model View Binding is used.<br/>  DATA: l_id TYPE string.<br/>  MOVE me->id TO l_id.<br/>  IF l_id CS ‘[‘ OR<br/>     l_id CS ‘]’ OR<br/>     l_id cs ‘.’.<br/>    REPLACE ALL OCCURRENCES OF ‘[‘ IN l_id WITH space IN CHARACTER MODE.<br/>    REPLACE ALL OCCURRENCES OF ‘]’ IN l_id WITH space IN CHARACTER MODE.<br/>    REPLACE ALL OCCURRENCES OF ‘.’ IN l_id WITH space IN CHARACTER MODE.<br/>  ENDIF.<br/>  CONCATENATE `onValueHelp` l_id INTO onhelp_js SEPARATED BY ‘_’.<br/><br/>

          • Hi Thomas,

            I’m building the bee in my iterator like you – and your fixing-code works – Thank you ! But unfortunately it does not work till the end 🙁

            The second error stays alive as bsp error when a new event is triggered:
            Structure component ‘fieldid__inputfield’ does not exist.

            The reason is the id-postfix ‘__inputfield’ which is added when instantiating the htmlb_inputfield.

            The question is, if the postfix is really nessecary for deciding between input and textedit? (What’s with the multiple flag ?)

          • I’m not completely sure what you mean by “when leaving the edit-mode”  Are you switching between edit and display in the iterator. If so what are you rendering in display mode (the same f4 custom element or a regular input field). However in this last post you said you get this error when “when a new event is triggered”.

            Actually not hte postfix isn’t critical.  It just helps to assure that all elements have a unique ID.  If you think that is causing some problem, you can try to remove it.  Please give me more details on what causes this other error.  I have not been able to recreate it.  I have tried other events on the page, yet I don’t receive the error.

          • Well the iterator does this:

            CASE p_column_key.
            WHEN ‘NAME’.
            IF p_edit_mode IS NOT INITIAL.
            p_replacement_bee ?=zcl_zutil_input_help=>factory(
                      id = p_cell_id
                      value = m_row_ref_be->name
                      dataref = ‘ZWF_BENDET_FIELDS_BE-NAME’
                      cellvalue = ‘TRUE’ ).

            I did not define something individual for none-edit mode – do I have to? The default of htmlb:tableview is rendered I thought.

            The error occurs when a server-event is triggert and the formfields are provided to the model where no field with the postfix exist, of course.

            I think I simply could delete the postfix in formfields-name of do_handle_data of my controller – but that should not be the solution!?!

            The HTML-Coding show that the input attribute name is wrong, since its equal to the id while normally should be eqaul to the bound modelfield:#

            input type=”Text”
            id=”cform_am_bendet[1].fieldname__inputField” name=”cform_am_bendet[1].fieldname__inputField”

            At other fields this looks:


          • I know what this problem is now.  You might even have the same problem if you did this with a basic input field (I would have to test that).

            You are data binding your tableView, but not the inner inputField in the iterator.  Instead of using value in the factory method use _value and connect it to the input parameter p_cell_binding.

                  p_replacement_bee ?= zcl_es_bsp_elmnt_input_help_v2=>factory(
                     id = p_cell_id
                     _value = p_cell_binding
                     dataref = ‘sflight-carrid’

            This assures that the inner inputField will be data bound to that cell as well. 

  • After debugging and debugging the code I found that the multiple inputhelp (also known as listbox) does not work when controlrendering is set to ‘SAP’ 🙁

    In this case no (html)

    • To be quite honest, within my company I don’t support the multiple inputhelp (listbox) variant any longer.  This was kind of an early experiment to try to get near the functionality of a Select-Option.  It never really worked as well as I would have liked however.  It doesn’t suprise me that the control rendering breaks this element.

      Now that I have a full blown Select-Option element; I really don’t need this multiple inputhelp option any longer. 

  • I found strange not friendly characters in viewing your page in FireFox (my fav. browser). Hoping to see better formatting I tried MS IE6. Still the text looked quite complex. Is this the way BSP is written or is something wrong in my browser setting? I understand CSS & was surprised to see the following just below your pic.

    Kindly try to view your own page in non IE browser & do let me know at

    I am blank about BSP but intuition says something is amiss.


    • I’m afraid that those characters are because of recent changes within SDN.  Originally when I posted this weblog it appeared fine.  I used the HTML that is generated by the new ABAP editor.  Now custom style sheets are no longer allowed.  It was on my list to fix these (I did get several weblogs cleaned up) before I left for vacation.  I did not get them all done.  I will finish them next week when I return.  Sorry for the inconvienience.
  • Hi Tom,
    I have bought your great book with CD and imported the packages. The valuehelp is generally working, but I have some rendering problems:

    The moving iframe has several problems on my system (WAS 640 PL 12)
    –     in the header (where it says “SAP Modal Dialog”, two icons on the right are missing
    –     the body, where the actual valuehelp is rendered, seems to have a size problem, as it partially  covers the header line (SAP Modal Dialog” and also the cancel button on the bottom is not shown completely as it is positioned slightly too low.

    i’d like to attach a screenshot here but that seems to be impossible. However, I have it handy if you need I can send it anywhere.
    My system is a WebAS 640 PL12, Browser: IE 6.0.29

    Thank you for your support,

    • No need to post a screen shot, I know exactly what is happening.  You see the modal dialog javascripts and mime files don’t ship from SAP until SP15.  Now for the book we copied and made some slight modifications to the SAP delivered JavaScripts to support BSP Events.  That is why the JavaScripts are present after the import.  However we still refer to the standard Icons (which will only be present on SP15 and higher).

      If you look on the CD that came with the book, the Icons should be in the BSP_Extensions_Dialogs direction (actually inside there in a subdirectory called Mimes).  There is also a ReadMeFirst!.txt file in the BSP_Extensions_Dialogs directory that details where the mimes should be place in the Mime repository.  (Be sure to place a copy of the mimes into each Theme – including an custom ones you may have created).

      The missing icons are what is throwing off the alignment of the rendering as well. Once the correct mimes are in place, everything should render just fine. 

  • Hello Tom & Brian,
    I used the CD shipped with your book and imported the transport files. I am on a 6.40 SP15 system. Most imports are OK, however I get some returncodes 8: this is the trasnport log:

    Program ZCA_ES_PERS_ZES_BTF_CONTENT===CP, Include ZCB_ES_PERS_ZES_BTF_CONTENT===CU: Syntax error in line 000078 
    Method ‘IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_KEY_TAB’ does not exist. There is, however, a method             
    Program ZCB_ES_PERS_ZES_BTF_CONTENT===CP, Include ZCB_ES_PERS_ZES_BTF_CONTENT===CU: Syntax error in line 000078 
    Method ‘IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_KEY_TAB’ does not exist. There is, however, a method             
    Program ZCL_ES_AREA_WEATHER_COM=======CP, Include ZCL_ES_AREA_WEATHER_COM=======CU: Syntax error in line 000046 
    The type ‘CX_SHM_PENDING_LOCK_REMOVED’ is unknown.                                                              
    Program ZCL_ES_BTF_FRAMEWORK==========CP, Include ZCB_ES_PERS_ZES_BTF_CONTENT===CU: Syntax error in line 000078 
    Method ‘IF_OS_CA_PERSISTENCY~GET_PERSISTENT_BY_KEY_TAB’ does not exist. There is, however, a method             
    Program ZCL_ES_SHARED_MEM_WEATHER_COM=CP, Include ZCL_ES_AREA_WEATHER_COM=======CU: Syntax error in line 000046 
    The type ‘CX_SHM_PENDING_LOCK_REMOVED’ is unknown.                                                              
    Do you know these errors? I also imported the new files (available from SAP-press download K900020.nsp) and then tried to import everything again, same result.

    Your help is greatly appreciated! And btw let me tell you the advanced BSP programming book is really good and useful – as you say: how could I ever live without MVC ???


    • If you check those objects on-line in SE80 they should be OK even though you got transport errors.  Worst case you might have to activate them.  At least that was my experience when we did the test import into a 640 system (although it wasn’t SP15 it was SP13).

      All the errors were with generated Objects (Persistent Objects and Shared Memory classes).  Because the development was done on a 700 SP4 system, there could be differences in the code that gets generated.  Neither set of objects is critical to the bulk of the samples (the persistent class is only used in one small BTF example and the shared memory class is only used in the Weather.Com example), but if you can’t get them to activate, both could be deleted and recreated from the source code in text files.

      The second transport from the website was not fixes.  It was just some additional examples that didn’t get finished in time to include in the book CD.

  • Hello Tom, it is me again :-)<br/>I try to implement your zf4help, it works for searching materials, but not for EKORG (purchasing organisation). this is my htmlb code:<br/>      <zf4help:inputHelpV2 id       = “ekorg”<br/>                           value    = ” “<br/>                           rfcDest  = “R3Q_400″<br/>                           objtype  = “BUS0007″<br/>                           objname  = “PurchOrganization”<br/>                           method   = “GetObjects”<br/>                           keyField = “EKORG”<br/>                           param    = “PurchOrganization” /><br/><br/>First, I am not sure if the method “GetObjects” is correct, or should it be “ExistenceCheck”.<br/>Second, i look at the object BUS0007 and there is no Searchhelp defined. So, how can I still receive a value list in zf4help? Is there a way to define the searchhelp (i could make one in the backend), or do you recommend copying the business object and then adding a searchhelp?<br/><br/>thank you for your support!<br/>Johannes

    • I know that I have done a help for Purchase Org in the past, but I can’t remember if I used the SAP Business Object. 

      I have found that is quite often easier to just create my own object.  Actually I created one generic business object called ZBSP_HELP.  From there I simply add a single key field tied to the search help that I want to expose.  The business object really isn’t used for anything else, so it is ok to fill it up with a lot of unrelated keys.  It is much easier than copying an existing Object and often easier than going and looking for which business object method has the correct help attached. 

      • ok – that’s a good idea and it works now. thanks a lot!

        Now another question:
        I have EKORG searchhelp now. next field on the screen is EKRGP (purchasing group). Becauase groups are assigned to organisations in customizing, the user expects that the EKGRP searhhelp is called with the already selected EKORG from the other field.
        I think this involces two issues:
        can I call the bsp valuehelp extension and pass a parameter to the backend searchhelp?

        can that be done using the value of another input field from the same form? (maybe javascript)

        i just hope you had this requirement before and have a solution handy.
        Anyway- I really appreciate the quick reactions to blog comments!

        have a good day!

        • I’m afraid that you have gone beyond the capabilites that I built into the tool.  There is no functionality to link between different fields or to set other values automatically.  I wanted the element to run standalone without any knowledge of the elements around it. 

          To do what you describe you would either need a specific implementation of the element – rather than the current generic one – or some sort of framework that monitored and interacted with all the one screen elements: neither of which did I really want to build from scratch. 

  • Hi Thomas,

    I put your valuehelp into following hierarchy:


    This works fine until the overflowContainer is bigger than the iFrame but wehn smaller you have uncomfortable scrolling effects. I set the z-index of the iFrame heigher than all other page elements but the iFrame always stays in relation to overflowContainer.

    Is there a way to show the iFrame always on top of all page elements.



    • I have had problems before with iFrame in relation to the overflowContainer element.  Sometimes the inner overflowContainers in the iFrame don’t work correctly if placed within another overflowContainer. 

      These problems were part of the reason that I abonded the iFrame implementation that was originally shown in these weblogs.  The solution that I use now is the one from the BSP Book where all the iFrame logic was replace by the dialog window JavaScript from Web Dynpro ABAP.  I would have to test your exact situation, but I would bet it works better with this new solution. 

  • Hello Gregor,

    I’ve bought your book “Advanced BSP Programming” and implemented the coding. Everything works fine – you did a really great job.

    However, I’ve got some questions regarding the appearance of the popup. I’ve searched the blogs but didn’t find anything about it:

    1. Width/height of the value help popup
    To change the heigth and/or width of the value help popup I had to adjust the value of element->WIDTH and element->HEIGHT of method FACTORY in class ZCLG_ZDIALOG_MODALDIALOG. Is there a way to fill these value for each usage of the BSP extension to become differnt popup sizes depending on the field it’s used for?

    2. The value for “visibleRowCount” is set to 12 as a default value in view InputHelpV2.bsp. If I set the value to 1.000 and start the value help, the popup doesn’t contain a vertical scroll bar to scroll all values. I have to increase the size of the popup first, then the scroll bar appears.

    3. You’re using some kind of technique to “darken” the background window as soon as the popup appears. I didn’t find the coding to disable this. Since we’re running our IE using citrix (with reduced colors), it would look better to switch this feature off.

    Thanks in advance for any input & kind regards

    • 1. I had wanted a fixed size for all my value help dialogs. However as you have found, the sizes can be changed by altering the initialization of the modal dialog inner element.  If you want to be able to set these through the help element itself, just add two new attributes to the help element. You can then pass these values through to the dialog element.

      2.  I did some playing around to get the look of the help dialog just the way I wanted.  This was the reason for the fixed size and the size of the row counts.  I had also ran into problems of the scroll bars not appearing until the dialog is resized.  This same problem also occurs in Web Dynpro ABAP.  The scroll bars are determined by the browser and in this complex layering of elements, I am afraid that something in the browser doesn’t determine the correct sizes until forced to refresh.  The only way I have found around this is to lock the initial sizes to something that works.

      3.  I didn’t write the dialog javascript.  It was written for Web Dynpro ABAP and I only adapted it to BSP.  However if search the javascript file you will find two places with the following code:”progid:DXImageTransform.Microsoft.Alpha(Opacity=40)”;
      It isn’t a configuration option (other than the fact that this technique is disabled if accessibility is set), but you could either add an option to disable this logic or just remove it all together.

      • Hi Thomas,

        thanks for your valuable input!

        I found a work-around for issue 2:
        I’ve set the property “width” of the table view in InputHelpV2.bsp to “501”. Now the vertical scroll bar is displayed immediately since the table doesn’t fit into the window.


  • Hi Thomas,

    any new publications regarding ” I was trying to recreate the classic ABAP Selection-Option in BSP”? This would be another great thing provided by you!

    Kind regards

  • Hi Thomas,

    posting didn’t work before, so one more try:

    I’ve bought your book “Advanced BSP Programming” and implemented the coding. Everything works fine – you did a really great job.

    However, I’ve got some questions regarding the appearance of the popup. I’ve searched the blogs but didn’t find anything about it:

    1. Width/height of the value help popup
    To change the heigth and/or width of the value help popup I had to adjust the value of element->WIDTH and element->HEIGHT of method FACTORY in class ZCLG_ZDIALOG_MODALDIALOG. Is there a way to fill these value for each usage of the BSP extension to become differnt popup sizes depending on the field it’s used for?

    2. The value for “visibleRowCount” is set to 12 as a default value in view InputHelpV2.bsp. If I set the value to 1.000 and start the value help, the popup doesn’t contain a vertical scroll bar to scroll all values. I have to increase the size of the popup first, then the scroll bar appears.

    3. You’re using some kind of technique to “darken” the background window as soon as the popup appears. I didn’t find the coding to disable this. Since we’re running our IE using citrix (with reduced colors), it would look better to switch this feature off.

    Thanks in advance for any input & kind regards

  • Hi, i just get the files in order to make the BSP extension ZKEG, but i still have a problem with the method IF_BSP_ELEMENT~RUNTIME_IS_VALID
    When i want to activate it, it says MC_CONTENT is unknow…can you help me ?
    • That is an easy one to fix.  If MC_CONTENT is unknown, then the inheritance on your element handler class was not set correctly.  When you created the extension itself, there was an option to enter the BSP Element Basis Class.  You should supply the value CL_HTMLB_ELEMENT.  This should create the correct inheritance for your generated basis class down to your element handler class.
      • Thx you…in fact i’ve done that, after searching for a while…but… now it makes the following error…. DESIGN is already declare…should i recreate all the things (BSP ext, BSP elmt,….) ?

        Thx again.


        • It sounds like you manually created attributes that should have been inherited.  If you aren’t too far along, I would suggest that you delete the element and start over to clean everything up.
  • Hi, i try the bsp searchhelp and it seems that there is a internal error when the function module FUBA is used. It is used to get the instance of a search help in


    The serachelp contains a searchelp exit…does it suppose to work or not ?

    • It really probably depends what is going on in the search help exit.  The logic in there would need not to violate the rules of running within BSP (no call transaction, no dialog screens, etc).  What Search help are you calling?  What are the details of the error message?  Is there a short dump (ST22)? 
      • The searchelp is generated when creating the data type. In fact i use it for BW info object.
        I try with a searchhelp that doesn’t contains a exit module and it works.
        I think there is a module fonction call and it search for an searchhelp instance as if the help value was call in the “standard way”…and it fails.
        The exit is generated too…
  • Hi,
       This web log is very nice.

      Is it mandatory to create BSP extensions for searchhelp?If so can u give the steps for creating it?
        Whats the data type for data_ref in page attributes.Can u give the page attributes for ths code.Pls help me out.


    • >Is it mandatory to create BSP extensions for searchhelp?If so can u give the steps for creating it?

      No it probabaly isn’t mandatory to use an extension, however that is the solution that I choose.  By using an extension you have a reusable solution.  All the steps for creating the solution as an extension are presented in this series of weblogs.  If you want me to give you the steps to recreate the solution as something other than an extension – I’m afraid you are asking me to create a completely separate solution.  I really don’t see the value in this alternative solution given the advantages of using an extensions.  I’m afraid I simply don’t have the time to creat an alternative solution like this.

      >Whats the data type for data_ref in page attributes.Can u give the page attributes for ths code.

      I’m not sure what you are asking for here?  data_ref isn’t a page attribute, nor do I use any page attributes in this solution. 

  • Hello,
    I’m trying to recreate the solution you provide in the book “Advanced BSP Programming”, but I get an error on the object prtPopup. I don’t know where you init this object ?

    Thanks for your help!
    Best Regards

    • prtPopup is part of the dialog window that holds the value help in the solution that comes with the book.  The dialog windows are covered under their own chapter in the book.  The are implemented in the separate extension ZDIALOG and initialization happens via element dialogHeader. That is why in the sample usage of the value help I have       <zdialog:dialogHeader id=”dialogHeader” /> before the first value help is output.  <br/><br/>Did you import the transport file?  If so have a look at the  BSP application ZES_VALUEHELP and page simpleTest.htm.<br/>

      • No, I recreated your developpement from the .txt files included in the CD joined.<br/><br/>Yes, I use the tag  <zdialog:dialogHeader id=”dialogHeader” />, but It seems that the error occurs in the DO_AT_BEGINNING method of the dialogHeader element. When cl_htmlb_manager=>render_event_call method is called it return nothing in the variable event_script. <br/><br/>  DATA: event_script TYPE string.<br/>  DATA: id       TYPE string VALUE ‘Parameter1’.<br/>  DATA: popup_id TYPE string VALUE ‘Parameter2’.<br/><br/>  event_script =<br/>     cl_htmlb_manager=>render_event_call(<br/>              bsp_element          = me<br/>              event_type           = ‘click'<br/>              server_event         = me->onclick<br/>              client_event         = me->onclientclick<br/>              param_count          = 2<br/>              param_1              = id<br/>              param_2              = popup_id<br/>              client_event_inlined = ‘X’ ).<br/><br/>  REPLACE FIRST OCCURRENCE OF `’Parameter1’`<br/>  IN event_script WITH `id`.<br/>  REPLACE FIRST OCCURRENCE OF `’Parameter2’`<br/>  IN event_script WITH `popupId`.<br/>  REPLACE FIRST OCCURRENCE OF `;return false`<br/>  IN event_script WITH `;return true`.<br/><br/>Kind Regards.

        • The attributes me->onclick and me->onclientclick are empty. The FACTORY method of the object is never called. Where I have to initialize onclick or onclientclick events ?
          • Hello,
            Now I have imported the transport file in another system, but the situation is the same. ptrPopup is undefined.

            I’m on version SAP Enterprise 4.7. SAP_BASIS 6.20 SP 62.
            Best Regards.
            Bernard Lienher, Switzerland

          • In this instance it is acutally fine if the onclick and onclientclick as well as the event_script are empty (they should be).  These are optional parameters of the dialogHeader element that allow you to hook in into the close event of a dialog.  However that functionality isn’t used by the Value Help.

            I think more importantly is the value of zcl_es_bsp_elmnt_dialog_hdr=>ie_path.  This is what should be pointing to the javascript library that has the prtPopup coding. For instance in my system that is pointing to /sap/bc/bsp/sap/zes_shared/dialog_ie6.js.  Make sure that you have that application, and that it contains the MIME object dialog_ie6.js.  All the files that should be loaded into this BSP application are contained on the CD in the CrossChapter_Code/Mimes directory.  What concerns me though is that if you loaded the transport file; you shouldn’t have to add any files manually.  I just recently built a new laptop with a fresh NSP image and I only imported the transport from the book CD and the dialogs and value help both work perfectly fine out of the gate.

          • You are my hero!
            I have to use a relative path (../bc/bsp/sap/zes_shared/dialog_ie6.js).
            With an absolute path it doesn’t work (/sap/bc/bsp/sap/zes_shared/dialog_ie6.js.).

            Now I have to find a solution to update the size of the modal window because it comes a square of 2cm x 1cm : it’s vers little. Also, the window as no border and the title “SAP Modal Dialog” of the window doesn’t appear. Have you ever see that ?

            Thanks a lot for your big help provided.

          • That is odd that you would have to use a relative path.  Are you running your application using the Value Help via an Application Alias?  /sap/ should always take you back to the root?  Is this node active in SICF?

            This could be related to the size and missing titles. Inside the script there are links to CSS and MIME objects used by the dialog. The dialog script was originally designed for Web Dynpro – so all the links use the ur_system.mimepath for the URL.  If this isn’t being thrown off by the relative path (I suspect it is) and then you might just be missing these additional mime objects.  I know we shipped these mime objects in NetWeaver04 and thought they were in 6.20 SP56 as well – but they are also on the CD that came with the book (New Dialog Script directory). 

          • I modified the path of ur_system.mimpath and ur_system.stylepath in hard with a relative path and unfortunately it doesn’t work. I also imported all the mime objects (maximize.gif, close.gif, s_m_warm.gif, s_m_info.gif, s_m_ques.gif, s_m_erro.gif, s_m_crit.gif, resize.gif and restore.gif) in directory “../PUBLIC/BC/UR/Design2002/themes/sap_tradeshow/common/popup/”.

            I don’t use an application Alias and the node is active in SICF.

            Do I have to post this question about absolute path to SAP OSS ?

            Kind Regards.
            Bernard Lienher

          • Yes you probably do want to post the question about the relative paths in the forum as I am out of reasons why that might be the case.  Try creating a simple example that just access one of the image files.  I know that the dialog solution has worked on plenty of other systems so it must be something specific we are missing.
          • I’m sorry, but in my version there is no directory “New Dialog Script”. I have searched everywhere but no trace of theses directories and files. In alphabetic order of directories it jumps from “Image_Manager” to “Portal”. In directories “Chapter14_Code” or “BSP_Extensions_Dialogs” there is nothing such a .css file. I’m afraid that in my CD’s version doesn’t contain this file.

            Kind Reagards.

          • Dear Thomas,<br/><br/>I will ask why the first image is not display :<br/><br/><%@page language=”abap” %><br/><%@extension name=”htmlb” prefix=”htmlb” %><br/><htmlb:content design=”design2003″ ><br/>  <htmlb:page title=”Default ” ><br/>    <htmlb:image src=”/SAP/BC/BSP/SAP/ZSD_SHARED/pop1.jpg” /><br/>    <htmlb:image src=”../BC/BSP/SAP/ZSD_SHARED/pop1.jpg” /><br/>  </htmlb:page><br/></htmlb:content><br/><br/>Thanks.

          • I discovered that my absolute path was :


            and not :


            Do you know how can I correct this situation and getting a standard path in order to be able to work with your SearchHelp application ?

            Kind Regards.
            Bernard Lienher

  • Hello,<br/><br/>we found problem with shlp for material by short text. It should search case insensitive, but id doesn’t. I did some debugging and finally added few lines of code to method GET_HELPVALUES_COMPLEX.<br/>There is my modification:<br/><br/>***Turn the input values into SAP Ranges<br/>  FIELD-SYMBOLS: <wa_mvc> LIKE LINE OF me->shlp_mvc.<br/>  FIELD-SYMBOLS: <wa_sel> TYPE ddshselopt.<br/>  DATA: lv_fielddescr TYPE REF TO dfies.  ” new declaration<br/><br/>  LOOP AT me->shlp_mvc ASSIGNING <wa_mvc>.<br/>    APPEND INITIAL LINE TO shlp-selopt ASSIGNING <wa_sel>.<br/>    MOVE-CORRESPONDING <wa_mvc> TO <wa_sel>.<br/>    MOVE <wa_mvc>-select_fld TO <wa_sel>-shlpfield.<br/><br/> >>>>>>> start of insertion  ENDLOOP.

  • Hello Thomas,

    i have seen remarks in previous postings about using F4 help in tableview. They were all helpful but i still face a problem that i cannot solve.

    I have used F4 help in table iterator like this:

    p_replacement_bee = zcl_es_bsp_elmnt_input_help_v2=>factory(
    id      = p_cell_id
    dataref = ‘/BIC/AZTUI_T9900-DISTR_CHAN’
    value   = ls_code

    Everything workd perfectly and i can choose data from input help…and choosen data can be seen in cell of tableView.

    When click on save button i read data from cells with

    lc_value = i_edata->get_cell_value(
      row_index    = li_readindex
      column_index = wa_cols-icol ).

    i_edata is defined like this

    When i use DropDownListbox, checkbox or normal inputfield i get the data from tableview. But no data is returned when i use field for F4-help?

    Do you have an idea?

    One addition that i have made to the coding is in the DO_AT_BEGINNING method in ZCL_ES_BSP_ELMNT_INPUT_HELP_V2 is code


    -> this is because my BSP application is on BW-DSO with ‘/’ in its name like ‘/BIC/AZTUI_9900’.

    • I know that the final version of the value help does work inside a TableView.  I have a test application for that.  This final version is the one that we shipped on the CD with the SAP Press book Advanced BSP Development.  However my test case only uses MVC data binding to read the values of the table. The GET_CELL_VALUE might not work because the inner form field will have a different ID than the table cell itself because this is a composite element.
      • Hello Thomas, you were exactly right.<br/><br/>In ZCL_ES_BSP_ELMNT_INPUT_HELP_V2 in method IF_BSP_ELEMENT~DO_AT_BEGINNING the IDs get a suffix ‘__inputField’ that method ‘GET_CELL_VALUE’ does not know.<br/><br/>I changed that:<br/><br/>I.<br/><br/>{   REPLACE        BI2K933898                                        3<br/>\    CONCATENATE me->id ‘__inputField’ INTO }   REPLACE<br/><br/>and II.<br/><br/>   inputfield ?= cl_htmlb_inputfield=>factory(<br/>              alignment       = me->alignment<br/>              cellValue       = me->cellValue<br/>              description     = me->description<br/>              design          = me->design<br/>              disabled        = me->disabled<br/>              encode          = me->encode<br/>              id              = me->id<br/>{   DELETE         BI2K933898                                        4<br/>\                       id_postfix      = ‘__inputField'<br/>}   DELETE<br/><br/><br/>…after that i can again use method ‘GET_CELL_VALUE’. It seems to me at the moment that i do not get any negative consequences from my changes. <br/><br/>Do you have an example where you use MVC data binding to read the values of the table? Maybe i can use that way without the changes i made.

  • Hello  Thomas,

    Great blog as usual. I have implemented without issue but have one problem I cannot seem to overcome. The search help works wonderfully, brings up the list, user can filter on required record and passes back value to the screen. After that field I have another dropdown of yes/no values. When they pick an option on that field, I lose the value in the search help input field.  I am trying to retrieve it just as I do with all the other fields however the value is blank when I do the get_data call. Any suggestions are greatly appreciated.

    *** Snippet  of OnInputProcessing.
          CLEAR data2 .
          data2 ?= cl_htmlb_manager=>get_data( request      = runtime->server->request
                                              name         = ‘inputField’
                                              id           = ‘In1’
          IF data2 IS NOT INITIAL.
            wa_user = data2->value.

    *** data2 values
         ID     g     8      In1
         M_PARENT     r     8      *** illegal reference ***
         M_PAGE_CONTEXT     r     8      *** illegal reference ***
         M_CLASS_NAME     g     8      CL_HTMLB_INPUTFIELD
         M_NAME     g     8      inputField
         M_EXTENSION     g     8      htmlb
         M_OUT     r     8      *** illegal reference ***
         ELEMENT_DELEGATED     r     8      *** illegal reference ***
         SIZE     g     8                                                                                     
         STYLE     g     8                                                                                     
         SUBMITONENTER     g     8                                                                                     
         TEXTDIRECTION     g     8                                                                                     
         TOOLTIP     g     8                                                                                     
         TYPE     g     8      STRING
         VALUE     g     8                                                                                     
         VISIBLE     g     8      X

    Kind regards,
    Lewis Moore

    • got it sorted, it does not use the ID defined on the calling page, the value had to be retrieved with the ID In1__inputField, found it debugging in the java close.
      See you at TechEd
    • The trick here is the the BSP Extension Element for the Value Help renders the inner InputField and several other UI elements, but has to postfix the ID of the value help itself to make sure that all the inner UI element IDs remain unique. Therefore if your value help ID was In1, then the actual inner input field ID will be In1__inputField (that’s two underscores).

      From the inner rendering of the BSP Value Help Extension Element – here is the code of the input field rendering if you want to find this change to postfix to something you would prefer. Notice the parameter id_postfix:

      ****Model Binding
          data: inputfield type ref to cl_htmlb_inputfield.
          inputfield ?= cl_htmlb_inputfield=>factory(
                             alignment       = me->alignment
                             cellvalue       = me->cellvalue
                             description     = me->description
                             design          = me->design
                             disabled        = me->disabled
                             encode          = me->encode
                             id              = me->id
                             id_postfix      = ‘__inputField’
                             invalid         = me->invalid
                             maxlength       = me->maxlength
                             required        = me->required
                             _required       = me->_required
                             showhelp        = ‘true’
                             onvaluehelp     = onhelp
                             size            = me->size
                             _size           = me->_size
                             style           = me->style
                             tooltip         = me->tooltip
                             type            = ‘STRING’
                             submitonenter   = me->submitonenter
                             value           = me->value
                             _value          = me->_value
                             visible         = me->visible
                             _visible        = me->_visible
                             width           = me->width ).
      ****Render the Input Field
          while m_page_context->element_process( element = inputfield ) = co_element_continue.
          endwhile. “End Input Field Render

  • Hello,

    Another quick one, If I wanted to use a search help such as PREM, would your version 3 handle that or do I need to take a different approach. Could not find a BOR with parameters that worked for it when trying to use GET_HELPVALUES_SIMPLE so using the GET_HELPVALUES_EXIT for now and it works fine, however now that I have moved it to staging, the performace is horrible as I get ~6000 records back, need to be able to have the search help come up initial then do the select based on the filter criteria if at all possible.

    Kind regards,

    • My suggestion: consider creating your own custom ddic search help and registering it in the BOR yourself. That way you can control exactly how the filter and search will work.