Get value of Table data in Event of Table maintaince generaor
Hi Expert,
I want content of table in event of table maintenance generator (Event 01 - Before Saving Data in Database).
can you please tell me that how can i achieve this value of whole table in this event.
Regards,
Chintan Shah
Hi ,
Try this..
In event 01
MESSAGE 'Dulicate Record Exist' TYPE 'S' display like 'E'.
*--->It will stop save functionality
vim_abort_saving = 'X' .
Similar Messages
-
Hi Guys,
FYI, im having a table control with field Plant and Material. I have defaulted the <b>std search help</b> to field <u>Material</u> at the screen painter. Meaning system will call up the search help for Material once i press F4.
Since the search help for field Material is a collective search help, and there is a <u>Plant</u> field available for Material filtering. Thus i may need to get the Plant's value from of same row of the table control to Populate into the Material's search help.
I have already tried to create a new module under the LOOP...ENDLOOP at PAI's flow logic. And try to use parameter id to set the value for plant, purpose is to populate it to Material's search help when i click F4 on material field. The problem is the new module that i coded under LOOP...ENDLOOP will never trigger when i click F4. Because there is NO event to trigger my module.
Other than the above, i tried to code it under POV. But it doesn't work as well, because there is more than 1 record under table control and i can not determine the during runtime which row of F4 for material being click.
Please comment on this above on how to solve the problem.
Thanks in advance.Hi,
You can call standard collective search help [say for Eg:<b>MAT1</b>] through Process on value-request event and set the paramenter id of Plant field before calling the funtion module <b>'HELP_START'</b>.Then we can get the materials specific to the PLANT in the corresponding row of the TABLE CONTROL.
To get which row of the table control is clicked use <b>Get Cursor Line</b> Statement as i mentioned below.
Flow logic:
PROCESS ON VALUE-REQUEST.
FIELD x_marc-matnr MODULE mat_shelp.
Module definition:
MODULE mat_shelp INPUT.
DATA:v_help_info LIKE help_info,n TYPE i,
it_dyselect LIKE TABLE OF dselc WITH HEADER LINE,
it_dyvaltab LIKE TABLE OF dval WITH HEADER LINE.
REFRESH it_dyselect.
it_dyselect-fldname = 'MANDT'.
it_dyselect-dyfldname = 'SY-MANDT'.
APPEND it_dyselect.
it_dyselect-fldname = 'MATNR'.
it_dyselect-dyfldname = 'X_MARC-MATNR'.
APPEND it_dyselect.
v_help_info-call = 'M'.
v_help_info-object = 'F'.
v_help_info-program = sy-repid. "'ZVIG_MOD_TABLE_CONTROL_1'.
v_help_info-dynpro = sy-dynnr. "'9001'.
v_help_info-tabname = 'MARC'.
v_help_info-fieldname = 'MATNR'.
v_help_info-fieldtype = 'CHAR'.
v_help_info-keyword = 'MATNR'.
v_help_info-fieldlng = 18.
v_help_info-fldvalue = ''.
v_help_info-mcobj = 'MAT1'.
v_help_info-spras = 'E'.
v_help_info-menufunct = 'HC'.
v_help_info-title = 'SAP'.
v_help_info-dynprofld = 'X_MARC-MATNR'. <b>----
> Give ur screen field name</b>
v_help_info-tcode = sy-tcode. "'ZTC1'.
v_help_info-pfkey = 'MEN'.
v_help_info-docuid = 'FE'.
v_help_info-pov = 'N'.
v_help_info-curow = '2'.
v_help_info-cucol = '1'.
v_help_info-dynpprog = sy-repid. " ZVIG_MOD_TABLE_CONTROL_1
v_help_info-stepl = '1'.
v_help_info-selectart = 'A'.
GET CURSOR LINE n.
READ TABLE it_marc INTO x_marc INDEX n.
SET PARAMETER ID 'WRK' FIELD X_MARC-WERKS .
CALL FUNCTION 'HELP_START'
EXPORTING
help_infos = v_help_info
TABLES
dynpselect = it_dyselect
dynpvaluetab = it_dyvaltab .
ENDMODULE. " mat_shelp INPUT -
Get value from table attribute.
Hello,
I'm trying to get the value of an attribute from a table in my page. Shouldn't the expression be as such: "#{bindings.TestfilesView11.collectionModel.Filename.inputValue}"?
This didn't work. I thought maybe it's because the row is selected, so the expression should point to that row. So i tried "rowIterator", "currentRow" instead, and still nothing worked.
Thanks,
Mohamed>
Can i do this for the button while viewing a table and not a form?
Without the use of a bean (with expression builder)...
>
Yes, you can do it,
If the button is inside the table, you can use this EL
#{row.bindings.AttributeName.inputValue eq null}If the button is outside the table, then go to the page definition, click the add binding and select attributeValues and then select the data source and the desired attribute. then you can use this attribute in EL like #{bindings.AttributeName.inputValue eq null}. -
Hi,
I am new to OAF, I am trying to get the value from the table in order to make validation. I have the following PG:
SearchResultsTableRN
itemRow
DetailsCell
DetailsTableLayout
ShortDescRow
ShortDescCell
ShortDesc
LongDescRow
LongDescCell
LongDesc
AttributesRow
AttributesCell
AttributesTableLayout
Attributes1Row
Attribute11Cell
ect...
Can anyone help me please in how to go into the table --> row --> column to retrieve the value from a specific column?
If their is a document or example that can help I will appreciate it. Since I tried searching in devguide and didn't find any results.
Note: I am extending the controller and reached till the following code:
public void processFormRequest(OAPageContext oapageContext, OAWebBean webBean){
super.processFormRequest(oapageContext, webBean);
String event = oapageContext.getParameter("ShortDescRow");
OATableBean advtable = (OATableBean)webBean.findChildRecursive("SearchResultsTableRN");
OARowBean rowtbl = (OARowBean)advtable.findChildRecursive("DetailsCell");
String message = "test:"+event+"|"+advtable+"|"+"|"+"|"+"|";
throw new OAException(message, OAException.INFORMATION);
Thanks and Regards
PatrickPatrick,
My first advice would be go through OAF guide and do tutorial examples, for such basic details.
If ur talking about tablelayout region
u can use pageContext.getParameter(<Item id of UIX bean whose value u want>);
If you are talking about table
You can Iterate through the VO based on primary key ...on which the table is based, and retrive the corresponding Vo attribute value.
--Mukul -
Getting values From Table in method execute??
Hi,
I'm using JDEV 10.1.2 and UIX, i have a table with a singleSelection component.
I'm trying to send the values of the selected row to an action, in the primaryClientAction property of the submitButton i'm adding an action parameter with the key value = CveConcept and the Value &{bindings.SrvCConceptosView1.CveConcepto}, in the execute method i'm getting the parameters using request.getParameter("CveConcepto"). The problem is that it seems that the value is saved in cache or something like that because when i select a diferent row, the value of the last row is sended, only by clicking two times the submitButton the correct selected parameter is sended.
Am i doing this the correct way?
Is there a different way to send table values to the execute method from a submitButton?
I hope some one can help.
Thank you.Wouldn't a more direct approach like so help out ? :-
Once you have the table with the single selection component enabled. Within the execute method of your managed bean ( or any other method you refer to in the action tag ) , get hold of the view Object and simply doing a getCurrentRow , would get hold of the row with all the required attribute details.....
Or am i understanding your requirement differently ?
Cheers
K -
How to get values in table using viewobject ?
hi,iam using jdev 11.1.2.3.0
my requirement as follows ..
i have login form with username and password and i was gave the option of forgot password.when ever the user clicks the forgot password link .i need to get the data from smtp configuration table(consists smtp port,smtp host,usermail,password) based on the usermail i need to get the data from the smtp table .
when ever the user clicks forgot password it wil send the password to the respected email id given in the smtp tablem how tom achieve this requirement using view object ..............Hi,
1. create VO and define Ciew Criteria to query rows based on a bind variable
2. Go to Application Module and select VO, then press Edit button to associate View Criteria
3. Build public method in Application Module Impl class to take user name as an input argument
4. Expose this method on the AM client interface (also shown on the Java category of the AM editor)
5. In the method, use this this.findViewObject("instance name"); to get a hold onto the VO
6. Add the user name to the bind variable using the viewObject.getVariableManager()
7. Execute VO
8. get first row
9. send mail
10. Drag and drop method from the Data Control panel to your login page
11. Use EL to reference the username provided by the user (managed bean reference?)
This should be it
Frank -
Get value from Table/Recordset Cell into a JSP variable
Can anyone please help with this ?...
I need to get a cell value from a selected row of a table into a variable to pass to a java bean.
1 - The dynamic table is populated by a recordset named "rs" and has a submit button for each row .
2 - The user clicks on the corresponding button to select the row.
3 - The recordset retrieved the ID for that row in the query, but does not display it in the table.
I have tried :
<% String ID = rs.getString("bookid");%>
<% Library.bookConfirm(ID);%>
But this fails saying that it "cannot resolve variable rs..."
Yet the recordset populates correctly and its name is "rs"
Is there another way to do this perhaps ?... ie: put the id in a column of the table and get the cell value ?...
What would be the syntax to get the ID cell value of that selected row on the button click ?...
Your feed back would be greatly appreciated.
Thank you.Create a new rs
ResultSet rs1 = statement.executeQuery(query);
and use getstring to access the individual cell. -
How to get values of complex data type specified in webservice wsdl file
I'm trying to retreive cid from a complex data type[b] course which I'm getting as response from the webservice, it throwing that cid is not valid .
<course>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<syncbpelResponse xmlns="http://acm.org/samples">
<course>
<startDate xmlns="urn:cms_soa">2005-12-11T18:30:00.000Z</startDate>
<materialid xmlns="urn:cms_soa">234</materialid>
<cdescription xmlns="urn:cms_soa">learn spoken english</cdescription>
<instructorid xmlns="urn:cms_soa">145</instructorid>
<regEndDate xmlns="urn:cms_soa">2005-11-30T18:30:00.000Z</regEndDate>
<cid xmlns="urn:cms_soa">12222</cid>
<cfee xmlns="urn:cms_soa">1000.0</cfee>
<strength xmlns="urn:cms_soa">20</strength>
<currentStrength xmlns="urn:cms_soa">2</currentStrength>
<endDate xmlns="urn:cms_soa">2005-12-30T18:30:00.000Z</endDate>
<cvenue xmlns="urn:cms_soa">ELNET</cvenue>
<cname xmlns="urn:cms_soa">english</cname>
</course>
</syncbpelResponse>
</part>
</course>
I tried using
<from variable="course" part="payload" query="/tns:syncbpelRespons/tns:course/@cid"/>
but not at all accepting....
I 'll be thankfull if u send me a responseHi
This can not be done Vc only "sees" the returned data in the webservice, it can not access the meta data from the webservice.
Jarrod -
Get values of table in tableview
Hello,
I have a tableview - which has a table and out of all the columns only 2 are user input - one is an amount field and other is a currency key. I dont have multiselct option in the tableview. I want to read the table in DO_HANDLE_EVENT which has amount >0 for a row.
Can I do this without multiselect option - i dont want the users to select row and then enter money..I just should be able to process only rows with no 0s.
Please advice..
Thanks
ThilothamaHi,
you should implement DO_HANDLE_DATA,
CALL METHOD super->do_handle_data
EXPORTING
form_fields = form_fields
global_messages = global_messages.
LOOP AT form_fields INTO l_fields WHERE name CA 'table_id'.
SPLIT l_fields-name AT '_' INTO w_table w_row_index w_column_index.
CASE w_column_index.
WHEN '2'.
if formfields-value > 0.
endif.
WHEN '3'.
if formfields-value > 0.
endif.
ENDCASE.
ENDLOOP.
given column 2 and 3 are the ones you want to check
grtz
Koen -
Get value from table record and set Disabled property...
Hi! I have table in my JSPX page. I search for records and then press on one of the records with right click, see: http://my.jetscreenshot.com/2677/20120203-fas1-30kb
I set disabled property like this of my commandMenuItem:
#{row.GenResGrupa != 'true'}But as You can see from my picture above, the disabled property do not work. Where I am wrong with my code:
<af:commandMenuItem text="#{sampleBundle.pases}"
id="commandMenuItem1"
action="adfMenu_pasesDati"
actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
disabled="#{row.GenResGrupa != 'true'}"/> Please correct me! If You need some other information, please let me know.
Best regards, Debuger!Dear fedor! Popup is in facet contextMenu. contentDelivery="lazyUncached" for my popup:
<af:popup id="p1" contentDelivery="lazyUncached">
<af:menu text="menu 1" id="menu1">
<af:commandMenuItem text="#{sampleBundle.pases}"
id="commandMenuItem1"
action="adfMenu_pasesDati"
actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"/>
</af:menu>
</af:popup>In my pageDef I have this code:
<bindings>
<tree IterBinding="LVAIMeklesanaIterator" id="LVAIMeklesana">
<nodeDefinition DefName="kokaugi.model.view.LVAIMeklesana"
Name="LVAIMeklesana0">
<AttrNames>
<Item Value="Accename"/>
<Item Value="LvaiKolekcijaPk"/>
<Item Value="Accenumb"/>
<Item Value="AvsGrupa"/>
<Item Value="Cropname"/>
<Item Value="EkspGrupa"/>
<Item Value="GenResGrupa"/>
<Item Value="Genus"/>
<Item Value="Species"/>
<Item Value="Sinonims"/>
</AttrNames>
</nodeDefinition>
</tree>
<action IterBinding="LVAIKolekcijaDatiIterator"
id="setCurrentRowWithKeyValue"
InstanceName="KokaugiModuleDataControl.LVAIKolekcijaDati"
DataControl="KokaugiModuleDataControl" RequiresUpdateModel="false"
Action="setCurrentRowWithKeyValue">
<NamedData NDName="rowKey" NDValue="#{row.LvaiKolekcijaPk}"
NDType="java.lang.String"/>
</action>
</bindings>And disabled property is like this:
disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"But it is still do not working. I am wrong somewhere? Maybe the only way to correct my problem is like Hohn said?
Best regards, Debuger! -
How to get value in function insert table test ?
Hi
I use function insert table test in order to get value in table for use in code page but i don't know how to get value in table.If somebody have any idea.Please give me some advice.
Thank you,
WarujaYou will need to grab the contents with VBA
Table test is user interface only.
This thread may help
http://qazone.empirix.com/thread.jspa?threadID=748&tstart=0 -
How to use value from one data set in other data set SQL select.
Hello all, i have one data set, and i need to get value from that data set into other data set. Something like '?' but without input. I will try to explain it with screenshots:
If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'
-
How to get value in a web page automatically and sava output in database
how to get value this table output is
row 1, cell 1
row 1, cell 2
row 2, cell 1
row 2, cell 2
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>Note: This thread was originally posted in the [Java Technologies for Web Services|http://forums.sun.com/forum.jspa?forumID=331] forum, but moved to this forum for closer topic alignment.
-
Getting selected values from a data table
My data table gets values directly from a result set.
I went through http://balusc.blogspot.com/2006/06/using-datatables.html#top ,
however, the data table shown in this example takes values from a simple list. I have trouble in getting selected values.
Can anyone suggest how to select multiple values. here is a small code sample of what I have
SessionBean
ResultSet rs= db.retrieve_draft();
datamodel = new ResultSetDataModel();
datamodel.setWrappedData(rs);This is the JSF
<h:dataTable binding="#{Engineer.dataTable1}" headerClass="list-header" id="dataTable1"
rowClasses="list-row-even,list-row-odd" style="left: 144px; top: 192px; position: absolute"
value="#{SessionBean1.datamodel}" var="currentRow">
<h:column id="column1">
<h:outputText id="outputText77" value="#{currentRow['report_number']}"/>
<f:facet name="header">
<h:outputText id="outputText78" value="Report Number"/>
</f:facet>
</h:column>Edited by: ktip on Jul 29, 2008 11:04 AMHere is what I was doing :
This is my Session Bean (viz. SessionBean1)
private CachedRowSetDataProvider draft_infoDataProvider;
private CachedRowSetXImpl draft_RowSet;
public CachedRowSetDataProvider getDraft_info() {
return draft_infoDataProvider;
public void setDraft_info(CachedRowSetDataProvider draft_info) {
this.draft_info = draft_infoDataProvider;
public CachedRowSetXImpl getDraft_RowSet() {
return draft_RowSet;
public void setDraft_row(CachedRowSetXImpl draft_row) {
this.draft_row = draft_RowSet;
public void get_drafts()
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3308/test";
String dbUser = "root";
String dbPassword = "adminadmin";
con = DriverManager.getConnection(url, dbUser, dbPassword);
String sql="SELECT report_id from reports WHERE status='Draft' ";
ResultSet rs=null;
try
Statement stmt1=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=stmt1.executeQuery(sql);
draft_RowSet=new CachedRowSetXImpl();
draft_RowSet.populate(rs);
draft_infoDataProvider=new CachedRowSetDataProvider(draft_RowSet);
result="ok";
catch(SQLException e)
System.out.println(e);
result="fail";
Here is my jsp page (developed in Netbeans 6.1) showing the data table
<webuijsf:table augmentTitle="false" binding="#{Engineer.table1}" clearSortButton="true" deselectMultipleButton="true"
id="table1" selectMultipleButton="true" sortPanelToggleButton="true"
style="left: 48px; top: 144px; position: absolute; width: 450px" title="Table" width="0">
<webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{SessionBean1.draft_infoDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="report_number" id="tableColumn1" sort="test_report.report_number">
<webuijsf:staticText id="staticText1" text="#{currentRow.value['reports.report_id]}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>Doing all this just resulted in a javax.Naming.Exception : Data Source is null
I tested this piece of code to give me the number of rows in the underlying rowset and it worked well. But somehow I could not get to display the data. Am I missing something?
Edited by: ktip on Jul 31, 2008 1:21 PM -
Values not getting updated in table mvke
Hi,
I am working on a module pool program.In the o/p screen there are many records.If the user wants to change the field values of a particular record,he clicks on the checkbox besides that record and when he click on the change button,control goes to update screen.In this screen when the user changes the value of one particular field and click on the checkbox beside and then click on the execute button,the changed value of that field should get updated in that particular record in the database table.Here I want to update mvke and marc tables.
I have used FM BAPI_MATERIAL_SAVEDATA to update the database tables.
Only marc table is getting updated with changed values.mvke table is not getting updated.What would be the reason for this.
I am sending a part of my code.Please check it.
form move_mat_data .
*Header
gt_bapi_head-material = gs_output1-matnr.
gt_bapi_head-ind_sector = gs_output1-mbrsh.
gt_bapi_head-matl_type = gs_output1-mtart.
gt_bapi_head-basic_view = 'X'.
gt_bapi_head-purchase_view = 'X'.
gt_bapi_head-account_view = 'X'.
gt_bapi_head-sales_view = 'X'.
*Client
gt_bapi_client-matl_group = gs_output1-matkl.
gt_bapi_client-base_uom = gs_output1-meins.
gt_bapi_clientx-matl_group = 'X'.
gt_bapi_clientx-base_uom = 'X'.
*Plant
gt_bapi_marc1-plant = gs_output1-werks.
gt_bapi_marc1-pur_status = gs_output1-mmsta.
gt_bapi_marc1-mrp_type = gs_output1-dismm.
gt_bapi_marc1-mrp_ctrler = gs_output1-dispo.
gt_bapi_marc1-serv_level = gs_output1-zserclass.
gt_bapi_marc1-availcheck = gs_output1-mtvfp.
gt_bapi_marcx-plant = gs_output1-werks .
gt_bapi_marcx-pur_status = 'X'.
gt_bapi_marcx-mrp_type = 'X'.
gt_bapi_marcx-mrp_ctrler = 'X'.
gt_bapi_marcx-serv_level = 'X'.
gt_bapi_marcx-availcheck = 'X'.
Material Description
REFRESH gt_materialdesc.
gt_materialdesc-langu = gs_output1-spras.
gt_materialdesc-matl_desc = gs_output1-maktx.
append gt_materialdesc.
*Sales
gt_bapi_mvke1-sales_org = gs_output1-vkorg.
gt_bapi_mvke1-distr_chan = gs_output1-vtweg.
gt_bapi_mvke1-sal_status = gs_output1-vmsta.
gt_bapi_mvke1-valid_from = gs_output1-vmstd.
gt_bapi_mvkex-sales_org = 'X'.
gt_bapi_mvkex-distr_chan = 'X'.
gt_bapi_mvkex-sal_status = 'X'.
gt_bapi_mvkex-valid_from = 'X'.
endform. " move_mat_dataHello Hema,
Find the fields which you need to populate with values:
As an example i'm trying to update DISPO from MARC and VKORG from MVKE.
No need to fill clientdata and clienddatax.
* Header data
MOVE g_wa_mat_out-s_matnr TO g_r_headdata-material.
MOVE 'X' TO g_r_headdata-mrp_view.
* Plant data
MOVE g_wa_mat_out-t_werks TO: g_r_plantdata-plant,
g_r_plantdatax-plant.
MOVE g_wa_mat_out-t_dispo_new TO g_r_plantdata-mrp_ctrler.
MOVE 'X' TO g_r_plantdatax-mrp_ctrler.
MOVE g_wa_mat_out-t_vkorg_new TO g_r_salesdata-sales_org.
MOVE 'X' TO g_r_salesdatax-sales_org.
Reward If Helpful.
Regards
Sasidhar Reddy Matli.
Edited by: Sasidhar Reddy Matli on Feb 7, 2008 11:49 AM
Maybe you are looking for
-
How can i use my garanty out from the city that i bought my iPhone?
Hi, i was living in London, for arround 3 years i bought my iPhone 5 while i was living there, now i am in Peru (Lima) and my iPhone is not working propertly. The mobile is not sound when some one i calling me, also when i receive a msge from whats a
-
Recording paragraph to a text file
mmm hello everyone, this is HRaito, just started learning java and quite confused at the same time. With java i understand how to write a line or a text to a textfile, but how do i write several lines of text(or a paragraph) to the textfile? Do i hav
-
I need a little help!
-
Hello All. With the help of this board I have managed to plot both my data sets on the same graph. I have a request. Is it possible to force the right y-axis to use the gridlines of the left y-axis? Basically I have a predictable range on the left an
-
As every body knows it doesn't work with raw pics. and it is very but VERY MUCH UPSETTING AND DISAPPOINTED. But in the last topic a lot of people talk about this and one of the answer was that one of the Aperture team member got involved in the answe