How to get check value in DB based on java
hi,
anybody know how to get check value in DB based on java?
TQ
This should be a custom java class containing that method.
Try on java or jdbc forum - Java Database Connectivity (JDBC) , Java Programming
Similar Messages
-
How to get field values in ALV based on user provided input
Hi,
In my ALV grid, I have 2 fields:
1. Material ID
2. Material Description
When user provides input to Material ID field, the material Description field should get populated immediately.
Note: Curretly I am able to do it based on the sy-ucomm = 'Enter', i.e. when the user presses "Enter" outside the ALV grid, I retrieve Description from Mat Table and populate this in Mat_Desc in ALV grid.
I want to do the same operation whenever tab is pressed (not when user presses enter outside the ALV grid).
Please provide your inputs for this.
Thanks & regards,
RavishHi Ravish,
Check <b>BCALV_TEST_GRID_F4_HELP</b> program for F4 help on ALV Grid.
Thanks
Venkat.O -
How to get the values from xml file to java combo box
Hi frens,
I am new to java and xml programming,
Now, i want to have a code of getting the tag values from the xml file
into the swing combo box of java front end.
How can we do that?
any help of code or tutorial or an ebook is a great help for me.
Thank you,
Karthik.
Edited by: Karthik84 on Aug 27, 2008 1:49 AM
Edited by: Karthik84 on Aug 27, 2008 11:29 PMlook at this link
http://www.stylusstudio.com/docs/v2006/d_help30.html
I read sometime back that castor has a tool to do
conversion. You might have a look into casto as well. -
A^b = n ,How to get the value for a ?
a^b = n ===> n = Math.pow(a,b)
How to get the value for a ?
dose Java have API to get the value for a ?
Thanks for help~~~a^b = n
=>
a = n^(1/b)
So,
a = Math.pow(n,1.0/b) -
How to get parameter value from report in event of value-request?
Hi everyone,
The customer want to use particular F4 help on report, but some input value before press enter key are not used in event of "at selection-screen on value-request for xxx", How to get parameter value in this event?
many thanks!
JackYou probably want to look at function module DYNP_VALUES_READ to allow you to read the values of the other screen fields during the F4 event... below is a simple demo of this - when you press F4 the value from the p_field is read and returned in the p_desc field.
Jonathan
report zlocal_jc_sdn_f4_value_read.
parameters:
p_field(10) type c obligatory, "field with F4
p_desc(40) type c lower case.
at selection-screen output.
perform lock_p_desc_field.
at selection-screen on value-request for p_field.
perform f4_field.
*& Form f4_field
form f4_field.
*" Quick demo custom pick list...
data:
l_desc like p_desc,
l_dyname like d020s-prog,
l_dynumb like d020s-dnum,
ls_dynpfields like dynpread,
lt_dynpfields like dynpread occurs 10.
l_dynumb = sy-dynnr.
l_dyname = sy-repid.
*" Read screen value of P_FIELD
ls_dynpfields-fieldname = 'P_FIELD'.
append ls_dynpfields to lt_dynpfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = l_dyname
dynumb = l_dynumb
tables
dynpfields = lt_dynpfields
exceptions
others = 1.
check sy-subrc is initial.
*" See what user typed in P_FIELD:
read table lt_dynpfields into ls_dynpfields
with key fieldname = 'P_FIELD'.
*" normally you would then build your own search list
*" based on value of P_FIELD and call F4IF_INT_TABLE_VALUE_REQUEST
*" but this is just a demo of writing back to the screen...
*" so just put the value from p_field into P_DESC plus some text...
concatenate 'This is a description for' ls_dynpfields-fieldvalue
into l_desc separated by space.
*" Pop a variable value back into screen
clear: ls_dynpfields.
ls_dynpfields-fieldname = 'P_DESC'.
ls_dynpfields-fieldvalue = l_desc.
append ls_dynpfields to lt_dynpfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = l_dyname
dynumb = l_dynumb
tables
dynpfields = lt_dynpfields
exceptions
others = 0.
endform. "f4_field
*& Form lock_p_desc_field
form lock_p_desc_field.
*" Make P_DESC into a display field
loop at screen.
if screen-name = 'P_DESC'.
screen-input = '0'.
modify screen.
exit.
endif.
endloop.
endform. "lock_p_desc_field -
How to get attribute value from standard page ?
Hi,
How to get attribute value from standard page ?
String str = (String)vo.getCurrentRow().getAttrbute("RunId");
But this value is returning a null value ....
Can anyone help me to get this attribute value which is actually having a actual value .getCurrentRow() would always return null if no setCurrentRow() is used.
Please check the page design and understand how many rows of VO are there. You can also use the following to get the row:
vo.reset();
vo.next();
Regards
Sumit -
How to get the value from a JavaScript and send the same to Java file?
Hi.
How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
Thanks and regards,
Leslie VYes, I am trying with web application.
In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
How to send this 'message' with and to the 'request'?
Thanks for the help :-)
The actual JS code is:
function productdeselection()
var i=0;
var j=0;
var deselectedproduct = new Array(5);
var message = "Are you sure to delete Product ";
mvi=document.forms[0].MVI;
mei=document.forms[0].MEI;
lpi=document.forms[0].LPI;
if(null != mvi)
++i;
if(null != mei )
++i;
if(null != lpi)
++i;
if(null != mvi && mvi.checked)
deselectedproduct[++j]="MVI?";
if(null != mei && mei.checked)
deselectedproduct[++j]="GAP?";
if(null != lpi && lpi.checked)
deselectedproduct[++j]="LPI?";
if( 0!=j)
if(i!=j)
for (x=0; x<deselectedproduct.length; x++)
if(null != deselectedproduct[x])
message =message+ "-" +deselectedproduct[x];
alert(message);
else
//alert(" You cannot remove all products!");
return false;
return true;
} -
How to get the values from profileFormHandler
Hi,
here i have problem with how to get the values after setting the values to that , how i have to call repository, what repository i've to call?When you are setting values, check the repository(getRepository()) from which mutable repository item is created. Go to that class .properties file and check the repository mapping.
-karthik -
How to get the values of 2 dynamic comboboxes in one jsp to another jsp?
I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
Select.jsp:
<%@ page language="java" import="java.sql.*" %>
<%!
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql = null;
void addItems(javax.servlet.jsp.JspWriter out, String sql)
try{
rs = st.executeQuery(sql);
while( rs.next() )
out.println("<option>" + rs.getString(1) + "</option>");
}catch(Exception e)
System.out.println(e);
%>
<HTML>
<HEAD>
<TITLE>JSP WITH MULTIPLE FORMS</TITLE>
<script language="javascript">
function checking()
form1.submit();
</script>
</HEAD>
<body>
<center>
<b><font size="5" color="#333399">Staff ID:</font></b></center>
<FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
<p align=center>
Details of Staff :
<SELECT 1 NAME="type" onchange="checking();">
<option> Administrator </option>
<option> OfficeAssistent </option>
<option> Clerk </option>
</SELECT 1>
</p>
</FORM>
<FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
<center>
<TABLE><TR><TD>Staff ID:</TD>
<TD><SELECT 2 NAME="staff_id">
<%
String type = request.getParameter("type");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
catch (ClassNotFoundException ex) {
System.out.println(ex);
catch (SQLException ex)
System.out.println(ex);
st = con.createStatement();
sql = "select staff_id from "+type+"";
addItems(out, sql);
%>
</SELECT 2>
</TD>
</TR>
</table></center>
<h2> Details of <%= type + "s" %> </h2>
<center><input type=submit value=ok onclick="submit();"></center>
</FORM>
</BODY>
</HTML>
welcome1.jsp
<center><h1>WEL COME</h1></center>
<%
String type = request.getParameter("type");
String sid = request.getParameter("staff_id");
%>
<h2> Details of <%= type + "s" %> </h2>
<h2> Details of <%= sid %> </h2><SELECT 1 NAME="type" onchange="checking();">
<option value = "0"> Administrator </option>
<option value = "1"> OfficeAssistent </option>
<option value = "2"> Clerk </option>
</SELECT 1> -
How to get Distinct Values from Answers
Hi,
How to get Distinct values from answers, i've tried to put some functions on it.
Thanks,
MalliMalli,
Are you trying to fetch data from Dimension Attr OR Fact Measures? Did you try the advance tab - > Advanced SQL Clauses - > Check this box to issue an explicit Select Distinct. -
How to get the most current file based on date and time stamp using SSIS?
Hello,
Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
Thanks
thx regards dinesh vvhi simon
i excuted this script it is giving error..
Microsoft SQL Server Integration Services Script Task
Write scripts using Microsoft Visual C# 2008.
The ScriptMain is the entry point class of the script.
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
[System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
#region VSTA generated code
enum ScriptResults
Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
#endregion
The execution engine calls this method when the task executes.
To access the object model, use the Dts property. Connections, variables, events,
and logging features are available as members of the Dts property as shown in the following examples.
To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
To post a log entry, call Dts.Log("This is my log text", 999, null);
To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
To use the connections collection use something like the following:
ConnectionManager cm = Dts.Connections.Add("OLEDB");
cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
To open Help, press F1.
public void Main()
string file = Dts.Variables["User::FolderName"].Value.ToString();
string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
System.IO.FileInfo finf;
DateTime currentDate = new DateTime();
string lastFile = string.Empty;
foreach (string f in files)
finf = new System.IO.FileInfo(f);
if (finf.CreationTime >= currentDate)
currentDate = finf.CreationTime;
lastFile = f;
Dts.Variables["User::LastFile"].Value = lastFile;
Dts.TaskResult = (int)ScriptResults.Success;
thx regards dinesh vv -
How to get check box in alv output
hi gurus
can anyone explian me how to get check box in alv output
it should not be a pop up window
i want to get in output itself
tahnk you
regards
kals.Hi
by using rs_selfield
ty to call dynamic subroutine..
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
read table rs-selfield with key cond = 'X'
endform.
see the below example
REPORT Z_GET_REFRESH no standard page heading.
type-pools : slis.
tables : makt,
mara.
data : i_fieldcat type slis_t_fieldcat_alv.
CONSTANTS :
gc_refresh TYPE syucomm VALUE '&REFRESH'.
data : begin of i_makt occurs 0,
matnr like makt-matnr,
maktx like makt-maktx,
end of i_makt.
data : v_repid like sy-repid,
g_user_command type slis_formname value 'USER_COMMAND',
g_status_set type slis_formname value 'SET_PF_STATUS',
lt_event_exit TYPE slis_t_event_exit,
ls_event_exit TYPE slis_event_exit.
DATA:LC_GLAY TYPE LVC_S_GLAY.
select-options s_matnr for mara-matnr .
start-of-selection.
select matnr maktx from makt into table i_makt
where matnr in s_matnr.
end-of-selection.
Fill the fieldcatlog
perform fill_field.
Call the FM
perform call_fm.
*& Form fill_field
text
--> p1 text
<-- p2 text
FORM fill_field.
data wa_fieldcat type slis_fieldcat_alv.
clear : wa_fieldcat.
wa_fieldcat-tabname = 'I_MAKT'.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-outputlen = '18'.
wa_fieldcat-seltext_l = 'Material #'.
wa_fieldcat-col_pos = '1'.
append wa_fieldcat to i_fieldcat.
clear : wa_fieldcat.
wa_fieldcat-tabname = 'I_MAKT'.
wa_fieldcat-fieldname = 'MAKTX'.
wa_fieldcat-outputlen = '40'.
wa_fieldcat-seltext_l = 'Material Desc'.
wa_fieldcat-col_pos = '2'.
append wa_fieldcat to i_fieldcat.
ENDFORM. " fill_field
*& Form call_fm
text
--> p1 text
<-- p2 text
FORM call_fm.
v_repid = sy-repid.
LC_GLAY-EDT_CLL_CB = 'X'.
CLEAR ls_event_exit.
ls_event_exit-ucomm = gc_refresh. " Refresh
ls_event_exit-after = 'X'.
APPEND ls_event_exit TO lt_event_exit.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = g_status_set
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS = LC_GLAY
IS_LAYOUT =
IT_FIELDCAT = i_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT = lt_event_exit
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_makt
EXCEPTIONS
PROGRAM_ERROR = 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.
ENDFORM. " call_fm
FORM USER_COMMAND *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
data i_RSPARAMS like RSPARAMS occurs 0.
CASE R_UCOMM.
WHEN '&IC1'.
read table i_makt index rs_selfield-tabindex.
SET PARAMETER ID 'MAT' FIELD i_makt-matnr.
if not i_makt-matnr is initial.
call transaction 'MM02' and skip first screen.
endif.
when '&REFRESH'.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = v_repid
IMPORTING
SP =
TABLES
SELECTION_TABLE = i_RSPARAMS
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 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.
submit z_get_refresh with selection-table i_RSPARAMS.
rs_selfield-refresh = 'X'.
ENDCASE.
MOVE '&REFRESH' TO r_ucomm.
ENDFORM.
FORM set_pf_status *
FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
DELETE Rt_extab WHERE fcode = gc_refresh.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'
EXCLUDING Rt_extab.
*SET PF-STATUS 'STANDARD' EXCLUDING rt_extab.
SET TITLEBAR sy-tcode.
ENDFORM. -
Xml: how to get node value when pasing node name as a parameter
Hi,
I've got some xml:
var xmlData:XML =
<1stNode>
<buttonID>first child node value</buttonID>
<imageID>second child node value</imageID>
<labelID>third child node value</labelID>
</1stNode>
Then I want to read specific node value based on a value passed to a function. .
var buttonID = new Button;
var imageID = new Image;
var labelID = new Label;
getNodeValue(buttonID); //the value here is set dynamically
private function getNodeValue (nodeName:String):void {
trace (xmlData.nodeName) //doesn't work
var str:String = "xmlData." + nodeName;
var xml:XMLList = str as XMLList //doesn't work
I'm don't know how to get the value when node name is dynamically changed.use:
getNodeValue(buttonID); //the value here is set dynamically
private function getNodeValue (nodeName:String):void {
trace (xmlData[nodeName]) -
How to get a value for Select One Choice in the backing bean
Friends,
Does any one have any idea, how to get the value of a selected item value from the Select One Choice component in the backing bean iin valueChangeListener method. Right now I am always getting the sequence of the selected item, instead the actual selected value. I tried using 'ValuePassTrhough=true' also.. but didn't help
Below is the my code snippet
<af:selectOneChoice value="#{bindings.country.inputValue}"
required="#{bindings.country.hints.mandatory}"
shortDesc="#{bindings.country.hints.tooltip}"
id="soc1" autoSubmit="true" valuePassThru="true"
valueChangeListener="#{pageFlowScope.Bean.onValueChange
<f:selectItems value="#{bindings.country.items}" id="si2"/>
</af:selectOneChoice>
Thanks in advance.check my other post at Re: Pass data from a variable to another page
-
How to Get Resource value which are referred in code behind file using IResourceProvider
Hi Everyone,
Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider. I created a CustomResourceProvider project using ResourceProviderFactory and able to get the resource values from DB which
are used in aspx page.
But i'm not able to get the values which are referring from code behind file.
Ex: Label1.Text = Resources.Common.Car; // This is still coming from resx file.
Can any one please let me know how to get the value from DB instead of resx file which are referred in cs file.
Appreciate your help.
The below code uses the ResourceProviderFactory which calls this method and gets it from DB. Please let me know if you need any more info.
public class DBResourceProviderFactory : ResourceProviderFactory
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
return new DBResourceProvider(classKey);
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
// we should always get a path from the runtime
string classKey = virtualPath;
if (!string.IsNullOrEmpty(virtualPath))
virtualPath = virtualPath.Remove(0, 1);
classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);
return new DBResourceProvider(classKey);
Regards, Ravi Neelam.Hi Ravi Neelam.
>>Currently I'm working on moving the Resource file from "App_GlobalResources" to Database by using IResourceProvider.
Based on this message, your issue related to web application, questions related to Asp.Net should be posted in
Asp.Net forum.
Please reopen a new thread in that forum. You will get more efficient response.
Regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Insert filename in Pages document
When I was working with Word for Windows there was an insert feature that allowed me to insert the path and filename in my documents. Very helpful since I do a lot of correspondence and keeping track of letters can get hectic. I've looked high and lo
-
Best stand for MacBook Pro and Apple LED Display
I am buying a MacBook Pro and Apple LED Display tomorrow. I want to have a two display setup, similar to what I have seen in the Apple Store. I believe they used a Griffin Elevator. I want to make sure of two things: that the stand is sturdy enough s
-
How to install a pci-6030e in a pxie-8102 chassis
I removed a PXI-6030E multifunction IO card from a PXI-1010 chassis, which is installed in a SCXI backplane. I can now see the device in Devices and Interfaces under the PCIe-8102 chassis, but it only lets me use a visa test panel. I have no idea h
-
Apple TV keeps asking me to enter my security code and I do and it keeps going back to the security code screen even tho my security code is correct and verified.
-
Hi, I've successfully gotten remote debugging of EJB's in Weblogic 5.1 working and I was curious if anybody knows if I can follow the same steps to get the JOnAS App Server configured to debug EJBs that it hosts. It seems that the most important step