Gurus..need help in reading data from virtual infocube
Gurus,
I have to read data from an virtual infocube...I am trying to use FM RSDRI_INFOPROV_READ to read data but it doesn't work..
I am doing exactly what has been done in the demo program RSDRi_INFOPROV_READ_DEMO...
Please help me...its really URGENT...
Thanks
sam
Check out this thread....
must be helpful
Re: Read data from 0BWTC_C02 via ABAP
Similar Messages
-
Need Help in reading data from URLConnection in servlets
hi i created GUI which sends d username n password to the servlets via URLConnection.n am sending the same to Server program via sockets.but when i read d data in the servlet am getting only null value...need help here....
This is my button's ActionPerformed code
private void LoginActionPerformed(java.awt.event.ActionEvent evt) {
String uname = UserName.getText();
char [] pwd = PassWord.getPassword();
String pword = new String(pwd);
try
String url = "http://localhost:8080/MIMServlets/hit";
URL ucon = new URL(url);
URLConnection conn = ucon.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches (false);
conn.setDefaultUseCaches (false);
conn.setRequestProperty("Content-Type", "text/plain");
System.out.println(uname);
System.out.println(pword);
PrintWriter out = new PrintWriter( conn.getOutputStream() );
BufferedReader in = new BufferedReader(
new InputStreamReader(
conn.getInputStream()));
out.print(uname);
out.print(pword);
out.close();
String inputLine = in.readLine();
Status.setText(inputLine);// TODO add your handling code here:
}catch(MalformedURLException e)
System.out.println("Exception"+e);
catch(IOException e1)
System.out.println("Exception"+e1);
This is my Servlet code........
import java.io.*;
import java.net.*;
import java.util.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class MIMServlets extends HttpServlet
PrintWriter out,out1;
BufferedReader in,in1;
String host = "localhost";
String fromServer = "";
String username,password;
int a;
public void init()
out=null;
out1=null;
public void doPost(HttpServletRequest request,HttpServletResponse
response)throws ServletException,IOException
response.setContentType("text/html");
out=response.getWriter();
try{
InetAddress address = InetAddress.getByName(host);
Socket theSocket = new Socket(address, 4444);
out1 = new PrintWriter(theSocket.getOutputStream(),true);
in = new BufferedReader(new InputStreamReader(theSocket.getInputStream()));
in1 = new BufferedReader(new InputStreamReader(request.getInputStream()));
String username = in1.readLine();
String password = in1.readLine();
System.out.println(username);
System.out.println(password);
out1.println(username);
out1.println(password);
out1.println("Yahoo");
out1.flush();
while ((fromServer = in.readLine()) != null)
out.println("From Server: " + fromServer);
break;
out1.close();
in.close();
theSocket.close();
}catch(IOException e)
System.out.println("Exception");
System.exit(-1);
public void destroy()
out.close();
thanks in advance.......Follow below example to using FM 'READ_TEXT'
DATA BEGIN OF i_tlines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA END OF i_tlines.
DATA: w_textname(70) TYPE c.
w_textname = vbdkr-vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'Z006'
language = 'E'
name = w_textname
object = 'VBBK'
TABLES
lines = i_tlines.
IF sy-subrc = 0.
READ TABLE i_tlines INDEX 1.
t_in-m1 = i_tlines-tdline. "Now t_in_m1 will have the value
ENDIF.
Regards,
SaiRam -
Need help in reading data from Database.
Hi experts,
I have created a custom smartforms and custom print program. In my print program i have read all the data and populated the internal table and i am able to display the data in the smartform output.
I'm using Tcode me23n to print preview the form. i have to read the "text" tab from the me23n tcode using FM "READ_TEXT". The data is getting populated into an internal table. I coded these statements in Initialization tab in global definition.
Now my problem is ..... Can anyone tell me how to display the data into the forms.
please help.
ThanksFollow below example to using FM 'READ_TEXT'
DATA BEGIN OF i_tlines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA END OF i_tlines.
DATA: w_textname(70) TYPE c.
w_textname = vbdkr-vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'Z006'
language = 'E'
name = w_textname
object = 'VBBK'
TABLES
lines = i_tlines.
IF sy-subrc = 0.
READ TABLE i_tlines INDEX 1.
t_in-m1 = i_tlines-tdline. "Now t_in_m1 will have the value
ENDIF.
Regards,
SaiRam -
Reading data from 2 infocubes in same start routine - RSDRI_INFOPROV_READ
Hi guys,
Is it possible to read data from 2 Infocubes via RSDRI_INFOPROV_READ FM in same start routine of Infosource.
Both infocube have different KF's.
my one Infocube reading is working fine but now need to another infocube in same strat routine.
Help will be appreciated and full points will be assigned.
Thanks in advance,
HarryHi,
1.It means I have to call FM twice
2. Can I use same internal table to store data of both infocubes
3. both cubes have got different KF
Can you please explain in detail?
Thanks,
Harry -
Hi,
I'm writing a program to read data from an infocube, usfin FM RSDPL_CUBE_DATA_READ, but I can't get a result.
This are the parameters I'm using:
I_INFOCUBE = 'ZGE_CUB10'
I_REFERENCE_DATE = sy-datum
I_S_RFCMODE-ID = BIDCLNT100
I_S_RFCMODE-RFC_RECEIVER = RSDPL_CUBE_DATA_READ
I_S_RFCMODE-PACKAGESIZE = 100
I_S_DELTAMODE-SYSID = BID
I_S_DELTAMODE-DELTAMODE =''
I_T_CHA-chanm = 'ZGE_KPI'
I_T_CHA-chaalias = 'ZGE_KPI'
I_T_CHA-orderby = 0
I_T_KYF-kyfnm = 'ZGE_VALOR'
I_T_KYF-kyfalias = 'ZGE_VALOR'
I_T_KYF-aggr = 'SUM'
i_t_range-chanm = 'ZGE_KPI'.
i_t_range-sign = 'I'.
i_t_range-compop = 'EQ'.
i_t_range-low = 'FTL_GLC10_0331'.
i_t_range-high = 'FTL_GLC10_0331'.
E_T_COLUMN-colname = 'salida_zge_valor'
E_T_COLUMN-iobjname = 'salida_zge_Valor'
E_T_COLUMN-keyflag = 'X'
but I keep getting DELTAMODE_ERROR.
any help??? any sample-code you may share??
thanks
MAuriciofound some sample code...
http://www.web-dreamer.de/blog/2009/04/reading-on-sap-bi-infocubes-via-rsdri_infoprov_read.html.
SAP also gives you sample programs on how to use the same...
RSDRI_INFOPROV_READ_DEMO
from thread :
Re: RSDRI_INFOPROV_READ and compound selection conditions
Edited by: Arun Varadarajan on Jun 5, 2009 7:24 PM -
Reading data from an infocube into wd application
Hi,
How can we read data from an infocube.I have to read data from two infocubes and then display it in table in an wd application.
I have found an FM RSDRI_INFOPROV_READ to read , but how to use the same in wd application.Hi Sanjeev,
Use CALL FUNCTION To use FM in WD.
something like this..
Declarations for BAPI_HU_DELETE_FROM_DEL
DATA : Del TYPE BAPIDELICIOUSDELIVERY-DELIVERY_NUMBER,
Return1 TYPE TABLE OF BAPIRET2.
del = lv_imp_outdel.
DATA : HUKEY TYPE BAPIHUKEY-HU_EXID,
wa_hukey TYPE BAPIHUKEY-HU_EXID.
loop at lt_pack_mat into ls_pack_mat.
wa_hukey = ls_pack_mat-HANDLING_UNIT.
MOVE wa_hukey TO hukey.
endloop.
Calling BAPI_HU_DELETE_FROM_DEL
CALL FUNCTION 'BAPI_HU_DELETE_FROM_DEL'
EXPORTING
DELIVERY = del
HUKEY = HUKEY
TABLES
RETURN = Return1.
Commit Work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
Chers,
Kris. -
Error reading data from an infocube
Hello,
I want to read data from a remote infocube in tcode listcube, and I get this 2 error messages: "Error reading the data of InfoProvider IC_SNP_DR" and "Error when generating program". This is a remote cube reading data from a SNP Planning Area.
I´ve already activated Plng Object Strucuture 9ASNPBAS and repair all infoobject but in tcode /SAPAPO/MSDP_ADMIN in 9ASNPBAS I get message "Not All InfoObjects Can Be Read". Is this why I get the error in reading the infocube?
Does anyone know why I get this errors and how to solve them?
Thanks and Regards,
Teresa LopesTeresa
From /SAPAPO/MSDP_ADMIN go to extras/data extraction tools. This gives you all the things you need to manage the extractors on the snp planning areas. you can use RSA3 to test the extractor and pull data to a list. Are you sure you want to extract using the total POS (9SNPBAS). Based on the data you need you might want to extract based on one of the standard SNP aggregates. MALO (material location) for example.
You mention that the POS was active. Make sure you Planning area is also initialized
George -
Read Data from "virtual" Cube with different ConsUnit Hier. Version
Dear all,
I got a odd request.
I need to load data from the virutal Reporting-Bapi Cube for a certain Data Version.
This Version has been attached to a new consUnit Hierachy a few weeks ago.
Now we get a request to read data in the past for units which are not present in the current hierarchy anymore.
I know that this is a general issue... but does anyone got a workaround for this?
Thanks in advance,
regards
OliverDear All,
Restamtent functionality did not help at this issue.
What we did a Copy of the Version and attached the "old" hierachy.
This was the only solution.
Regards
Oliver -
Need help in passing data from one page to other page in oaf
Dear All,
I have a requirement as below.
I am doing some selection in one page and populating the data in another page table region, next time when i am selecting another row and pressing the button i need to display the previous row as well as new row, how can i achieve this, currently i am able to see only the first row what i selected first.
Ex: 1 st scenario: after passing the selected data from one page to base page the data looks like below in base page.
1 test desc
2nd scenarios: when i am again selcting data and passing to the base page it should be like that
1 test desc
2 test desc
but currently it is showing
1 test desc only for the 2nd case, can any one please help me on thsi , its little bit urgent
ThnaksHow are you passing the values to the base page? Are you using setting the retainAM parameter to true while doing a forward.
-
Need help in writing data from JSP to excel
Hi ,
I need help in writing the data from JSP to excel.I somehow able to retrieve the data into excel but unable to get the required format.
For eg: The amount should be displayed in 0.00 format .when i am exporting it to excel it is displaying as 0 :( .
I am using the following code in JSP.
"out.print(amt + '\t');"
Would like to know if there is any otherway where in i can get my requirement.
Thanks
TomHi,
Try using format part of the JSTL tag libs.
Syntax :
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatNumber value="40" pattern="$#,##0.00"/>
I need help in writing the data from JSP to excel.I
somehow able to retrieve the data into excelHow do u convert the jsp to excel?
One way to convert the jsp page to excel, is to render it as an excel appl instead of html. Set the content type of the response to application/ms-excel.
response.setContentType("application/ms-excel")Hope this Helps.... -
Urgent help in reading data from oracle
Hi All
I was reading the data from an oracle database table through jdbc and storing them in an ArrayList, since there were around 1000 records and performing the action by iterating through the arrayList
But now the record count has gone up to 200000, so i don't want to store them in the ArrayList rather process them one after the other so that i can save the memory of the ArrayList
What are the best ways of achieving this, do i need to use some tools or anything, please let me know?
Any help would be greatly appreciated.
Thanks
DianaReading one record at a time from the database is very very very slow. I suggest keeping it in a large array. Memory is cheap. Read up on 'java -xmx' on how to increase the amount of memory available for java if you think you are running out of memory.
Do you really need all fields in a record and all records?
If still need to process all records, you can fetch a subset of records (say, 10000) and process them, then fetch another subset. Your sql may support fetching a subset but I dont recall the syntax. -
Need Help: Generate Customer Data from Prod Database
Hi All,
My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
PA/PA
APPLSYS/APPS
APPS/APPS
ALR/ALR
AX/AX
AK/AK
GL/GLRG/RG
FA/FAHR/HR
SSP/SSP
HXT/HXT
OTA/OTA
RLA/RLA
VEH/VEH
QA/QA
ICX/ICX
AZ/AZ
AP/AP
AR/AR
OE/OE
OSM/OSM
NSM/NSM2020
CN/CN
MFG/MFG
INV/INV
PO/PO
BOM/BOM
ENG/ENG
MRP/MRP
CRP/CRP
WIP/WIP
CZ/CZ
PJM/PJM
FLM/FLM
MSC/MSC
CS/CS
CE/CE
EC/EC
JG/JG
APPS/APPS
All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
Is that anybody got hands on this case before? UrgentWe have this table: And need to unload this table data in flat file format.
Need help with unload SQL file with these two columns:
AMT_PAID_ORIG, AMT_PAID_ADJ
SQL> desc flconv.claim_adj_less
Name Null? Type
SAK_CLAIM_ADJ_LESS NUMBER(10)
SAK_CLAIM_ADJ NUMBER(10)
ADJ_CLAIM_ICN NUMBER(13)
ORIGINAL_CLAIM_ICN NUMBER(13)
DATE_PAID_ORIG NUMBER(8)
DATE_PAID_ADJ NUMBER(8)
AMT_PAID_ORIG NUMBER(10,2)
AMT_PAID_ADJ NUMBER(10,2)
SAK_PROV_LOC NUMBER(9)
SAK_FUND_CODE NUMBER(9)
CHECK_SAK NUMBER(9)
SAK_PUB_HLTH NUMBER(9) -
Need help in transferring data from flatfiles to SAP R/3 tables
Hi,
I need to *transfer data in the flatfiles (NON SAP SYSTEM) to SAP R/3 tables*. Can we do it with a help of program ?
Please help me out
Thanks and regards,
Shiva shekar kHi Shiva,
This code will be helpful to you.
*Code used to create BDC
*& Report ZBDC *
*& Example BDC program, which updates net price of item 00010 of a *
*& particular Purchase order(EBELN). *
REPORT ZBDC NO STANDARD PAGE HEADING
LINE-SIZE 132.
Data declaration
TABLES: ekko, ekpo.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
waers TYPE ekko-waers,
netpr TYPE ekpo-netpr,
err_msg(73) TYPE c,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_error TYPE t_ekko,
it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_success TYPE t_ekko.
DATA: w_textout LIKE t100-text.
DATA: gd_update TYPE i,
gd_lines TYPE i.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
TITLE text-002. "New NETPR value
PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
*START-OF-SELECTION
START-OF-SELECTION.
Retrieve data from Purchase order table(EKKO)
SELECT ekkoebeln ekkowaers ekpo~netpr
INTO TABLE it_ekko
FROM ekko AS ekko INNER JOIN ekpo AS ekpo
ON ekpoebeln EQ ekkoebeln
WHERE ekko~ebeln IN so_ebeln AND
ekpo~ebelp EQ '10'.
*END-OF-SELECTION
END-OF-SELECTION.
Check data has been retrieved ready for processing
DESCRIBE TABLE it_ekko LINES gd_lines.
IF gd_lines LE 0.
Display message if no data has been retrieved
MESSAGE i003(zp) WITH 'No Records Found'(001).
LEAVE TO SCREEN 0.
ELSE.
Update Customer master data (instalment text)
LOOP AT it_ekko INTO wa_ekko.
PERFORM bdc_update.
ENDLOOP.
Display message confirming number of records updated
IF gd_update GT 1.
MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
ELSE.
MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
ENDIF.
Display Success Report
Check Success table
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM display_report.
ENDIF.
Display Error Report
Check errors table
DESCRIBE TABLE it_error LINES gd_lines.
If errors exist then display errors report
IF gd_lines GT 0.
Display errors report
PERFORM display_error_headings.
PERFORM display_error_report.
ENDIF.
ENDIF.
*& Form DISPLAY_COLUMN_HEADINGS
Display column headings
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records updated successfully:'(013).
WRITE:/ sy-uline(42).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(004), sy-vline,
(11) 'Old Netpr'(005), sy-vline,
(11) 'New Netpr'(006), sy-vline.
WRITE:/ sy-uline(42).
ENDFORM. " DISPLAY_COLUMN_HEADINGS
*& Form BDC_UPDATE
Populate BDC table and call transaction ME22
FORM bdc_update.
PERFORM dynpro USING:
'X' 'SAPMM06E' '0105',
' ' 'BDC_CURSOR' 'RM06E-BSTNR',
' ' 'RM06E-BSTNR' wa_ekko-ebeln,
' ' 'BDC_OKCODE' '/00', "OK code
'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
' ' 'EKPO-NETPR(01)' p_newpr,
' ' 'BDC_OKCODE' '=BU'. "OK code
Call transaction to update customer instalment text
CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
MESSAGES INTO messtab.
Check if update was succesful
IF sy-subrc EQ 0.
ADD 1 TO gd_update.
APPEND wa_ekko TO it_success.
ELSE.
Retrieve error messages displayed during BDC update
LOOP AT messtab WHERE msgtyp = 'E'.
Builds actual message based on info returned from Call transaction
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = messtab-msgid
msgnr = messtab-msgnr
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
IMPORTING
message_text_output = w_textout.
ENDLOOP.
Build error table ready for output
wa_error = wa_ekko.
wa_error-err_msg = w_textout.
APPEND wa_error TO it_error.
CLEAR: wa_error.
ENDIF.
Clear bdc date table
CLEAR: bdc_tab.
REFRESH: bdc_tab.
ENDFORM. " BDC_UPDATE
FORM DYNPRO *
stores values to bdc table *
--> DYNBEGIN *
--> NAME *
--> VALUE *
FORM dynpro USING dynbegin name value.
IF dynbegin = 'X'.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-program,
value TO bdc_tab-dynpro,
'X' TO bdc_tab-dynbegin.
APPEND bdc_tab.
ELSE.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-fnam,
value TO bdc_tab-fval.
APPEND bdc_tab.
ENDIF.
ENDFORM. " DYNPRO
*& Form DISPLAY_REPORT
Display Report
FORM display_report.
FORMAT COLOR COL_NORMAL.
Loop at data table
LOOP AT it_success INTO wa_success.
WRITE:/ sy-vline,
(10) wa_success-ebeln, sy-vline,
(11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
(11) p_newpr, sy-vline.
CLEAR: wa_success.
ENDLOOP.
WRITE:/ sy-uline(42).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. " DISPLAY_REPORT
*& Form DISPLAY_ERROR_REPORT
Display error report data
FORM display_error_report.
LOOP AT it_error INTO wa_error.
WRITE:/ sy-vline,
(10) wa_error-ebeln, sy-vline,
(11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
(73) wa_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form DISPLAY_ERROR_HEADINGS
Display error report headings
FORM display_error_headings.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(009), sy-vline,
(11) 'Netpr'(010), sy-vline,
(73) 'Error Message'(012), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. " DISPLAY_ERROR_HEADINGS -
Need help in storing data from JList into a vector
need help in doing the following.-
alright i click a skill on industryskills Jlist and press the add button and it'll be added to the applicantskills Jlist. how do i further store this data that i added onto the applicantskills JList into a vector.
here are the codes:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import java.util.*;
import java.util.Vector;
import javax.swing.JScrollPane.*;
//import javax.swing.event.ListSelectionListener;
public class Employment extends JFrame
//declare class variables
private JPanel jpApplicant, jpEverything,jpWEST, jpCENTRE, jpEAST, jpAddEditDelete,
jpCentreTOP, jpCentreBOT, jpEastTOP, jpEastCENTRE, jpEastBOT,
jpBlank1, panel1, panel2, panel3, panel4,jpBottomArea,
jpEmptyPanelForDisplayPurposes;
private JLabel jlblApplicantForm, jlblAppList, jlblName, jlblPhone,
jlblCurrentSalary, jlblPassword, jlblDesiredSalary,
jlblNotes, jlblApplicantSkills, jlblIndustrySkills,
jlblBlank1, jlblBlank2, ApplicantListLabel,
NotesListLabel, ApplicantSkillsLabel,
IndustrySkillsLabel,jlblEmptyLabelForDisplayPurposes;
private JButton jbtnAdd1, jbtnEdit, jbtnDelete, jbtnSave, jbtnCancel,
jbtnAdd2, jbtnRemove;
private JTextField jtfName, jtfPhone, jtfCurrentSalary, jtfPassword,
jtfDesiredSalary;
private JTabbedPane tabbedPane;
private DefaultListModel /*listModel,*/listModel2;
String name,password,phone,currentsalary,desiredsalary,textareastuff,NotesText;
String selectedname;
final JTextArea Noteslist= new JTextArea();;
DefaultListModel listModel = new DefaultListModel();
JList ApplicantSkillsList = new JList(listModel);
private ListSelectionModel listSelectionModel;
JList ApplicantList, /*ApplicantSkillsList,*/ IndustrySkillsList;
//protected JTextArea NotesList;
//Vector details = new Vector();
Vector<StoringData> details = new Vector<StoringData>();
public static void main(String []args)
Employment f = new Employment();
f.setVisible(true);
f.setDefaultCloseOperation(EXIT_ON_CLOSE);
f.setResizable(false);
}//end of main
public Employment()
setSize(800,470);
setTitle("E-commerce Placement Agency");
Font listfonts = new Font("TimesRoman", Font.BOLD, 12);
JPanel topPanel = new JPanel();
topPanel.setLayout( new BorderLayout() );
getContentPane().add( topPanel );
createPage1();
createPage2();
createPage3();
createPage4();
tabbedPane = new JTabbedPane();
tabbedPane.addTab( "Applicant", panel1 );
tabbedPane.addTab( "Job Order", panel2 );
tabbedPane.addTab( "Skill", panel3 );
tabbedPane.addTab( "Company", panel4 );
topPanel.add( tabbedPane, BorderLayout.CENTER );
public void createPage1()//PAGE 1
/*******************TOP PART********************/
panel1 = new JPanel();
panel1.setLayout( new BorderLayout());
jpBottomArea = new JPanel();
jpBottomArea.setLayout(new BorderLayout());
jpApplicant= new JPanel();
jpApplicant.setLayout(new BorderLayout());
Font bigFont = new Font("TimesRoman", Font.BOLD,24);
jpApplicant.setBackground(Color.lightGray);
jlblApplicantForm = new JLabel("\t\t\t\tAPPLICANT FORM ");
jlblApplicantForm.setFont(bigFont);
jpApplicant.add(jlblApplicantForm,BorderLayout.EAST);
panel1.add(jpApplicant,BorderLayout.NORTH);
panel1.add(jpBottomArea,BorderLayout.CENTER);
/********************************EMPTY PANEL FOR DISPLAY PURPOSES*************************/
jpEmptyPanelForDisplayPurposes = new JPanel();
jlblEmptyLabelForDisplayPurposes = new JLabel(" ");
jpEmptyPanelForDisplayPurposes.add(jlblEmptyLabelForDisplayPurposes);
jpBottomArea.add(jpEmptyPanelForDisplayPurposes,BorderLayout.NORTH);
/*****************************************WEST*********************************/
jpWEST = new JPanel();
jpWEST.setLayout( new BorderLayout());
//Applicant List
listModel2=new DefaultListModel();
ApplicantList = new JList(listModel2);
listSelectionModel = ApplicantList.getSelectionModel();
listSelectionModel.addListSelectionListener(new SharedListSelectionHandler());
JScrollPane scrollPane3 = new JScrollPane(ApplicantList);
ApplicantList.setPreferredSize(new Dimension(20,40));
scrollPane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
ApplicantListLabel = new JLabel( "Applicant List:");
jpWEST.add(ApplicantListLabel,"North");
jpWEST.add(scrollPane3,"Center");
jpBottomArea.add(jpWEST,BorderLayout.WEST);
/*********CENTRE*********/
jpCENTRE = new JPanel();
jpCENTRE.setLayout(new GridLayout(2,1));
jpCentreTOP = new JPanel();
jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
jpCENTRE.add(jpCentreTOP);
jpCentreTOP.setLayout(new GridLayout(6,2));
//Creating labels and textfields
jlblName = new JLabel( "Name:");
jlblBlank1 = new JLabel ("");
jtfName = new JTextField(18);
jlblBlank2 = new JLabel("");
jlblPhone = new JLabel("Phone:");
jlblCurrentSalary = new JLabel("Current Salary:");
jtfPhone = new JTextField(13);
jtfCurrentSalary = new JTextField(7);
jlblPassword = new JLabel("Password:");
jlblDesiredSalary = new JLabel("Desired Salary:");
jtfPassword = new JTextField(13);
jtfDesiredSalary = new JTextField(6);
//Add labels and textfields to panel
jpCentreTOP.add(jlblName);
jpCentreTOP.add(jlblBlank1);
jpCentreTOP.add(jtfName);
jpCentreTOP.add(jlblBlank2);
jpCentreTOP.add(jlblPhone);
jpCentreTOP.add(jlblCurrentSalary);
jpCentreTOP.add(jtfPhone);
jpCentreTOP.add(jtfCurrentSalary);
jpCentreTOP.add(jlblPassword);
jpCentreTOP.add(jlblDesiredSalary);
jpCentreTOP.add(jtfPassword);
jpCentreTOP.add(jtfDesiredSalary);
//Noteslist
jpCentreBOT = new JPanel();
jpCentreBOT.setLayout( new BorderLayout());
jpCENTRE.add(jpCentreBOT);
jpBlank1 = new JPanel();
// Noteslist = new JTextArea(/*Document doc*/);
JScrollPane scroll3=new JScrollPane(Noteslist);
scroll3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
NotesListLabel = new JLabel( "Notes:");
jpCentreBOT.add(NotesListLabel,"North");
jpCentreBOT.add(scroll3,"Center");
jpCentreBOT.add(jpBlank1,"South");
jpBottomArea.add(jpCENTRE,BorderLayout.CENTER);
/**********EAST**********/
//Applicant Skills Panel
//EAST ==> TOP
jpEAST = new JPanel();
jpEAST.setLayout( new BorderLayout());
jpEastTOP = new JPanel();
jpEastTOP.setLayout( new BorderLayout());
ApplicantSkillsLabel = new JLabel( "Applicant Skills");
JScrollPane scrollPane1 = new JScrollPane(ApplicantSkillsList);
scrollPane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
ApplicantSkillsList.setVisibleRowCount(6);
jpEastTOP.add(ApplicantSkillsLabel,"North");
jpEastTOP.add(scrollPane1,"Center");
jpEAST.add(jpEastTOP,BorderLayout.NORTH);
jpBottomArea.add(jpEAST,BorderLayout.EAST);
//Add & Remove Buttons
//EAST ==> CENTRE
jpEastCENTRE = new JPanel();
jpEAST.add(jpEastCENTRE,BorderLayout.CENTER);
jbtnAdd2 = new JButton("Add");
jbtnRemove = new JButton("Remove");
//add buttons to panel
jpEastCENTRE.add(jbtnAdd2);
jpEastCENTRE.add(jbtnRemove);
//add listener to button
jbtnAdd2.addActionListener(new Add2Listener());
jbtnRemove.addActionListener(new RemoveListener());
//Industry Skills Panel
//EAST ==> BOTTOM
jpEastBOT = new JPanel();
jpEastBOT.setLayout( new BorderLayout());
String[] data = {"Access97", "Basic Programming",
"C++ Programming", "COBOL Programming",
"DB Design", "Fortran programming"};
IndustrySkillsList = new JList(data);
JScrollPane scrollPane = new JScrollPane(IndustrySkillsList);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
IndustrySkillsLabel = new JLabel( "Industry Skills:");
jpEastBOT.add(IndustrySkillsLabel,"North");
jpEastBOT.add(scrollPane,"Center");
jpEAST.add(jpEastBOT,BorderLayout.SOUTH);
//BOTTOM
jpAddEditDelete= new JPanel();
jbtnAdd1= new JButton("Add");
jbtnEdit= new JButton("Edit");
jbtnDelete= new JButton("Delete");
jbtnSave= new JButton("Save");
jbtnCancel= new JButton("Cancel");
jpAddEditDelete.add(jbtnAdd1);
jpAddEditDelete.add(jbtnEdit);
jpAddEditDelete.add(jbtnDelete);
jpAddEditDelete.add(jbtnSave);
jpAddEditDelete.add(jbtnCancel);
jbtnEdit.addActionListener(new EditListener());
jbtnDelete.addActionListener(new DeleteListener());
jbtnEdit.addActionListener(new EditListener());
jbtnAdd1.addActionListener(new Add1Listener());
jbtnCancel.addActionListener(new CancelListener());
jpBottomArea.add(jpAddEditDelete,BorderLayout.SOUTH);
public void createPage2()//PAGE 2
panel2 = new JPanel();
panel2.setLayout( new GridLayout(1,1) );
panel2.add( new JLabel( "Sorry,under construction" ) );
public void createPage3()//PAGE 3
panel3 = new JPanel();
panel3.setLayout( new GridLayout( 1, 1 ) );
panel3.add( new JLabel( "Sorry,under construction" ) );
public void createPage4()//PAGE 4
panel4 = new JPanel();
panel4.setLayout( new GridLayout( 1, 1 ) );
panel4.add( new JLabel( "Sorry,under construction" ) );
public class Add1Listener implements ActionListener
public void actionPerformed(ActionEvent e)
name = jtfName.getText();
password = jtfPassword.getText();
phone = jtfPhone.getText();
currentsalary = jtfCurrentSalary.getText();
int i= Integer.parseInt(currentsalary);
desiredsalary = jtfDesiredSalary.getText();
int j= Integer.parseInt(desiredsalary);
StoringData person = new StoringData(name,password,phone,i,j);
// StoringData AppSkillsList = new StoringData(listModel);
details.add(person);
// details.add(AppSkillsList);
listModel2.addElement(name);
jtfName.setText("");
jtfPassword.setText("");
jtfPhone.setText("");
jtfCurrentSalary.setText("");
jtfDesiredSalary.setText("");
// NotesList.setText("");
public class Add2Listener implements ActionListener
public void actionPerformed(ActionEvent e)
String temp1;
temp1 = (String)IndustrySkillsList.getSelectedValue();
listModel.addElement(temp1);
public class RemoveListener implements ActionListener
public void actionPerformed(ActionEvent e)
int index = ApplicantSkillsList.getSelectedIndex();
listModel.remove(index);
public class EditListener implements ActionListener
public void actionPerformed(ActionEvent e)
jtfName.setEditable(true);
jtfPassword.setEditable(true);
jtfPhone.setEditable(true);
jtfCurrentSalary.setEditable(true);
jtfDesiredSalary.setEditable(true);
Noteslist.setEditable(true);
jbtnAdd2.setEnabled(true);
jbtnRemove.setEnabled(true);
jbtnSave.setEnabled(true);
jbtnCancel.setEnabled(true);
public class DeleteListener implements ActionListener
public void actionPerformed(ActionEvent e)
int index1 = ApplicantList.getSelectedIndex();
listModel2.remove(index1);
public class SaveListener implements ActionListener
public void actionPerformed(ActionEvent e)
public class CancelListener implements ActionListener
public void actionPerformed(ActionEvent e)
jtfName.setText("");
jtfPassword.setText("");
jtfPhone.setText("");
jtfCurrentSalary.setText("");
jtfDesiredSalary.setText("");
public class SharedListSelectionHandler implements ListSelectionListener
public void valueChanged(ListSelectionEvent e)
selectedname =ApplicantList.getSelectedValue().toString();
StoringData selectedPerson = null;
jtfName.setEditable(false);
jtfPassword.setEditable(false);
jtfPhone.setEditable(false);
jtfCurrentSalary.setEditable(false);
jtfDesiredSalary.setEditable(false);
Noteslist.setEditable(false);
jbtnAdd2.setEnabled(false);
jbtnRemove.setEnabled(false);
jbtnSave.setEnabled(false);
jbtnCancel.setEnabled(false);
for (StoringData person : details)
if (person.getName1().equals(selectedname))
selectedPerson = person;
jtfName.setText(person.getName1());
jtfPassword.setText(person.getPassword1());
jtfPhone.setText(person.getPhone1());
//String sal1 = Integer.parseString(currentsalary);
// String sal2 = Integer.parseString(desiredsalary);
// jtfCurrentSalary.setText(sal1);
// jtfDesiredSalary.setText(sal2);
break;
// if (selectedPerson != null)
}Quit posting 300 line programs to ask a question. We don't care about your entire application. We only care about code that demonstrates your current problem. We don't want to read through 300 lines to try and find the line of code that is causing the problem.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.
Here is a simple SSCCE. Now make your changes and if you still have problems you have something simple to post. If it works then you add it to your real application.
Learn to simplify your problem by simplifying the code.
import java.awt.*;
import javax.swing.*;
public class ListTest2 extends JFrame
JList list;
public ListTest2()
String[] numbers = { "one", "two", "three", "four", "five", "six", "seven" };
list = new JList( numbers );
JScrollPane scrollPane = new JScrollPane( list );
getContentPane().add( scrollPane );
public static void main(String[] args)
ListTest2 frame = new ListTest2();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.setSize(200, 200);
frame.setLocationRelativeTo( null );
frame.setVisible( true );
} -
Need help pulling correct data from MAS90
I am trying to pull data from payroll and am not getting the correct amounts. Part of the information is for the current pay period and the other information is for year to date data. The current information is coming from one file and the year to date from another file. I can get the correct information to pull if I insert only the current period fields or year to date fields, but when I have both in the report, I don't get the correct amounts to pull. I asssume this has to do with the linking of the fields. I have played with this and can't get it to work.
Thank you,
DebMAS90 is an OEM partner of ours. For database connectivity issues please contact them. Once connected if you have issues designing reports then we can help.
Maybe you are looking for
-
Is there a way for me to set up an event in iCal (in this case, a project deadline), with rules, and have iCal automatically set up reminders for different aspects of the project up to 8 weeks before the deadline? I would need fixed reminders, such a
-
Another pdf export problem with graphics missing
well, it seems that there have been quite a few export probs w/pdf. i created some somewhat complex graphic files (wine labels) using keynote. then transfered them over to pages so that i would be able to print them more easily. when transfering them
-
Adobe Flash Player 11 50% Install Error: Unknown Error.
I freshly installed Windows 7: Ultimate edition (32 bit) and It seemed I had no flash player so I went to go download the newest flash player and it goes through the proccess flawlessly until it hits 50% it fails and says "Error: Unknown Error" I tri
-
When I try to work in iPhoto it shuts down my iMac. I had a lot of problems with iPhoto in December and worked with an Apple Advisor then to rebuild my library and every thing was fine for a while... then the shut downs started happening. Randomly at
-
Oracle 11g dg4odbc OpenLink postgres odbc driver for Linux... Integer issue
We were using scuccessfully the openlink driver for postgres odbc driver to connect oracle and postgres in solaris and oracle 10g hsodbc we are migrating to Linux Oracle 11g and installed linux psotgres odbc driver and configured oracle 11g dg4odbc g