Passing database table values to drop down list list using "vrm_set_values"
DEar Experts,
How can we pass database travel to drop down list using vrm_set_value call function.
Looking forward for advise from you experts .
REgards
CHandan
Dear Anubhab,
Thanks for your suggestion,
Plz see my code:
Type-pools: vrm.
DATA: it_zlt_mita TYPE STANDARD TABLE OF Zlt_mita,
wa_zlt_mita TYPE zlt_mita,
it_vrm TYPE vrm_values with header line .
Selection-Screen: Begin of Block b1 With Frame Title text-001.
Parameters:
p_mitar Type Zlt_mita-M1 as listbox visible length 20 user-command zcc01 obligatory,
p_mitarn Type Zlt_mita-M2.
Selection-Screen : End of Block b1.
AT SELECTION-SCREEN OUTPUT.
Select * From ZLT_mita INTO CORRESPONDING FIELDS OF TABLE it_zlt_mita.
LOOP at it_zlt_mita into wa_zlt_mita.
it_vrm-key = wa_zlt_mita-m2.
it_vrm-text = wa_zlt_mita-m1.
APPEND it_vrm.
Clear: it_vrm, wa_zlt_mita.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_mitar'
values = it_vrm[]
* EXCEPTIONS
* ID_ILLEGAL_NAME = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'p_mitar'.
Append dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = 1000 " can I use sy-dynnr here
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
tables
dynpfields = dynfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* INVALID_PARAMETER = 7
* UNDEFIND_ERROR = 8
* DOUBLE_CONVERSION = 9
* STEPL_NOT_FOUND = 10
* OTHERS = 11
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = 1000
tables
dynpfields = dynfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PLZ SUGGEST ME IF ANYWHERE I WENT WRONG IN MY CONCEPT AS PER YOUR SUGGESTION.
Looking forward for your further guidance.
Regards
Chandan
Similar Messages
-
Populating values to drop down list in Adobe Forms
Hi,
We have added a drop down list in our adobe form. Our requirement is Payment Terms should be displayed in this drop down list. We tried by adding values to drop down list in object palette window by using '+' sign. But now we want to display values dynamically from table T052U. We need to bring two fields ZTERM and TEXT1. We don't want to use database connection, just from a table as an importing parameter it should be appended to this list.
Atpresent, we don't want to use webdynpro or java for getting values.
Please provide suitable answers.hi,
cretae simple type in data dictionary i don't have any idea to create simple type in adobe forms.
For creating Simple Type------in Dictionary->Local Dictionary->Data Type->Simple Type(here right click u get create simple type).and after that choose Enumaration Here u can add values
and create a node WITH one attribute and this attribute is off Type of that simple type u created in local dictionary and bind that node with interactive form data source property ,now in interactive form drag and drop that attribte from your dataView Run your application these values will populate in your Interactive form.
Regards
Trilochan -
How to set a default value in a Value Help Drop Down List
Hi,
I used an age Range field in my adobe form, the control is a Value Help Drop Down List. i am populating the drop down using following code.
IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();
IModifiableSimpleValueSet ageValueSet = ageType.getSVServices().getModifiableSimpleValueSet();
ageValueSet.put("1","21-29");
ageValueSet.put("2","30-34");
ageValueSet.put("3","35 or Above");
My requirement is to set a default value e.g. 30-34 in the age range field.
I want to give input to iform from my Implementation code only.
Please help.
Thanks in advancehi Ranjan,
that means you have to set at design time,
to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
like
wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
This generally done in Initialization method of the controller. -
External XML data files to add values to drop down lists
I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
Raghava Kumar V.S.S.Hi,
For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
Thank you -
Not able to set values in drop down for a table field
Hi All,
I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
Pls help.
Regards,
BhaskarHi Otto,
Here is the code I am using:
* navigate from <CONTEXT> to <DATASOURCE> via lead selection
lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
* navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
* navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
node_info = lo_nd_education_tab->get_node_info( ).
REFRESH ddlb_value_set.
DATA: wa_edu_est TYPE t517t.
SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
s_element-text = wa_edu_est-stext.
s_element-value = wa_edu_est-slart.
APPEND s_element TO ddlb_value_set.
ENDSELECT.
SORT ddlb_value_set BY text.
* Set Value_sets to node_info
node_info->set_attribute_value_set(
name = 'EDU_EST'
value_set = ddlb_value_set ).
Regards,
Bhaskar -
How to add values to drop down list in adobe forms
how to add values to drop down list in adobe forms
Hi,
If you are using WD Java following are steps of filling values in DD Box:
1 Create a simple type in the Dictionary.
2 Create an attribute "CountryNew" in the Context of type created by you.
3 Write following code in the init method of the form:
IWDAttributeInfo countryinfo =
wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
IModifiableSimpleValueSet countryValueSet =
Country.getSVServices().getModifiableSimpleValueSet();
countryValueSet.put("IN", "INDIA");
countryValueSet.put("US "USA");
4 Add a Enumrated DD box in the form and bind it to the attribute "CountryNew"
Hope this helps
Amit -
Issue in value set Drop down for ALV in Webdynpro with Index
Hi Experts,
We are unable to get the Drop down values in the ALV Table as shown below.
Code:
DATA lo_nd_table TYPE REF TO if_wd_context_node.
DATA lt_table TYPE wd_this->elements_table.
DATA ls_table TYPE wd_this->element_table.
DATA: lr_input TYPE REF TO cl_salv_wd_uie_input_field,
lr_column TYPE REF TO cl_salv_wd_column,
lt_node_info TYPE wdr_context_attr_info_map,
ls_node_info TYPE wdr_context_attribute_info,
lr_dropdown TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
lr_info TYPE REF TO if_wd_context_node_info.
DATA:lt_columns TYPE salv_wd_t_column_ref,
ls_columns TYPE salv_wd_s_column_ref,
lv_tabix TYPE sy-tabix,
lv_count TYPE c.
DATA: ls_valueset TYPE wdr_context_attr_value,
lt_valueset TYPE wdr_context_attr_value_list.
TYPES:BEGIN OF ty_name,
name TYPE string,
END OF ty_name.
DATA: lt_name TYPE TABLE OF ty_name,
ls_name TYPE ty_name.
* navigate from <CONTEXT> to <TABLE> via lead selection
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
SELECT * FROM zemp_table INTO CORRESPONDING FIELDS OF TABLE lt_table UP TO 10 ROWS.
LOOP AT lt_table INTO ls_table.
lv_tabix = sy-tabix.
CLEAR: ls_table-leave_values.
DO 1 TIMES.
lv_count = lv_count + 1.
CONCATENATE 'Open' lv_count INTO ls_valueset-value.
CONCATENATE 'Open' lv_count INTO ls_valueset-text.
APPEND ls_valueset TO ls_table-leave_values.
CLEAR ls_valueset.
CONCATENATE 'Approved' lv_count INTO ls_valueset-value.
CONCATENATE 'Approved' lv_count INTO ls_valueset-text.
APPEND ls_valueset TO ls_table-leave_values.
CLEAR ls_valueset.
CONCATENATE 'Rejected' lv_count INTO ls_valueset-value.
CONCATENATE 'Rejected' lv_count INTO ls_valueset-text.
APPEND ls_valueset TO ls_table-leave_values.
CLEAR ls_valueset.
ENDDO.
MODIFY lt_table FROM ls_table INDEX lv_tabix TRANSPORTING leave_status leave_values.
ENDLOOP.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model(
* lo_interfacecontroller->set_data( r_node_data = lo_nd_value_set ).
**Get the context node information
lr_info = lo_nd_table->get_node_info( ).
lt_node_info = lr_info->get_attributes( ).
LOOP AT lt_node_info INTO ls_node_info.
ls_name-name = ls_node_info-name.
APPEND ls_name TO lt_name.
ENDLOOP.
*Get all the columns to make row editable
CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
RECEIVING
value = lt_columns.
* Make the field dropdown
CALL METHOD lo_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'LEAVE_STATUS'
RECEIVING
value = lr_column.
* Create Object for dropdown
CREATE OBJECT lr_dropdown
EXPORTING
selected_key_fieldname = 'LEAVE_STATUS'.
CALL METHOD lr_dropdown->set_valueset_fieldname
EXPORTING
value = 'LEAVE_VALUES'.
CALL METHOD lr_dropdown->set_type
EXPORTING
value = if_salv_wd_c_uie_drdn_by_index=>type_key_convert_to_value.
CALL METHOD lr_column->set_cell_editor
EXPORTING
value = lr_dropdown.
*Set the table Editable
lo_value->if_salv_wd_table_settings~set_read_only( value = abap_false ).
lo_nd_table->bind_table( new_items = lt_table ).
Please suggest me where we are going wrong.
Thanks in advance...!!!
Best Regard's,
Shashi KanthHi Shashi,
Your code looks okay. Debug & check if everything goes fine and all the required list of values getting bound to node.
Is any code after this logic, which sets data to table ? if so, that logic is wiping out the drop down list values from context node.
Final check point:
Read the context node 'TABLE' and fetch records into internal table in WDDOMODIFYVIEW( ) method to make sure that, every row of your table contains the drop down list entries in "LEAVE_VALUES" attribute
Hope this helps you.
Regards,
Rama -
Dashboard prompt issue (Restricting Values in drop down) ????
Hi Friends,
In my report I have "days to start" column which list almost 10,000 values ranging from -1000 to 5000.
I need to create a prompt for this report on "Days to Start" column.
When I create a prompt on Days to start with Operator "Greater than" and Control "Drop Down List" it shows me all the values in Drop down.
I need only specific Values like 30, 60, 90, 180 which might not be in the "days to start" column.
If I select "SQL Result" what should be the SQL for that??
Is there any other way to solve this problem
Aprreciate your help on this
ThanksYou could make a table VALUES with 1 column and fill it with values like 30,60,90....then in sql you'd write SELECT * FROM VALUES....as simple as that
(of course, it'd have to be in RPD, and you'd need to expose it in Presentation layer)
Edited by: wildmight on Feb 19, 2009 8:18 AM
Also, you could try this - it works for me - but it could be slower and you might want to figure out how to round it - also, it has to be a number or cast to number format
SELECT Table."Column"/30 saw_0 FROM "Subj Area" ORDER BY saw_0
Edited by: wildmight on Feb 19, 2009 8:29 AM -
Hello
I am developing interactive form, where in we have a bunch of drop-down fields, i have created them by dragging Enumarated Drop-down (no select) item from WebDynPro Native (Its provided from SAP and ERP Back End system, pls. you guys disregard this WebDynPro & my_WebDynPro_SAP_application wordS) section of palatte and dropped on my_form layout, fine.
This my_form will be launched on the browser by executing the my_WebDynPro_SAP_application.
I am filling these drop-down field's list from my_WebDynPro_SAP_application. Say the list contain 3 entries like entry_1, entry_2 and entry_3
When i launching my_form on the browser and i saw the drop-down fields with out any populating the value(blank) on the form, but list holding the 3 entries, fine
If i drop-down the list then i can see all entrires (entry_1, entry_2 and entry_3), fine
Issue is: Say, by mistake user has selected entry_2, hence the entry_2 is populated on that drop-down field, fine....but after couple of seconds user has realised that, its a mistake and user want to keep that drop-down field 'as is' (meaning, blank), but, there is no chance! Once dropped down the list, user invariably has to select any one of entry from the list! There is no chance of keeping the drop-down field as blank!
Pls. let me know how can i fix my issue ( i passed an INITIAL entry along with other 3 enties: entry_1, entry_2 and entry_3? so total 4) but no USE?
Passing INITIAL entry has not worked! bcz adobe is deleting this INITAIL entry from the list
Is there any standard/good practice to achieve my requirement?
Thank youHi,
There are a couple of options.
One would be to include a dropdown item " ", which will appear in the list as a blank option.
You could include a reset button next to the dropdown, which would reset just that dropdown back to it initial - no selection state.
Lastly, I have an example here where you can script if the user is holding down the Shift key. If they are then clear the field: http://assure.ly/j1KdNq.
Hope that helps,
Niall -
How to set default value for drop down box in jsf
Hi,
Can anyone help me to set the default value in drop down box using <af:selectManyChoice> ?
As I know there is an unselectedLabel attribute in <af:selectOneChoice> but not valid attribute for <af:selectManyChoice>.
Any help must be appreciated.
Regards,
AKHi Frank
My entity type is a List in managed bean. I have set the entityType in the constructor of the managed bean. I have attached my code here.
TPSearchCriteriaBean.java****************************************
/** Constructor */
public TPSearchCriteriaBean() {
super();
entityType=new ArrayList<String>();
entityType.add(UIConstants.LIST_ITEM_ALL);
authorizationType=new ArrayList<String>();
authorizationType.add(UIConstants.LIST_ITEM_ALL);
companyType=new ArrayList<String>();
companyType.add(UIConstants.LIST_ITEM_ALL);
mrgStatus=new ArrayList<String>();
mrgStatus.add(UIConstants.LIST_ITEM_ALL);
legalStatus=new ArrayList<String>();
setEntityType(entityType);
setAuthorizationType(authorizationType);
setCompanyType(companyType);
setMrgStatus(mrgStatus);
country = "0";
//address = new AddressBean();
UIConstants.java***********************************************************
public static final String LIST_ITEM_DEFAULT = "select";
public static final String LIST_ITEM_ALL = "0";
LOVManager.java*****************************************************************
public List<SelectItem> getLovList(String lovType, boolean requiredOption_SELECT, boolean requiredOption_ALL)
log.debug("LOV loading for " + lovType + ": START");
List<SelectItem> lovList = new ArrayList<SelectItem>();
//check validity of lov loading request
validLov:
for (int i = 0; i < lovTypeArray.length; i++)
if (lovTypeArray.equals(lovType))
break validLov;
log.debug("ERROR: LOV Type not valid.");
return lovList;
//First select is replaced by ALL here
//<-- Select --> should be an option
if (requiredOption_SELECT)
lovList.add(new SelectItem(UIConstants.LIST_ITEM_DEFAULT, "--Select--"));
LOVDao dao = new LOVDao();
dao.loadLOVValues(lovType, lovList);
log.debug("LOV Loading successful!");
//<ALL> should be an option
if (requiredOption_ALL)
lovList.add(new SelectItem( UIConstants.LIST_ITEM_ALL, "ALL"));
return lovList;
Kindly help me.
Regards,
AK -
How to get the values of drop downs, which are gonna create at run time.
As per my design requirement, I have to create drop downs in an ADF display table.
The no# of rows of the table are gonna decide the no# of the drop downs. User can select the values from drop downs. My issue is, how can I capture the selected values of those drop downs as those are gonna created run time.Hi
ohh ,ok ,then as u said that u r storing twenty values ,thats y i aksed earlier ,are these form values part of tbale ,or as u said 20 values are there ,for these u r creating 20 form values ???.
My suggestion would be ,u do four calculation and put all your results in a hashmap ,and keep this hash map in to sesion ,using the following method
pageContext.putTransactionTransientValue("HashMapName",myHashMap);
and inside the PFR method when u want to display these values ,u can loop through your hashmap and can display these values.
like this
HasMap hm=pageContext.getTransactionTransientValue("HashMapName");
thanx
Pratap -
How to capture selected value from drop down by index
Dear friends,
i want to capture the value of select value from drop down by index, for eg if select air france, how to capture , could any one please let me know
Thanks
VijayaHi Vijaya,
You can get the value of selected from drop down as below
Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
data lo_element type ref to if_wd_context_element.
lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
Now, you can get the static attribute value of selected drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
data ls_data type wd_this->element_nd_drp_down.
lo_element->get_static_attributes(
importing
static_attributes = ls_data ).
Hope this helps you.
Regards,
Rama -
HTML won't display £ symbol in drop-down menu list.
What happened?, Can anyone help?
I created drop-down selection list of amounts which a client
might be willing to pay, however when I view the saved page in the
browser window instead of the £ sign/symbol in front of the
numbers I have a ? question mark symbol instead.
How can I fix this to display the pound symbol?
HTML CODE -->
<select name="Budget" class="textfield2">
<option>Select Budget for Project:</option>
<option value="Under £500">Under
£500</option>
<option value="£500 - £1000">£500 -
£1000</option>
<option value="£1000 - £2000">£1000 -
£2000</option>
<option value="£2000 - £3000">£2000 -
£3000</option>
<option value="£3000 - £4000">£3000 -
£4000</option>
<option value="£4000 - £5000">£4000 -
£5000</option>
<option value="£5000 - £10,000">£5000 -
£10,000</option> <option
value="£10,000+">£10,000+</option>
</select>
Regards,
Peter.oO(Peter Fettes)
> I created drop-down selection list of amounts which a
client might be willing
>to pay, however when I view the saved page in the browser
window instead of the
>? sign/symbol in front of the numbers I have a ? question
mark symbol instead.
> How can I fix this to display the pound symbol?
The documents have to be encoded properly (for example with
UTF-8) and
the server has to tell the browser about the used encoding.
Another way is to use named character references instead
(£
Micha -
Select customer name from a drop down Select List or be able to type it in
Hi,
Is there a way to allow my users to have an option to either select a customer name from a drop down Select List or be able to type it in...
Thanks in advanceThis is an excellent option for another application but in this one I would prefer a drop down list to allow my users to see all the orders (to pick from the list) or type it in if they can't find it in the list...
I know how to create a drop down select list but not sure what to do to allow users to be able to manually type in as well...
Thanks -
My account keeps asking for Region but the drop down menu lists Cities in China. I can,'t cange the region in my account because it asks me to check the date and time but these are correct. Any answers please?
Look, I understand I still need a card attached to the account. The problem is, it won't accept my card because I only have 87 cents in my bank account right now.
If I had known there would be so much trouble with the iTunes card, I would have just put the cash in my bank account in the morning instead of buying an iTunes card (I didn't expect the banks to be open on Thanksgiving of course).
Apple will only accept cards that have a balance. The balance is so small in my account that it won't accept it as a valid card.
I'm going to have to contact Apple anyway to reset the security questions. That's obvious. Your answers were not exactly helpful. You didn't tell me anything I don't already know, but thanks for trying to be helpful.
Maybe you are looking for
-
SQL query with multiple tables - what is the most efficient way?
Hello I am learning PL/SQL. I have a simple procedure where I need to find number of employees and departments per location as per user input of location_id. I have 3 Tables: LOCATIONS location_id (pk) location_name DEPARTMENTS department_id (pk) loc
-
Stuck on grey screen with apple logo when starting up?
Hi, My Macbook (2009 aluminium unibody (Leopard 10.5.8)) won't boot. When I try to start it up it gives the chime and then gets stuck at the grey screen with the Apple logo and some spinning gear below. I have tried booting with the install DVD and r
-
Latest Ccritical Update seems to have broken Reporting Services in SharePoint
The error I'm getting in my logs is: Cannot find site lookup info for request Uri http://spapp-prod0:32843/29869a14ea294b42bf388f54c08b252d/ReportExecution.svc. Here is a screen grab of the actual error. Can anyone help?
-
Custom Infotype for Org Management
Hi Experts, I Iam trying to create custom infotype to capture some infomation on an Org Management custom object and I am not sure if I can do this through PM01 because this is neither employee or applicant info but custom object info. Any idea on ho
-
Hi, I have the following query: select * from table1 a where completed between to_date('10 May 2013 11:31', 'DD Mon YYYY hh:mi') and to_date('10 May 2012 11:31', 'DD Mon YYYY hh:mi'); I see records in the database between those dates in that column b