on 01-17-2008 9:02 AM
Hi, as newbie to the CRM Web, I have encountered with some challenges.
One of them is creating a dropdown box field.
The cookbook describes how to create a dropdown box for an existing field, but I need to create a dropdown box for a new context attribute (when no custom controller is available), what seems to little problematic..
May you please describe the full procedure of adding dropdown box to new context attribute (includes the creation of custom controller, if necessary)?
Thanks in advance,
Shai
Hello Anupam,
The consultants cookbook describes creating of dropdown box using the create attribute wizard (while checking the "for dropdown box" checkbox).
One of the wizard steps requires a custom controller. However, I don't have any. Can you describe the steps of creating a suitable custom controller?
Do you suggest writing the code directly in the html instead of using custom controller, anyway?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shai,
It is not mandatory to connect your context node to any custom controller. You may connect your context nodes with custom controller in order to have a binding of data.
For the dropdown box you can write you code for filling the DDLB table in teh htm as well as in the CREATE_<CONTEXT_NODE NAME> method of the context class(*_CTXT) or any method or place which triggers every time your view loads so that you have your DDLB filled with proper values each time the view appears.
1. You have to declare an internal table of type bsp_wd_dropdown_table.
2. You have to do some select or call some FM to get the desired values in that internal table.
3. You have to pass that internal table to the set_value_table method of you DDLB context node.
Hope this is helpful.
Thanks & Regards
Anupam
Thank you both.
However, you have described a method of filling the dropdown values table manually (Using select query and local internal table definition).
I have understood that there is a standard way of generating dropdown boxes automatically out of BOL attribute. Is it possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The drop down list box field will refer to a BOl attribute.That means a field of a BOL entity will appear as a DDLB in UI.
To make that field appear in the UI as DDLB you have to follow some steps.In the consultants cookbook you will find the detail steps on how to make a field DDLB.
And when you need to populate the DDLB with you own values then you have to write some select or call some function modules or method of some class which will fetch you the values which you want to be there in the DDLB.
In short you can create a DDLB from a BOL attribute(make a BOL attribute appear as a DDLB in the UI) but to populate the DDLB with values at runtime you need to write some select or call some other class or FM.
I hope this is helpful.
Kindly reward points if you fidn this info helpful.
Thanks & Regards
Anupam
Hi,
In the htm code of the view, redefine the field as dropdown field.
ex: <crmic:dropdownListBox id = "Your field"
and for the
attribute, table = "<%= lt_fieldvalues %>"
you can write the code for lt_fieldvalues even in htm code..
hope that helps..
Thanks,
Sreekanth
Edited by: Sreekantha Gorla on Jan 17, 2008 4:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shalom Shai,
There is an example code at BuPaDetailB2B view.
Goto HTML in this view and look how are SAP impliment an Address Version dropdownbox.
All you have to do is create and fill a table that has atleast 2 fields key and description and assign this table to Drodownbox->table attribute.
Good Luck
Eli Steklov
Please Reward Points if it Helped
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.