BSP Value Input Help Popups Version 3.0
Introduction
In the past, I have shared my implementation for Value Help in BSP via Weblogs:
- [ BSP – a Developer’s Journal: Part XII – Value Input Help Popups | /people/thomas.jung3/blog/2004/09/17/bsp-150-a-developer146s-journal-part-xii-150-value-input-help-popups]
- [BSP Value Input Help Popups Version 2.0 Part 1 | BSP Value Input Help Popups Version 2.0 Part 1]
- [BSP Value Input Help Popups Version 2.0 Part 2 | BSP Value Input Help Popups Version 2.0 Part 2]
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)
- 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.
return.
endif.
****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( ).
else.
model2->message = ‘Element ID can not be blank'(e03).
endif.
****Multi or Single Select?
if model2->multiple = abap_true.
…
endmethod.

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
'F4UT_PARAMETER_VALUE_GET' .
Is this fm work properly if it works then the complex part of your code will go away.
Hi Thomas,
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.
>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.
Peter
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.
ELSE.
READ TABLE shlp-interface WITH KEY valfield = l_compname
INTO wa_interface
TRANSPORTING shlpfield.
me->key_field = wa_interface-shlpfield.
ENDIF.
ENDIF.
*************************************************
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?
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.
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
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
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.
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 🙂
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
while
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:
onValueHelpa1_a2_a3[rowindex].a4__iFrame
while
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 !
Sebastian
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).
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'
).
ENDCASE.
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/>
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 ?)
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.
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' ).
ENDIF.
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:
id="givenid__inputField"
name="antrag.fieldname"
?
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.
Thx,
Sebastian
In this case no (html)
Now that I have a full blown Select-Option element; I really don't need this multiple inputhelp option any longer.
Kindly try to view your own page in non IE browser & do let me know at sss@cal.vsnl.net.in
I am blank about BSP but intuition says something is amiss.
jnc/Kolkata
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,
Johannes
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.
This will solve my problem, anyway I will aks the BC people to upgrade to SP15.
Have a good day,
Johannes
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 ???
cheers,
Johannes
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 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.
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:
1.
can I call the bsp valuehelp extension and pass a parameter to the backend searchhelp?
2.
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!
Johannes
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.
sometimes the users have to live with a "not possible" statement.
🙂
best regards,
Johannes
I put your valuehelp into following hierarchy:
phtmlb:containerTabStrip
phtmlb:containerTabStripItem
phtmlb:containerContentItem
xhtmlb:overflowContainer
htmlb:tableView
inputhelp
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.
Regards,
Sebastian
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.
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
Wolfgang
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:
div1x1ImageObj.style.filter="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.
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.
Regards
Wolfgang
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
Wolfgang
Custom BSP Extensions; Time Stamp and Range UI Elements
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
Wolfgang
When i want to activate it, it says MC_CONTENT is unknow...can you help me ?
Thx again.
Laurent
Thx
Laurent
https://weblogs.sdn.sap.com/weblogs/images/1918/DownloadExtension1.jpg
CL_RSDM_F4SERVICE -> GET_INSTANCE_FROM_SHL.
The serachelp contains a searchelp exit...does it suppose to work or not ?
Thx
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...
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.
Regards
siri
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.
Please kindly provide the Page attributes declarations for this blog.Pls help me out.
Regards
sireesha
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.
Thanks.
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
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.
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.
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 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
I posted the question to the SAP SDN forum :
MIME Repository : Absolute path doesn't work
In fact, I need a file - ur_dia_ie.css - that is not in my system ? Please, how can I get file ur_dia_ie.css ?
Kind Regards.
Bernard Lienher
New Dialog Script\Other Themes
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.
"/sap/bc/bsp/sap/BC/BSP/SAP/ZSD_SHARED/pop1.jpg"
and not :
"/sap/BC/BSP/SAP/ZSD_SHARED/pop1.jpg"
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.
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
I_EDATA TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW
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
"REPLACE ALL OCCURRENCES OF '/' IN l_id WITH space IN CHARACTER MODE."
-> this is because my BSP application is on BW-DSO with '/' in its name like '/BIC/AZTUI_9900'.
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.
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.
ENDIF.
*** 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
See you at TechEd
Cheers!
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
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,
Lewis