Update db with list box
I am using JDeveloper 10.1.2 with jsp/struts/adf.
I am using the table (repair) used contains a column(rOrder) that is used for ordering the records sequentially.
Created a jsp page containing a data bound list box displaying 10 items from the repair table and sorted by the rOrder column.
Need to reorder the items in the list box and then update the db with the new order.
Is there an example or how to that would provide assistance or a better method to accomplish the task.
Thanks
jeb
hi.
just check like this.
select f1 f2 from ztable into corresponding field of itab
where condition.
loop at itab into wa_itab where f1 ne 0. " suppose f1 is field which u want to modify
wa_itab-f1 = 0.
modify itab from wa_itab index sy-tabix.
endloop.
Edited by: tahir naqqash on Feb 11, 2009 6:53 PM
Edited by: tahir naqqash on Feb 11, 2009 6:53 PM
Similar Messages
-
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 -
Newby would appreciate help with List Box
HI all,
In the process of designing a simple form that has a list box containing multiple salary designations.
For each of those designations eg Accountant, Accounts Payable supervisor, I have specified an item value in the Binding tab which happens to be the salary of the position
What I would like to happen is that when a selection is made in the list box i.e. operator selects say Accountant, the item value (in this case the salary) populates another field which is used later for costing calculations.
Help unfortunately is not all that helpfull so would appreciate any assistance you might be able to provide and thanks in anticipationFor example to populate a NumericField1 on the form when the selection was made in ListBox1, you need to use some thing like this.
Place the code in the Exit event of the ListBox. Language is JavaScript.
NumericField1.rawValue = ListBox1.rawValue;
rawValue will give the value that was assigned in the Binding tab.
Hope this helps.
Thanks
Srini -
I want to toggle Movie Symbols with List boxes
For some reason I cant seem to use remove.clip to turn off a
movie symbol. I dont think I am setting this up correctly, it is an
easy task I am trying to acomplish. basically I have 3 movie
symbols of hair and 3 radio buttons I want to attatch them to. I am
reading the radio buttons correctly. I created an animating ball
and put the stop / play command to them to make sure this was so.
but all of the hair (long hair on top) are displayed at once.
here is my code....
I take it remove clip does not work the way I am expecting it
to? any advise for a very simple end result? I dont want to use
Gotoframe because I want to animate the background with other stuff
later, And I dont want the page flip look.
here is the file ...
http://www.erickinkead.com/flash/Fasion2.swfoh also I dont know if i needed to reference the component
name or the linkage name for the movie symbol so as you can see I
tried a variety of both. -
How can I export multiple selections in a list box into a .csv file?
Hi all, I've created a form in Acrobat X with a list box enabled for multiple selections. When I try to export the filled out form into a .csv file, only the first selection shows up. Can anyone help me figure out how to get all selections to export? Thanks!
Thank you for your quick response!
Once a recipient fills out the form (which has two questions with list boxes and multiple selection enabled) they send the completed form back to me. When I open the completed form, I am given the option add the completed form to a reponse file which was set up when I distributed the form. When I open the reponse file, it lists all of the responses in rows, and the values that were chosen in the form are arranged in columns. In this file, the list boxe columns have multiple values, separated by commas (which is what I'm looking for). At this point there is an option to export into a .csv file or an .xml file. If I choose the .csv file and open in excel, only the first selection shows in the list box column rather than all selections that were initially made by the responder. -
Is this a Bug? List Box do not scrollbar: Magic number 2461
In my case I am populating list box from database using script. I noticed strange behavior with List Box being populated more than 2461 list items. At run time List box do not display scrollbar if the list items are more than 2461. Looks like 2461 is the Magic number. I wonder if some one already noticed this behavior. I want to see the scrollbar irrespective of number of list items. In my case I need to load approximately 5000 list items. Any one has suggestions? Is it designed to behave like this or is this a Bug?
Thanks in Advance.
SekharN.Hi,
I noticed it too !
I have several lists, some oh theme have more than 2460 items and don't have the scroll bar.
An other problem relative to scrollBar in listBox appeared : with Reader 8, i can't use the scroll bar (even if i have less than 2460 items); it appears but i can't scroll.
I see tthe french adobe team about these 2 problems next week. If we find something new, i'll tell you.
Pierre. -
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 ... -
Hello,
Im using a WAD report with list box. When I filter the report the values are not changed in the list box. Is there a way that the user will see only the values which shown in the report?
Please Advice,
AmirAmir,
Change the List Box property to "Posted Values"
Arun
Assign points if useful -
hi,
I had made a report in which i have to display the list box option in which there will be 3 options . i had searched about it but i am not able to have examples of it which fulfill my requierment.
Can anybody provide me examples of it as i had never used list box.Hi,
Here is the steps to create list box....
You can create according to ur need.. i hope this will help u..-
LIST BOX
Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
In screen painter to create a input/output field into list box we use
'L" as a value for dropdown attribute for the i/o field.
In screen painter to determine the type of method that will be used to fill the value
list we use the attribute value list.
If it is blank the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
or
The value can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
If a function code is attached to the list box the selection of a value triggers a PAI
otherwise PAI will not trigger.
LIST BOX in SELECTION SCREEN
List Box is created in selection screen using PARAMETERS staement
with AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox)
can be specified with the declaration.
PARAMETERS name(n) AS LISTBOX VISIBLE LENGTH n.
Here n is an integer and name is the name of parameter.
To populate the value list we use the FM VRM_SET_VALUES and the
selection screen event AT SELECTION-SCREEN OUTPUT is used to write the code to fill it.
VRM_SET_VALUES
The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So
we should declare TYPE-POOLS VRM before using this FM.
Some important types declared in the VRM type group are
VRM_ID
It refers to the name of the input/output field associated with list box
VRM_VALUES
It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
that will be used to create the list values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = name of screen element ,it is of TYPE VRM_ID
VALUES = internal table containing values,of TYPE VRM_VALUES
LIST BOX with value list from input help
In this example the screen element attribute value list is set to blank as such the value list will be filled with the 1st column of the input help,We use PROCESS ON VALUE-REQUEST event to pass the value list to the listbox.In the MODULE call used to fill the value list we can use FM like F4IF_INT_TABLE_VALUE_REQUEST to create input help as explained in the input help.The value of first column will be shown in the field when selected.
PROCESS ON VALUE-REQUEST
FIELD list MODULE fill_list_100
FIELD list MODULE fill_list_100 INPUT
SELECT f1 f2 FROM table INTO int
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'input/output screen field'
value_org = 'S'
TABLES
value_tab = itab "it contains 2 fields that will be shown in the list box
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
VALUE LIST CREATED IN PBO
In this method we set the value list attribute to 'A'.The value list will be filled in the PBO by using FM VRM_SET_VALUES .
TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
values TYPE VRM_VALUES,
value LIKE LINE OF values.
PROCESS BEFORE OUTPUT
MODULE list_fill_100
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3 FROM tab WHERE condition.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'i/o screen field'
values = values.
ENDMODULE.
LIST BOX with Selection Screen
For this the FM VRM_SET_VALUES is used to fill the value table and is passed to the parameter created with TYPE LISTBOX in the selection screen event
AT SELECTION-SCREEN.
PROGRAM zlist
TYPE-POOLS : VRM.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
PARAMETERS: p_name(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
param = 'P_NAME'.
value-key = '1'.
value-text = 'JOHN'.
APPEND value TO values.
value-key = '2'.
value-text = 'PETER'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = param
values = values.
Thanks & Regards
Ashu Singh. -
PopUp with selectMany List Box in JSF
Hi,
am a newbie to JSF....
I have a page with a hyperlink which opens a popup that has two multi select list boxes (values need to be moved to and fro within select boxes). Then i have a select button in the popup which should send the selected value from popup to main page. Can anyone please send me a clear implementation for this I don't know how to implement this with JSF. I do want to know how should i have the in my main page to populate the selected values from popup. This will be of great help if u could provide me in detail for implementing the scenario.
Note: My popUp page Implementation is like the one below and i don't have main page implementation other than the link calling javascript to open the popup....
<body><table>< tr></tr><tr>< td>
<h:selectManyListbox id="masterList" size="6">
<f:selectItems id="master" value="#{populateList.masterList}" />
</
h:selectManyListbox></td>< td><table><tr>
<
h:commandButton id="MoveRight" value="MoveRight" ></h:commandButton >
</
tr><tr>
<
h:commandButton id="MoveLeft" value="MoveLeft" ></h:commandButton >
</
tr></table></ td><td>
<
h:selectManyListbox id="selectList" value="#{populateList.selectList}" size="6" > <f:selectItems id="select" />
</
h:selectManyListbox>
</
td></tr>< tr></tr><tr></ tr><tr>
<h:commandButton id="selectButton" value="Select"></h:commandButton >
</tr></table></body >any updates or help for this....
i have a link in my main page that pops up a window with two select many list boxes where values can be moved to and fro. popup has a select button that has to send the list values in right hand side select many list box to the main page field....
How should i achieve this in jsf....
Any help with codelines will be greatful and guiding....
Thanks
Naadiya -
Update multiple records from list box
The idea is to present a list box to allow for the selection
of multiple records. The records' primary key field having been set
up as the value parameter in the list box. Then use a single update
statement to update all selected records with a common value.
I have tried to do this using code similar to:
UPDATE MyTable SET MyTable.MyColumn = 1 WHERE (
MyTable.MyKeyField IN ( @ListOfIntegers ) )
Where the parameter is configured thus:
<Parameter Name="@ListOfIntegers" Value='<%#
((Request.Form["MyListBox"]' Type="Int" />
The idea is that the multiple selection listbox will return a
comma separated list, which should l work nicely with the WHERE
[column] IN ( .. ) syntax.
Unfortunatley if more than one record is selected the
Complier throws a type conversion error.
I want to do this using Dreamweaver and C# on .NET.
Any ideas how to proceed ?Are you wanting to update multiple records with the same
information or
different information for each record?
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"lyleja" <[email protected]> wrote in
message
news:f1cpe5$jj1$[email protected]..
> The idea is to present a list box to allow for the
selection of multiple
> records. The records' primary key field having been set
up as the value
> parameter in the list box. Then use a single update
statement to update
> all
> selected records with a common value.
>
> I have tried to do this using code similar to:
>
> UPDATE MyTable SET MyTable.MyColumn = 1 WHERE (
MyTable.MyKeyField IN (
> @ListOfIntegers ) )
>
> Where the parameter is configured thus:
> <Parameter Name="@ListOfIntegers" Value='<%#
((Request.Form["MyListBox"]'
> Type="Int" />
>
>
> The idea is that the multiple selection listbox will
return a comma
> separated
> list, which should l work nicely with the WHERE [column]
IN ( .. ) syntax.
>
> Unfortunatley if more than one record is selected the
Complier throws a
> type
> conversion error.
>
> I want to do this using Dreamweaver and C# on .NET.
>
>
> Any ideas how to proceed ?
>
>
> -
Tablular Form List box change to trigger update in second column
I have an updatable tabular form with one modifiable column via.a list box. I'm seeking a way if the column value in the listbox has been changed, the value in another column is updated too with the user's login name as part of the submit.
Any direction and/or example would be appreciated. Thanks, -JeffHi Jeff,
You can handle this in at least two ones - javascript or SQL triggers. I would recommend a trigger on the "Before Update" of the table. Something like:
CREATE OR REPLACE TRIGGER "TABLENAME_BU"
BEFORE
UPDATE ON "TABLENAME"
FOR EACH ROW
BEGIN
IF :NEW.LISTBOXFIELD != :OLD.LISTBOXFIELD THEN
:NEW.UPDATEDBY := :NEW.USERID := nvl(v('APP_USER'),user);
END IF;
END;
Regards
Andy -
why is it when i update my status on facebook from iphone it splits the updates into two differents boxes with some funky symbols at the beginning.. I have uninstall facebook and installed it over and it still does it. only the facebook IPHONE app where it says to update staus text to FBOOK i have already update my phone too.
if i go on the facebook site and update there through a brower on iphone it will work fine just cant us IPHONE mobile upload, . But its a pain of not using my IPHONE APP for facebook cause it does that.The warranty entitles you to complimentary phone support for the first 90 days of ownership.
-
How I can stop the combo box with list of values from fireing validations
Hi I'm using Jdeveloper 11.1.2.3.0
Using Hr Schema employees table
I Display employees data in af:table
and I make List Of values on Department_id filed to easy change the employee department
and another one on Job_id filed
and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
the problem is when I Select a value from department or jobs ( combo box with list of values )
fires the entire filed validations for mandatory atributes
Note : the af:table Property ( contedelivery) is set to (immediate )
How I can stop the combo box with list of values from fireing validationscheck it out.,
http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html -
Currently I have a webpage I designed for a company where I have multiple text list boxes side by side for the purpose of displaying data in each one based on a category in the database. So a text list box for the primary key, name, serial number, etc. I have to use Firefox as it typically works best for printing and functionality for the page. The single issue we are having is that in Firefox if the field is null as far as text the text are shrinks meaning all the data in that list box shifts up and is no longer in line with its congruent data in the other text list boxes. In other browsers that's not a problem and everything stays lined up regardless of whether there's text in the box or not.
Unfortunately I cannot provide a link but if contacted I will provide screen shots.Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
http://forums.mozillazine.org/viewforum.php?f=25 <br />
You'll need to register and login to be able to post in that forum.
Maybe you are looking for
-
I want to pair my iPhone 3GS (OS 3.1) with my iMac via Bluetooth
I am a bit disappointed that Bluetooth doesn't seem to be very mature in the iPhone. But maybe I'm just clueless as to how to get it working, and, once it's working, it will be good. My problem is that I can't even discover my iPhone (I have scanned
-
CDATA - XSLT mappping - Encoding problem
Hi folks, I have a ABAP proxy to webservice scenario... I am sending out data from ECC to a external web service... The requirement here is the external web service input message has only two input fields and in the first field it accepts the transa
-
Use BDB XML API on MS Visual C++ compiler problem
Excuse me I install BDB XML 2.3.8, and I use MS Visual C++ 6 compiler. In VC6, I add fellow path setting ~ include files: C:\Program Files\Oracle\Berkeley DB XML 2.3.8\include C:\Program Files\Oracle\Berkeley DB XML
-
Assign field from Extended Structure
Hi, friends I'm tryin to Assign the field GPARN (Partner Number) from PO Screen, but is occuring a Short Dump. I saw that WRF02K is a extended structure. How can I assign a filed value from a Extended structure ? I'm using the code bellow. DA
-
Is this a formatter or a Jetdirect card problem?