List box in table
Hi...
I have a table with 3 list box. Based on selection in one list box another listbox must be populated.
i have written event for that list box... that event is working fine for first row alone.. if i select second row & get the data from the list box its reading first row only...
How to specify the index... Since there is no lead selction...
Any idea or example program...
Thanks in advance.
Kalpanashri Rajendran.
Hello,
I think you can follow this,
calling these methods from the respective classes.
GET_STATIC_ATTRIBUTES from IF_WD_CONTEXT_ELEMENT
GET_SELECTED_ELEMENTS from IF_WD_CONTEXT_NODE
You can achieve the required behaviour.
If you want to specify the index,
SET_LEAD_SELECTION_INDEX(Set Element of Lead Selection with Index) from interface:IF_WD_CONTEXT_NODE.
Before setting the index, get the data from node and put it in to internal table.
Loop at that internal table.
populate lv-tabix.(sy-tabix)
CALL METHOD lo_nd_roles_users->set_lead_selection_index
EXPORTING
index = lv_tabix.
endloop.
This is not exact code but hope will give u some idea....!
Cheers,
Bharath
Similar Messages
-
Problem when creating list box in table control
Hi every body ,
I am placing a list box in table control , the list box is coming perfectly but
when I am scrolling or pressing enter the data in that field is clearing.
if I remove the list box , and i enter the data directly and scrolling or press enter
the data is not clearing.
But only for list box only it is be having like that
what is the problem?
the code is as follows
*{ INSERT DEVK935807 1
*& Module glaccuontlist INPUT
text
module glaccuontlist input.
type-pools vrm.
tables: zglaccount.
data:
name type vrm_id,
list type vrm_values,
value like line of list.
clear:value.
refresh: list.
name = 'ACGL_ITEM-HKONT'.
select * from zglaccount.
value-key = sy-dbcnt.
value-text = zglaccount-hkont.
append value to list.
clear value.
endselect.
call function 'VRM_SET_VALUES'
exporting
id = name
values = list
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.
endmodule. " glaccuontlist INPUT
*} INSERT
thanks in advance.\
srinivas.Hi srinivasa,
try it.
select * from zglaccount.
<b>value-key = zglaccount-hkont.</b>
value-text = zglaccount-hkont.
append value to list.
clear value.
endselect.
Regards
Allan Cristian -
Hi,
I need a list box for an input field in table control.
In brief. I have 5 fields in table control out of which i have to enter values manually for 1 field and for 1 field i need a list box or drop down and then when i press enter the remaining fields should be populated.
i got the code working but now they need the drop down list for the second input field.
If anybody could provide with the code it would be real helpful and iwas confused whether i need to write code in pov or some where else.
the field for which i need list box is taken from dictionary .
any help would be geatly appreciated.
suchitraRefer this link:
table control Drop down list
Regards,
ravi -
Problem with list box in table control (Module pool) .
Hi,
I'm facing a problem while populating values in List Box..
While I'm clicking a value from the list box it is not being hold in that box...box got blanked.
Please help me to solve this.process before output.
module pop_drop_down.
module pop_drop_down output.
name1 = 'IO5'.
REFRESH list1.
LOOP AT it_zpoitshead INTO wa_zpoitshead.
value1-key = wa_zpoitshead-createdt.
value1-key = wa_zpoitshead-its_ebeln.
APPEND value1 to list1.
ENDLOOP.
CLEAR value1.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name1
values = list1
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.
endmodule. " pop_drop_down OUTPUT -
I was using a muticolumn listbox(not table,for table i have example code,and problem is that i was not getting active cell position for Multi column listbox) with 5 columns.In third column,i want to generate a ring control,generate in the sense,whenever user clicks on any cell of third column of multicolumn listbox(not table),the ring control should pop up.The thing is that i need to use only one ring control and whenever user clicks on any cell of a third column,this ring control should pop up.How can i achieve this,anyone please help me,
Regards,
Naresh.NHi, Naresh,
For starting point you can read this: Table with Drop Down Items
Andrey. -
Multicolumn list box selection of Complete Row
Hi guys ,
I want to know that is there a way to select a complete Row from MultiColum List Box Or Table on the Front Penal and then paste on the next row. Its kinda same as microsoft Excel when you select a complete row and coloum and then paste it back to any other row or column and all the values are pasted. The program i am working on requires me to write bunch of values all together in the multi column list box and then copy the same values with jsut a little change(maybe in just one column) and then write them again ..
Thanks
Regards
Solved!
Go to Solution.Its just array manipulation if I understand your question right.
Something like this:
Beginner? Try LabVIEW Basics
Sharing bits of code? Try Snippets or LAVA Code Capture Tool
Have you tried Quick Drop?, Visit QD Community. -
Set the column name of a table in a list box
is there any code to set the column name of a table in a list box at oracle devloper 6i?
pls help.I dont want to go for pl/sql . It should work any table.You want Dynamic SQL without using PL/SQL? Tricky. I'm sure there's a possible way using some very complex and convoluted XML functionality of SQL but in reality you are asking for something that isn't natural to SQL queries, especially if you are expecting a dynamic number of columns to be produced for each row of data. SQL expects a table structure, including output formats, to be a defined number of columns with any number of rows, not a defined number of rows with any number of columns.
Perhaps if you explain why you need this sort of functionality then we may be able to offer a better solution.
;) -
List Box with Variable Entries in a Table Control
Hi ,
I have a requirement where a certain column F of the table control should be designed as dropdown list box. The problem is, i have to populate different entries for field F in each row of the Table control.
Field List
First Line - A,B,C
Second Line - A,B
Third Line - A
Is it possible in ABAP to achieve this . I should not use an input help. Can i achieve this with Drop down list ?
Regards,
Krishna Chaitanya . AHi Priyaranjan,
Assoon as you enter records and save it it gets saved , that is ok , but when you do scroll system goes to PAI , so you need to chk the value of ok_code when scroll button is pressed and write the code according to that .
more over you need to increase the number of lines that can be displayed in a particular table control .
Try this it may help you .
<i>Reward points if helpful.</i>
Regards,
Amber S -
ADF Faces Dependent list boxes in an editable table
Hi,
I'm working with JDeveloper 10.1.3.1.0.
I saw the topic "How to build dependent list boxes with ADF II" on F. Nimphius' Blogbuster.
There it is shown how to handle dependent list boxes in an ADF Faces form. I tried this for an editable table but it doesn't work correctly: If there is more than one row in the resultset of the table, both dependent list boxes have the same content in all the rows though the content in the database is different.
Can anyone help me?
Thanks.Ok - I will try.
I built the listboxes like it is described in "ADF Faces: How to built dependent lists boxes with ADF and ADF Faces Part II", Frank Nimphius' Blogbuster July, 2006.
This is the full code of my ManagedBean:
package asdb.view.backing;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import oracle.adf.model.OperationBinding;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.faces.component.core.input.CoreInputText;
import oracle.binding.BindingContainer;
import oracle.jbo.Row;
import oracle.jbo.ViewObject;
import oracle.jbo.client.Configuration;
import oracle.jbo.uicli.binding.JUCtrlValueBindingRef;
public class AktMitFktEdit {
private BindingContainer bindings;
public AktMitFktEdit() {
public void kategorieWechsel(ValueChangeEvent valueChangeEvent) {
// Add event code here...
BindingContainer bc = this.getBindings();
DCIteratorBinding kategorienIter = (DCIteratorBinding)
bc.get("OrganKategIterator1");
Row rw =
kategorienIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
String kategorie = (String)rw.getAttribute("Kategorie");
OperationBinding opBindingOrganeLovIter = (OperationBinding)bc.get("ExecuteWithParams");
opBindingOrganeLovIter.getParamsMap().put("kategorieParam",kategorie);
opBindingOrganeLovIter.execute();
public void setBindings(BindingContainer bindings)
this.bindings = bindings;
public BindingContainer getBindings() {
return bindings;
It works fine, when the user only want to update existing rows. But if he had inserted a new row and afterwards want to update existing rows, the listboxes don't show the correct contents. No error messages are displayed. -
Table control list box. different values in each row of the list box
Hi all,
i have a requirement to display text box in table control. Each row of list box should contain different values.
i tried with the below code but the values are not getting populated in list box. please give your ideas.
I tried with list box which is having same values in all rows, it is working fine.
loop at itab.
select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
where BLAWBNO = itab-BLAWBNO and
BLAWBDT = itab-BLAWBDT and
CTRNO = itab-CTRNO.
if sy-subrc = 0.
index = 1.
list3-key = index.
list3-text = ZSD_PS_BLAWB-vbeln.
append list3 to list2.
index = index + 1.
endif.
endselect.
clear index.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'ITAB-VBELN'
VALUES = list2
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.
modify itab.
endloop.
Thanks in advance.Hi,
this is code example for listbox
TYPE-POOLS vrm .
DATA: lt_vrm_values TYPE TABLE OF vrm_value.
DATA: wa_vrm_values TYPE vrm_value.
PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
wa_vrm_values-key = 'Key1'.
wa_vrm_values-text = 'Value1'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key2'.
wa_vrm_values-text = 'Value2'.
APPEND wa_vrm_values TO lt_vrm_values.
wa_vrm_values-key = 'Key3'.
wa_vrm_values-text = 'Value3'.
APPEND wa_vrm_values TO lt_vrm_values.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_LIST'
values = lt_vrm_values
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.
To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
Manas M.
P.S.: This is very easy question, you should use search ... -
List box problem in table control
Hi,
I have 3 list box coloum in my table control.Based on the 1st list box selection i wanna fill the 2nd list box.
I used function code 'CUS' and made the Fct type <BLANK> but my problem is fuction code triggers PAI but i am not getting the values what i slected in the 1st list box.
Please help me.
Regards,
Karthik.Actually i resolved the problem the problem was with the function module...instead of VRM_SET_VALUES i tried F4_help...
-
How-to create dependent list boxes in a table -Frank Sample
hi everyone i would like to ask a suggestion about Frank's example on How-to create dependent list boxes in a table -Frank Sample ...
i want to extend this example for 3 dependent lists... including locations, departaments and employes....
this the ListboxBean java that Frank is using in his example.... and this is only for locations and departaments tables and it works ok... i want to add the third list for employers wich is dependent only from departaments list.... as i am not good in java i would like to ask u a suggestion on how to develop the third list in this java class ...
public class ListboxBean {
private SelectItem[] locationsSelectItems = null;
private SelectItem[] departmentsSelectItems = null;
public SelectItem[] getLocationsSelectItems() {
if (locationsSelectItems == null){
FacesContext fctx = FacesContext.getCurrentInstance();
ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.LocationsView1Iterator}");
DCIteratorBinding locationsIterBinding = (DCIteratorBinding) vbinding.getValue(fctx);
locationsIterBinding.executeQuery();
Row[] locRowsArray = locationsIterBinding.getAllRowsInRange();
// define select items
locationsSelectItems = new SelectItem[locRowsArray.length];
for (int indx = 0; indx < locRowsArray.length; indx++) {
SelectItem addItem = new SelectItem();
addItem.setLabel((String)locRowsArray[indx].getAttribute("City"));
addItem.setValue(locRowsArray[indx].getAttribute("LocationId"));
locationsSelectItems[indx] = addItem;
return locationsSelectItems;
return locationsSelectItems;
public SelectItem[] getDepartmentsSelectItems() {
FacesContext fctx = FacesContext.getCurrentInstance();
ValueBinding vbinding = fctx.getApplication().createValueBinding("#{row}");
JUCtrlValueBindingRef rwJUCtrlValueBinding = (JUCtrlValueBindingRef) vbinding.getValue(fctx);
Row rw = rwJUCtrlValueBinding.getRow();
if (rw.getAttribute(6) != null){
OperationBinding oBinding = (OperationBinding) fctx.getApplication().createValueBinding("#{bindings.ExecuteWithParams}").getValue(fctx);
oBinding.getParamsMap().put("locId",rw.getAttribute(6).toString());
oBinding.execute();
ValueBinding vbinding2 = fctx.getApplication().createValueBinding("#{bindings.DepartmentsView2Iterator}");
DCIteratorBinding departmentsIterBinding = (DCIteratorBinding) vbinding2.getValue(fctx);
departmentsIterBinding.executeQuery();
Row[] depRowsArray = departmentsIterBinding.getAllRowsInRange();
// define select items
departmentsSelectItems = new SelectItem[depRowsArray.length];
for (int indx = 0; indx < depRowsArray.length; indx++) {
SelectItem addItem = new SelectItem();
addItem.setLabel((String)depRowsArray[indx].getAttribute("DepartmentName"));
addItem.setValue(depRowsArray[indx].getAttribute("DepartmentId"));
departmentsSelectItems[indx] = addItem;
return departmentsSelectItems;
public void setLocationsSelectItems(SelectItem[] locationsSelectItems) {
this.locationsSelectItems = locationsSelectItems;
public void setDepartmentsSelectItems(SelectItem[] departmentsSelectItems) {
this.departmentsSelectItems = departmentsSelectItems;
Thanks in advance :0Hi,
I think that all you need to do is to look at how I implemented the dependent detail for querying the Employees select items
Then you make sure the DepartmentsVO and the EmployeesVO have bind variable to query them according to the pre-selected value in their respective master list
Frank -
Reg: Table control list box
Hi All,
Can anyone please explain with sample code how to get values from the table control list box and save it the internal table.
regards,
karthik*& Report ZTABLEC
REPORT ZTABLEC.
tables : mara.
data : it like mara occurs 0 with header line.
data : begin of it1 occurs 0 ,
matnr like mara-matnr ,
end of it1 .
data: OK_CODE type SY-UCOMM .
data :STATUS like zaiod3-status .
controls : t1 type tableview using screen 1000.
call screen 1000.
*& Module STATUS_1000 OUTPUT
text
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
select * from mara into table it up to 10 rows.
ENDMODULE. " STATUS_1000 OUTPUT
*& Module USER_COMMAND_1000 INPUT
text
MODULE USER_COMMAND_1000 INPUT.
IF SY-UCOMM = 'SAVE'.
IT-MATNR.
append it .
modify MARA from it.
ENDIF.
ENDMODULE. " USER_COMMAND_1000 INPUT
*& Module create_dropdown_box INPUT
text
MODULE create_dropdown_box INPUT.
SELECT matnr FROM mara
INTO CORRESPONDING FIELDS OF TABLE it1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MATNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT1
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " create_dropdown_box INPUT
IN PAI & PBO SECTION...
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
loop at it with control t1.
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
loop at it.
endloop.
MODULE USER_COMMAND_1000.
PROCESS ON VALUE-REQUEST.
FIELD mara-matnr MODULE create_dropdown_box.
FOR LAYOUT SECTION .......................
CREATE A TABLE CONTROL SELECT A FIELD OF TABLE CONTROL ON WHICH YOU WANT TO CREATE A LIST BOX
DOUBLE click on that open a tool box click the drop down list box select the list box .
save check activate
regards
Aniruddh Singh -
How to attach value range table to dropdown list box
Hi there,
could u please explain me how to attach a value range table to dropdown list box (i.e I/O box with dropdown attribute as list with key).
if possible please explain me with a sample code.
Thanks in advance.
-Tulasi.hi ...if the associated domain of the field that u are using as i.o field has value range the same will come as drop down list...u u select the list box option and click from dictionary check box on the attributes...
To check if the domain has it or not...go to the domain..click on value range..u can see thr,...if values are not thr u can giv the same...
Or if u are not refering to dictionary type then use fm VRM_SET_VALUes
reward if the abv is helpful.. -
How to capture the selected values from module pool dialog list box !
Hi experts,
Can anyone help me out in capturing the values from the list box.
i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
Your inputs are appreciated.
Thanks,
Vijay.Along with the PBO and PAI event, add a POV event in the flow logic of the screen
DEMO_DROPDOWN_LIST_BOX -is a good demo example.
PROCESS ON VALUE-REQUEST.
FIELD structure_name-field_name MODULE create_dropdown_box.
In the report :
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
sdyb_conn-carrid will contain your selected field
Maybe you are looking for
-
The bottom list of apps on my ipod touch screen is way higher than its suppose to be
hi i have an ipod touch 2nd generation i dont update it to often cause i have very very slow iternet and it can take up to 4 hours and i dont have the time to update it but the bottom list of apps i dont know what its called but i think its the app b
-
One day back I have brought HP 15-r249 tu laptop but I couldn't get any drivers for this..I searched the support in which the driver download but it shows that drivers are not available..pls help me..
-
Material Ageing in subcontracting
Dear Friends, Do u have any idea on material ageing..? There is a requirement that material ageing of subcontracting components send for vendor show be displayed in a report (is there any std report) I have seen reports (MBLM,MC46) but I am not abl
-
Spotlight has a dim bulb - help!
I have two problems with spotlight. When I click on the blue icon in the menu bar, I get a spinning rainbow wheel for a minute or so, and nothing else happens. When I press Cmd-F to bring up the Spotlight window and do a search, Spotlight can only fi
-
Not working adobe extension manager
Set Photoshop CC, tried to install the extensions, but the extension manager does not see Photoshop is only "other". / Reinstall Photoshop. / Reinstall extension manager. No result. Photoshop CC Extension Manager CC