Problem in assigning variables value.. FORM bdc_field
Though the value is there in y_lv_fval it is not assigned to WA field y_li_bdcdata-fval.
FORM bdc_field USING y_lv_fnam y_lv_fval.
CLEAR y_li_bdcdata.
y_li_bdcdata-fnam = y_lv_fnam.
y_li_bdcdata-fval = y_lv_fval. "KBETR field length..larger than y_li_bdcdata-fval
APPEND y_li_bdcdata.
ENDFORM. "BDC_FIELD
ok
Similar Messages
-
Assigning variable value to another variable
I want to assign value from one variable with type DATETIME to another variable which has type STRING.
E.G: I need to convert this variable P_CreatedDate of type DATETIME to STRING variable CreatedDate.
Can someone help me in C# script. Im using SSIS script task.
Thanks in advance.
ZKI have a requirement where I need to convert following datetime variable value into the string vaiable format.
Here is the example:
7/23/2014 11:24 PM
I need above datetime to be converted into following string format
2014-01-01 03:15:01.470
yyyyMMdd HHmmssFFF
Thanks in advance.
ZK -
Using variable values form parametrized URL in Customer Exit in i_step = 1
Hello BW experts,
I call a parametrized URL to a Web Template that has a Query with the variable VAR1:
http://XXX?...&CMD=LDOC&template_id=TEMP1&VAR_NAME_1=VAR1&VAR_VALUE_EXT_1=2006
Then I try to access the value of VAR1 in i_step = 1 in the Customer Exit for BEx variables in order to determine the value for a customer exit variable VAR2:
WHEN 'VAR2'.
IF i_step = 1.
READ TABLE i_t_var_range INTO var_range
WITH KEY vnam = 'VAR1'.
fl_var_range-sign = 'I'.
fl_var_range-opt = 'EQ'.
fl_var_range-low = *some operation with var_range
APPEND fl_var_range TO e_t_range.
ENDIF.
The problem is that VAR1 contains either the default values (if the variable is set to have default variables) or is empty (if there are no default variables defined). It does not retrieve the value in the URL in the Customer Exit, but displays it correctly in the variable screen.
Is there any way I can acces the URL parameter in the Customer Exit?
Thanks for any answers in advance.
MichaelGili,
thanks for your answer. The problem was, though, that the first value determines the behavior of the variable screen by setting the value of a customer exit variable.
My goal was to have two variable screens. In the first a date is chosen and in the second a node of a time-dependant hierarchy is chosen. If one enters the date in the same screen as the hierarchy, the valid hierarchy for the date is not displayed.
I solved the problem now in following way:
<b>1. Saving the value in SAP Memory as a parameter.</b> The parameter has to be defined in SE80. A Dummy Web Template with a query on the same Infoprovider with just the two InfoObjects (Year/Month) displays a variable screen for Month/Year. In addition there is a Dummy Customer Exit variable that is needed in order to pass the variable values (month/year) into SAP Memory. Using JavaScript in the Dummy WebTemplate the second Web Template with the actual query is called without displaying anything else than the variable screen.
WHEN 'DUMMY_CUSTOMEREXIT_VAR'.
data: w_date like sy-datum
IF i_step = 2.
READ TABLE i_t_var_range INTO var_range
WITH KEY vnam = 'VAR1'.
do your peration
i.e. w_date(4)+2 = var_range-low.
w_date(6)+2 = var_range-high.
SET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
ENDIF.
<b>2. Retrieving the value from SAP Memory</b> Before displaying the variable screen, the chosen date is retrieved from SAP Memory and used to set the date for a customer exit variable for the hierarchy validity date.
WHEN 'VAR2'.
IF i_step = 1.
GET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
do some operation with
APPEND fl_var_range TO e_t_range.
ENDIF.
It is quite a comlex construct, but it works.... -
Pass variable value form one Operational mapping to other
Hi,
Can a variable value be passed form one Operational mapping to other in Interface determination?
So that a Condition check to excute the second operational mapping depending on variable value obtained form first operational mapping.
Can globalContainer could be used in UDF?
Thankx
Edited by: kevindass on Aug 25, 2011 9:13 AMHi,
You can try these two options:
1) Create a key in Dynamic Configuration and use it to store the value and retrieve the value back in second operation from Dynamic Configuration.
OR
2) Use Export and send the value to BPM, then in BPM using the value decide on if to execute the second operation.
Regards,
Aravind -
Problem to transfer Variable value to Dashboard A to Dashboard B
Hi,buddies:
I have a scenario that I have to jump from Total Dashboard(we call it A) to Detail Dashboard(we call it B),I work with Xcelsius directly connect to BW through SAP NetWeaver BW connection ,I can transfer Variable values to B through URL with command like this:
http://hqbd6.sinopec.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?DASHBOARD=R2JN_DASHTESTB
&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE
&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=G1CALMONTH_DZ_MIS
&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING
&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=2011.07
But at this condition,The variables of Dashboard B are not bound to any cell because they will be set at run time with values passed in the URL.
My question is can I get the Variable value from the URL in the Xcelsius Designer and put it into a specified cell and link this cell with the query,so that even jump to Dashboard B I can still change the variable values.
Best Regards
Martin Xie
Edited by: Martin Xie Ai Hua on Mar 9, 2012 7:48 AMLet me explain the issue in detail.
In Query Designer, both the year and month variables are defined by user exit function to read current year and month and can be modified during the query runtime.
In WAD, Query1 is used to be a table with a table interface to hyperlink a chart which is defined by Query2 with the same variable value of Query1.
During the runtime of template, if I change the variable value of Query1 , I want the variable of Query2 to be changed automatically with the same new value.
So in the table interface of Query1 , I write the ABAP code in "SE24" and related source code to the variable is following:
concatenate
'function fire_urlJGSP_Col(filter) {'
Cl_rsr_www_renderer=>c_lf
'chart_url="' url '" + "&CMD=LDOC'
'&TEMPLATE_ID=GCCHART_9' "WEB ID of the work book
'&PAGEID=Graphics' "Name of the view
'&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME=Z2MYEAR&VAR_VALUE_EXT=" + filter'
Cl_rsr_www_renderer=>c_lf
'openWindow(chart_url,"chart_window","dependent=yes","600",'
'"450","true")'
Cl_rsr_www_renderer=>c_lf
into l_coding.
In this way , I can only transfer the year variable value from Query1 to Query2 and not two variables .
So , how shall I do to transer the two variable value in the same? -
Assigning variable values in the virtual key figures Badi
Hi,
I'm currently using the virtual chars and key figures RSR_OLAP_BADI to calculate days late as 0NETDUEDATE - sy-datum. This works fine, but the query actually uses variable 0P_KEYDT to determine the key date (set in restricted key figures so not directly).
I want to use this key date variable value rather than the system date to calculate Days Late in the CALCULATE method of the Badi. In the old user exits I could have retrieved the value from internal table i_t_var_range in the variables user exit ZXRSRU01 and stored it globally.
Does anyone know how to get a query variable value within the RSR_OLAP_BADI Badi? I've tried using BAPI_REPPROV_GETVARIABLES but don't know how to pick up the session id to make it work. Is there a BADI equivalent of EXIT_SAPLRRS0_001?
I'm sure one of you out there has the answer!
Thanks,
StuartHi József
Yes I have, I think using SAP's white paper on virtual characteristics and key figures.
My only outstanding question would be: is there a replacement BADI for the variables user exit and if not why not, since BADIs are supposed to be the preferred way now? -
Problem in assigning Database Value to jTextfield (form doesn't show up)
Hi,
I'm trying to get an integer value from database, add 1 to it and assign it to a jTextfield in formInternalFrameOpened event, but this causes the form not to open.
If I remove just this thing the rest of the form works fine.
The open event has no problem it works fine, I have checked with jOptionDialog.
heres the code
private void formInternalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
// Get last driver ID, add 1 to it and assign it to driver ID JTextField
Connection con = null;
try
MyDBConnection myDBConnection = new MyDBConnection();
myDBConnection.init();
con = myDBConnection.getMyConnection();
Statement pullStmt = con.createStatement();
ResultSet pullRs = pullStmt.executeQuery("SELECT key_driverId FROM drivers ORDER BY key_driverId DESC LIMIT 1");
pullRs.first();
driverId.setText(String.valueOf(pullRs.getInt("key_driverId")+1));
pullRs.close();
con.close();
catch(SQLException e){}
}Thanks, here it is.... Remember, I'm trying to insert a value from database into jTextfield in formInternalFrameOpened event.
* NewDriver.java
* Created on August 9, 2007, 9:14 AM
package LimoApp;
import java.sql.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import javax.swing.JOptionPane;
* @author NKA
public class NewDriver extends javax.swing.JInternalFrame {
/** Creates new form NewDriver */
public NewDriver() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
driverId = new javax.swing.JTextField();
firstName = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
lastName = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
address = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
city = new javax.swing.JTextField();
jLabel7 = new javax.swing.JLabel();
state = new javax.swing.JComboBox();
jLabel8 = new javax.swing.JLabel();
zipcode = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
workPhone = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
extention = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
homePhone = new javax.swing.JTextField();
jLabel12 = new javax.swing.JLabel();
mobilePhone = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
dispatchEmail = new javax.swing.JTextField();
personalEmail = new javax.swing.JTextField();
jPanel3 = new javax.swing.JPanel();
licenseNumber = new javax.swing.JTextField();
jLabel18 = new javax.swing.JLabel();
socialSecurityNumber = new javax.swing.JTextField();
jLabel19 = new javax.swing.JLabel();
dateOfBirth = new javax.swing.JTextField();
jLabel20 = new javax.swing.JLabel();
hireDate = new javax.swing.JTextField();
jLabel21 = new javax.swing.JLabel();
vehicleAssigned = new javax.swing.JComboBox();
jLabel22 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
payWaitingTime = new javax.swing.JCheckBox();
payExtraStops = new javax.swing.JCheckBox();
payEarlyLate = new javax.swing.JCheckBox();
payTolls = new javax.swing.JCheckBox();
payParking = new javax.swing.JCheckBox();
payGasSurcharge = new javax.swing.JCheckBox();
gratuity = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
commission = new javax.swing.JTextField();
perHourRate = new javax.swing.JTextField();
perMileRate = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
btNewDriverSave = new javax.swing.JButton();
setClosable(true);
setIconifiable(true);
setTitle("New Driver");
addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
formInternalFrameOpened(evt);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Driver", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11), new java.awt.Color(102, 0, 0)));
driverId.setEditable(false);
driverId.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
firstName.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
firstNameFocusLost(evt);
jLabel1.setText("Dispatch Email");
jLabel2.setText("Personal Email");
jLabel3.setText("Driver ID");
jLabel4.setText("First Name");
lastName.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
lastNameFocusLost(evt);
jLabel5.setText("Last Name");
jLabel6.setText("Address");
jLabel7.setText("City");
state.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AL", "VA" }));
jLabel8.setText("State");
zipcode.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
zipcodeFocusLost(evt);
jLabel9.setText("Zipcode");
workPhone.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
workPhoneFocusLost(evt);
jLabel10.setText("Work Phone");
extention.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
extentionFocusLost(evt);
jLabel11.setText("Extention");
homePhone.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
homePhoneFocusLost(evt);
jLabel12.setText("Home Phone");
mobilePhone.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
mobilePhoneFocusLost(evt);
jLabel13.setText("Cell");
dispatchEmail.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
dispatchEmailFocusLost(evt);
personalEmail.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
personalEmailFocusLost(evt);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(8, 8, 8)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel12)
.addComponent(jLabel10)
.addComponent(jLabel4)
.addComponent(jLabel3)
.addComponent(jLabel6)
.addComponent(jLabel7)))
.addComponent(jLabel1)
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(firstName, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lastName))
.addComponent(address)
.addComponent(dispatchEmail)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(workPhone, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(city, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
.addComponent(homePhone, javax.swing.GroupLayout.Alignment.LEADING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(extention, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(state, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(zipcode))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(mobilePhone, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(personalEmail)
.addComponent(driverId, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(driverId, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(lastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(firstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(address, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(city, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(state, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8)
.addComponent(jLabel9)
.addComponent(zipcode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(workPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel10)
.addComponent(jLabel11)
.addComponent(extention, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
.addComponent(jLabel13)
.addComponent(mobilePhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(homePhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(dispatchEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(personalEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Documents", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11), new java.awt.Color(102, 0, 0)));
licenseNumber.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
licenseNumberFocusLost(evt);
jLabel18.setText("License #");
socialSecurityNumber.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
socialSecurityNumberFocusLost(evt);
jLabel19.setText("Social Security #");
dateOfBirth.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
dateOfBirthFocusLost(evt);
jLabel20.setText("Date of Birth");
hireDate.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
hireDateFocusLost(evt);
jLabel21.setText("Hire Date");
vehicleAssigned.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
jLabel22.setText("Vehicle Assigned");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel18)
.addComponent(jLabel19))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(socialSecurityNumber)
.addComponent(licenseNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel20)
.addComponent(jLabel21))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(hireDate)
.addComponent(dateOfBirth, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel22)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(vehicleAssigned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel18)
.addComponent(licenseNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel19)
.addComponent(socialSecurityNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(dateOfBirth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(hireDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel21))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(vehicleAssigned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel22))
.addContainerGap())
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Payroll Stettings", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11), new java.awt.Color(102, 0, 0)));
payWaitingTime.setText("Pay Waiting Time");
payWaitingTime.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payWaitingTime.setMargin(new java.awt.Insets(0, 0, 0, 0));
payExtraStops.setText("Pay Extra Stops");
payExtraStops.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payExtraStops.setMargin(new java.awt.Insets(0, 0, 0, 0));
payEarlyLate.setText("Pay Early / Late");
payEarlyLate.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payEarlyLate.setMargin(new java.awt.Insets(0, 0, 0, 0));
payTolls.setText("Pay Tolls");
payTolls.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payTolls.setMargin(new java.awt.Insets(0, 0, 0, 0));
payParking.setText("Pay Parking");
payParking.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payParking.setMargin(new java.awt.Insets(0, 0, 0, 0));
payGasSurcharge.setText("Pay Gas Surcharge");
payGasSurcharge.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
payGasSurcharge.setMargin(new java.awt.Insets(0, 0, 0, 0));
gratuity.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
gratuity.setText("0");
gratuity.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
gratuityFocusLost(evt);
jLabel14.setText("Gratuity %");
jLabel15.setText("Commission %");
commission.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
commission.setText("0");
commission.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
commissionFocusLost(evt);
perHourRate.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
perHourRate.setText("0");
perHourRate.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
perHourRateFocusLost(evt);
perMileRate.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
perMileRate.setText("0");
perMileRate.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
perMileRateFocusLost(evt);
jLabel16.setText("Per Mile Rate");
jLabel17.setText("Per Hour Rate");
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(16, 16, 16)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(gratuity, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(9, 9, 9)
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(perMileRate, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel15)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(commission, 0, 0, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel17)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(perHourRate, 0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(payWaitingTime)
.addComponent(payEarlyLate)
.addComponent(payExtraStops))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(payParking)
.addComponent(payTolls))
.addGap(36, 36, 36))
.addComponent(payGasSurcharge))))
.addContainerGap())
jPanel4Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {commission, gratuity, perHourRate, perMileRate});
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel14)
.addComponent(gratuity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel16)
.addComponent(perMileRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(14, 14, 14)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel15)
.addComponent(commission, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-
Assigning variables to form components?
Would anyone know how I could assign a variable to one of the
form components that come with flash? Just like the text box
variables? Thanks a lot.Ah man... I guess noone knows anything about this... I mean,
I just need to know how I can give them a tag for communication
outside of flash... basically -
Problem in assigning characteristics values to characters against material
Hello Gurus,,
I am doing a wrapper RFC to populate characteristic values to characters and finally that needs to be visible in material classfication view.
The following is my code let me know if any thing needs to be corrected on this
*"*"Local Interface:
*" IMPORTING
*" VALUE(CLASSNUM) TYPE BAPI1003_KEY-CLASSNUM
*" VALUE(CLASSTYP) TYPE BAPI1003_KEY-CLASSTYPE
*" VALUE(MATNR) TYPE MATNR
*" TABLES
*" CHARVALUES STRUCTURE ZCLASSCHAR
*" RETURN STRUCTURE BAPIRET2
TYPES: BEGIN OF ty_classchar,
atnam TYPE atnam,
atfor TYPE atfor,
END OF ty_classchar.
DATA: t_classchar TYPE TABLE OF ty_classchar,
x_classchar TYPE ty_classchar,
v_matnr(50) TYPE c.
DATA: objectkeynew TYPE bapi1003_key-object,
objecttablenew TYPE bapi1003_key-objecttable,
classnumnew TYPE bapi1003_key-classnum,
classtypenew TYPE bapi1003_key-classtype,
status TYPE bapi1003_key-status,
standardclass TYPE bapi1003_key-stdclass,
changenumber TYPE bapi1003_key-changenumber,
keydate TYPE bapi1003_key-keydate,
no_default_values TYPE bapi1003_key-flag,
classif_status TYPE bapi1003_key-status.
DATA: allocvaluesnum TYPE TABLE OF bapi1003_alloc_values_num WITH HEADER LINE,
allocvalueschar TYPE TABLE OF bapi1003_alloc_values_char WITH HEADER LINE,
allocvaluescurr TYPE TABLE OF bapi1003_alloc_values_curr WITH HEADER LINE.
REFRESH: t_classchar,return.
IF charvalues IS NOT INITIAL.
SELECT atnam
atfor
FROM cabn
INTO TABLE t_classchar
FOR ALL ENTRIES
IN charvalues WHERE
atnam EQ charvalues-characteristic.
IF sy-subrc <> 0.
CLEAR return.
return-message = 'No values in CABN against provided input'.
APPEND return.
ENDIF.
ELSE.
CLEAR return.
return-message = 'No input is provided'.
APPEND return.
ENDIF.
REFRESH: allocvalueschar,allocvaluesnum.
LOOP AT charvalues.
CLEAR x_classchar.
READ TABLE t_classchar INTO x_classchar WITH KEY atnam = charvalues-characteristic.
CASE x_classchar-atfor.
WHEN 'NUM'.
CLEAR allocvaluesnum.
allocvaluesnum-charact = charvalues-characteristic.
allocvaluesnum-value_from = sy-datum.
APPEND allocvaluesnum.
WHEN 'CHAR'.
CLEAR allocvalueschar.
allocvalueschar-charact = charvalues-characteristic.
allocvalueschar-value_char = charvalues-description.
APPEND allocvalueschar.
ENDCASE.
ENDLOOP.
CLEAR: v_matnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = matnr
IMPORTING
output = v_matnr.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = v_matnr
objecttablenew = 'MARA'
classnumnew = classnum
classtypenew = classtyp
STATUS = '1'
* STANDARDCLASS =
* CHANGENUMBER =
keydate = sy-datum
NO_DEFAULT_VALUES = ' '
IMPORTING
classif_status = classif_status
TABLES
allocvaluesnum = allocvaluesnum
allocvalueschar = allocvalueschar
* ALLOCVALUESCURR =
return = return
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
The output which i got has following error codes
I CL 732 Assignment does not exist or is not valid on
E CL 763 Object 00000000000000000000000000000000000000000000001631 does not exist
I CL 736 Assignment was not created
Please let me know what could be the error.
Regards
S.JanagarHi Mr.Sengathir Jeyamani,
Did u got the solution for this? Me also looking answer for your question. If u found, Pls let me know. Thanks.
-JANARAJA -
Problem with update variable value
i have declase a variable as
static int small;
in the public class.......
then the method "a" will update this "small" to a new value everytime the "a" is called....
but i could not update the "small " to a new value....everytime is the same value.....
how could this be solved??i think my rpoblem come from other factor.....
i think i'm unable to remove the selected node from the list....
eg:
newtempNode = firstNode;
tempNode = firstNode;
for ( int i =0;i < (smallid-1);i++)
tempNode = tempNode.next;
for (int i = 0; i< smallid;i++)
newtempNode = newtempNode.next;
tempNode = newtempNode.next;
==>can the above delete the selected node from the list???
or anybody can show me how to deleted the selected node from the linked list??? -
How to assign a variable value to crystal report viewer formula with CR2008
Hi ,
I am using crystal reports 2008 and i am not able to find how to assign variable value to crystal report viewer formula.
In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
crystalreport1.Formulas(1) = variable2
but, i don't find similar kind in crystal reports 2008.
How can i achieve the same functionality using crystal reports 2008.
Thanks in Advance
Regards,
RamnathHi,
Can i anyone help me out with this.
I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
Any code snippet would be of great Help.
Thanks in Adnvance.
Ramnath -
Problem in assigning date valje to field
Hi,
I have a problem in assignning date value to field.
i am retriving date from a table and assigning it to a field which is date type in the form.. but it is not reflecting..
Error: form Bad Value..
how to assign the date values in the form..
MahiHi mahendra,
I think the Bad Value Error Occurs only if the databound datasource in the form must have different data type...
oForm.DataSources.UserDataSources.Add("eDate", SAPbouiCOM.BoDataType.dt_DATE, 10);
SAPbouiCOM.EditText oEdit;
oEdit = oForm.Items.Item("1").Specific;
oEdit.DataBind.SetBound(true, "", eDate);
with Regards,
MadhuSudhana Rao.G -
Assigning a value to an array cell populated [BULK]
Hi all,
I've got a problem in assigning a value to an array populated with BULK COLLECT INTO .
I can reproduce the problem with this
CREATE TABLE TEST_TABLE (
value1 NUMBER,
value2 NUMBER
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);And this is the PL/SQL anonymous block that gives me problems:
DECLARE
SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
TYPE records_table IS TABLE OF t_rec;
elist RECORDS_TABLE;
CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
BEGIN
OPEN table_cursor;
FETCH table_cursor BULK COLLECT INTO elist;
FOR j IN 1..elist.COUNT
LOOP
elist(j)(1) := elist(j)(1) +1;
END LOOP;
CLOSE table_cursor;
END; The error is
ORA-06550: line 13, column 7:
PLS-00308: this construct is not allowed as the origin of an assignment
ORA-06550: line 13, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:So it doesn't compile because of this line of code:
elist(j)(1) := elist(j)(1) +1;
Why doesn't it work?
If I try to do this, works perfectly:
DECLARE
TYPE v_num_table
IS
TABLE OF NUMBER;
TYPE v_2_num_table
IS
TABLE OF v_num_table;
v_nums V_2_NUM_TABLE := V_2_NUM_TABLE();
BEGIN
v_nums.EXTEND;
v_nums(1) := v_num_table();
v_nums(1).EXTEND;
v_nums(1)(1) := 1;
v_nums(1)(1) := v_nums(1)(1) +1;
dbms_output.put_line(v_nums(1)(1) );
END;Edited by: user10396517 on 2-mar-2012 2.35Variable "elist" is a collection of record, so you access an individual field of a given collection element by specifying the field name, not its position :
DECLARE
SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
TYPE records_table IS TABLE OF t_rec;
elist RECORDS_TABLE;
CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
BEGIN
OPEN table_cursor;
FETCH table_cursor BULK COLLECT INTO elist;
FOR j IN 1..elist.COUNT
LOOP
elist(j).value1 := elist(j).value1 + 1;
END LOOP;
CLOSE table_cursor;
END;Your second example is different as you're dealing with a collection of collections. -
Assign a value to a global variable - form personalization
Hi All,
We have a requirement in which we want to display a message depending upon the out parameter of the procedure in form personalization.
We are using 'Builtin' with the buitin type 'Execute a Procedure'.
And the argument passed is :
*='declare
l_request_id Number;
l_out_come VARCHAR2(10);
begin
apps.xx_sr_email_pkg1.xx_sr_email_p1
('''||${GLOBAL.XX_CUST_ACCOUNT_ID.VALUE}||''',
'''||${GLOBAL.XX_INCIDENT_ID.VALUE}||''',
'''||${GLOBAL.XX_EMAIL_TYPE.VALUE}||''',l_request_id);
:GLOBAL.XX_REQUEST_ID := l_request_id;
end'*
But its not assigning the value of l_request_id to the gloabal variable XX_REQUEST_ID.
Can you please help?
ThanksI don't have a solution but a work around.
What if you create a function that accepts the same in parameters and returns the message.
And then you create an action of the type message and in the message you call the function such as
= select xx_sr_email_pkg1.sr_email_f1 .... from dual
Sandeep Gandhi -
Problem in assigning value to an array element
hi all
in the following prog i am not able to assign the value to the array element
i am not getting why it is giving me error
//my program is as follows
public class ArrayTest
static int [] intArray = new int[5];
static int [] intArray1 = new int[1];
intArray1[0] = 5; // this line gives error
static char [] charArray = new char[5];
public static void main(String args[])
System.out.println(charArray);
intArray1 = intArray;
}thanx in advance as usualThe problem is that you try to execute code outside a method. This can be only done in form of a variable declaration or as a static initilization block which will be executed once when the class is loaded:public class ArrayTest
static int [] intArray = new int[5];
static int [] intArray1 = new int[1];
static char [] charArray = new char[5];
static {
intArray[0] = 5;
public static void main(String args[])
System.out.println(charArray);
intArray1 = intArray;
}
Maybe you are looking for
-
Training and event management: Book Attendee List for Business Event List
Dear all, I know this: PV07: book attendee list for business event PV08: book attendee for business event list Is there a tcode to book an attendee list for a business event list Thanks a lot in advance!
-
Month & year old messages being delivered to phone
Sorry if this has been already answered on the forums, I did search, but didn't find a useful answer. I have a Blackberry with a push email service from Vodafone UK. Unfortunately, what is happening is that I am occasionally (maybe one a day on avera
-
I have non English characters showing up.
This morning I wanted to make a change in my Security & Privacy settings and when prompted to authenticate the dialogue box contained non-English characters. Even the OK button appeared to be in Chinese are the like. Any ideas welcome. OS X 10.8.1
-
How to activate video calling from account page?
On a new computer Windows 8.1 can sign into my Skype for Desktop Account using skype name and password. Also have same email address as before. Account page comes up but dont know how to activate Skype so I can video call. Tried to instal Skype &
-
Text message delivery indicator?