on 02-09-2007 2:49 PM
Hello,
I feel bad even asking something this basic but I've tried and tried and no matter how I search I can't find any documentation about this.
I want my web dynpro screen to show a dropdown that contains a list of items a user can pick from. My questions are:
1) If I want the list to be static, how can I run some initialization logic to populate the dropdown when the app is started?
2) There seem to be three different ways of creating a dropdown: DropDownByIndex, DropDownByKey and ItemListBox. What is the difference between them?
Thanks in advance for any help!
David.
Hi,
The first three threds will explain the diffences and third one will give u the some examples.
http://help.sap.com/saphelp_erp2005vp/helpdata/en/22/5f9041d3c72e7be10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/content.htm
Thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use following code to get system date and day.
public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
sdf.format(cal.getTime());
you can specify format according to you and can get day, date and time.
Reena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
if you want the list to be static then create a simple type in local dictionary and enter the value in the enumeration.
Difference between dropdown by key and dropdown by index is <b>key</b> list all the values available domain level at the run time if it is binded to the model attribute.
Dropdown by index is used to populate the values.
Check out this thread as well.
Regards,
Gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick reply Gopi.
I don't really want to involve the local dictionary in something like this. My question is even more basic than that. I'm just looking for some example(s) on how to programatically populate a dropdown list on a web dynpro page.
Once I get past the basic stuff I'll be able to delve into the more complex situations where I'm using dictionary or reading values from some database and dynamically building the dropdown.
Also, I didn't really understand your description of the difference between dropdownbyindex and dropdownbykey. Do you have a link you could point me to that would explain/illustrate the differences.
Lastly, the link you provided... when I follow it I get the following message "The specified thread [0] was not found". Could you double-check it please?
Thanks again!
David.
hi,
go through some standard examples.
The below link has many examples.
Check out Tutorial 8, 16.
regards,
Gopi
Very short explanation:
*ByIndex:
- Displayed entries are attribute values of elements of a context node with cardinality 0:N
- Selected entry / index = lead selection of node
*ByKey:
- Displayed entries are values of a value set (key/value-pairs) of a DDIC type
- Selected entry = key of such a pair
A DDIC type with value set may be created at designtime using the dictionary editor or you may add such a value set at runtime using the DDIC API.
Armin
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.