How can i add a table header using DefaultTableModel?
Im having problems finding examples of creating a table header using the DefaultTableModel. Can anyone point me in the right direction?
so far i am able to create a table and add rows, but i need the first row to be the header with title and i am not able to do that with this model.
Below is an excerpt of what i have thus far...
JTableHeader header = new JTableHeader();
checkOutTable.setModel(tableModel);
checkOutTable.setRowSelectionAllowed(true);
private DefaultTableModel tableModel = new DefaultTableModel(
new Object [][] {
{"Item ID", "Title", "Type", "Serial ID", "Status", "Response", "Print"},
new String [] {
"TITLE 1", "TITLE 2", "TITLE 3", "TITLE 4", "TITLE 5", "TITLE 6", "TITLE 7"
){Class[] types = new Class[] { java.lang.Object.class,
java.lang.Object.class, java.lang.Object.class,
java.lang.Object.class, java.lang.Object.class,
java.lang.Object.class, java.lang.Object.class };
public Class getColumnClass(int columnIndex) {
return types[columnIndex];
}};
Use the constructor that takes a Vector of column names and a row count.
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/table/DefaultTableModel.html#DefaultTableModel(java.util.Vector,%20int)
Similar Messages
-
How can you add a where clause using "OR" with applied ViewCriteria?
[JDeveloper 10.1.3 SU4]
[JHeadstart 10.1.3 build 78]
I am using JHeadstart, but have a question probably more in the ADF area. On the JHeadstart forum I asked:
"I am overriding JhsApplicationModule's advancedSearch in order to be able to search in childtables. I created transient attributes, display those in advanced search and in the overridden method I check if any of these are filled by the user and create a where clause like 'EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>)'. I add this whereclause using ViewObject.setWhereClause.
So far so good and it works. However, if the user selects 'Result matches any criteria', combining setWhereClause and the normal advancedSearch QueryByExample implementation using ViewCriteriaRow do not provide the desired result, since the ViewCriteria and the setWhereClause are AND-ed together, which is fine if the user selects the (default) "Results match all criteria" (everything is AND-ed) but not the "Result matches any criteria", since then every criterium is OR-ed together, except for the setwhereclause criteria and the set of ViewCriteriaRows, they are AND-ed.
I looked if I could specify that a WhereClause will be OR-ed to existing applied ViewCriteria, but no luck. Do I have to rewrite also advancedSearch's ViewCriteria implementation and write an entire setWhereClause implementation to be able to "OR" every criterium? Or any other suggestions? Can I look at the entire Where clause and rewrite it (after applyCriteria and setWhereClause are called on the VO)?
Toine"
Sandra Muller (JHeadstart Team) told me today: "This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. The question is: how can you add a where clause using "OR" if there are already one or more ViewCriteria applied?
To simplify the test case, you could create a simple ADF BC test client class in a test Model project without JHeadstart (in the test class, use bc4jclient + Ctrl-Enter), in which you first apply a few ViewCriteriaRows to a View Object and also add a where clause.
Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ? (This what I am doing now ;-))
Thanks,
Sandra Muller
JHeadstart Team
Oracle Consulting"
Anyone knowing the answer or am I asking for an enhancement?
ToineHi,
Can you SET your whereclause as follows ?
('Y' = <isAnd>
and EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> AND <another column in childtable> LIKE '<value supplied by user>))
OR ('N' = <isAnd>
AND EXISTS (SELECT 1 FROM <childtable> WHERE <column in childtable> = <column in EO's table> OR <another column in childtable> LIKE '<value supplied by user>))
) -
Hi Experts,
How can i get a file header using this method cl_gui_frontend_services=>gui_download
Thanks
BasuHi,
You can use the FM - GUI_DOWNLOAD to specify the headers. It can be done in the following manner -
TYPES: BEGIN OF ty_head, "Structure for header
h(10) TYPE c,
END OF ty_head.
DATA: it_head TYPE TABLE OF ty_head WITH HEADER LINE.
"Adding header details
it_head-h = 'Field1'.
APPEND it_head.
it_head-h = 'Field2'.
APPEND it_head.
it_head-h = 'Field3'.
APPEND it_head.
it_head-h = 'Field4'.
APPEND it_head.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = p_file
filetype = 'ASC'
write_field_separator = 'X'
header = '00' "<= note this
TABLES
data_tab = it_tab
fieldnames = it_head[] "<= Pass your header table here
EXCEPTIONS
OTHERS = 1.
Hope this helps.
Regards,
Himanshu -
How can I change excel column header using Labile.
Dear Experts,
How can i change excel column header using LabVIEW.
Thanks for any and all help!
M.S.Sivaraj.
Sivaraj M.S
CLDAs I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
Hope this helps
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How can I add a percssion instrument using creative sound bank mang
I have Creative Sound Blaster Li've 24bitHow can I add a percossion instrument using creative sound bank manger. I have a sound font for the Tabla which is an eastern percossion instrument. I want to use it in my MIDIs, But I don't know how. I use the creative sound bank manger and have no proplem with it, but I can't add a percssion. what should I do?
The link will look similar to
myPage.php?ID=myVariable -
How can i add a dynamic header value in to the pdf
I am using a AssemblerService (Invoke DDX) to modify a Pdf file. How can i enter a dynamic value into the header using ddx ?
DDX used
<DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd">
<PDF result="Out1">
<PDF source="Doc2">
<Header>
<Right>
<StyledText>
<p>"here i need to add a dynamic data from the process"</p>
</StyledText>
</Right>
</Header>
</PDF>
</PDF>
</DDX>
Thank You.Insertion Point is a placeholder Object which is used to dynamically replace while assembling. Search through the assmber guide to get any hints.
Nith -
How can I set "SOAPAction" http header using SAAJ
When I send soap request, http header's like below
SOAPAction: ""
But, I'd like to send like this
SOAPAction: "http://tempuri.org/HelloWorld"
How can I that using SAAJ ?
My code is
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
" <soap:Body>\n" +
" <HelloWorld xmlns=\"http://tempuri.org/\" />\n" +
" </soap:Body>\n" +
"</soap:Envelope>";
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(xml.getBytes()));
DOMSource domSource = new DOMSource(doc);
SOAPMessage message = MessageFactory.newInstance().createMessage();
message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");
message.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
message.getSOAPPart().setContent(domSource);
message.writeTo(System.out);
SOAPConnection connection = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage response = connection.call(message, helloURL);
connection.close();
SOAPBody body = response.getSOAPBody();
if ( body.hasFault() )
SOAPFault newFault = body.getFault();
System.out.println("SoapBody has fault.");
System.out.println("code=" + newFault.getFaultCodeAsName());
System.out.println("message=" + newFault.getFaultString());
System.out.println("actor=" + newFault.getFaultActor());
else
System.out.println("Call Successed.");
System.out.println(body);
}message.getMimeHeaders().addHeader("SOAPAction", "http://tempuri.org/HelloWorld");
-
How can i add two table data into third internal table see below
hi i insert diffferent table data into different internal table i did try to insert two different internal table data into third internal table by using move
but only single data is coming please help me
i want this two internal table data inot third internal table.
sELECT * FROM J_1IEXCHDR INTO CORRESPONDING FIELDS OF ITAB1 WHERE STATUS = 'P'.
SELECT * FROM J_1IEXCDTL INTO CORRESPONDING FIELDS OF ITAB2 WHERE LIFNR = J_1IEXCHDR-LIFNR.
AND DOCYR = J_1IEXCHDR-DOCYR,
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / ITAB1-LIFNR,
ITAB1-DOCNO,
ITAB1-EXYEAR,
ITAB1-BUDAT,
ITAB2-EXBED,
ITAB2-RDOC,
ITAB2-ECS.
ENDSELECT.
ENDSELECT.
thank you .hi
Two add two internal tables data. first we need to create third internal table with all the fields of first two internal tables.
later u move the two internal tables data to third internal table
by looping the internal table which have more records or depending on the requirement and move the corresponding fields of first internal table to the third internal table and use the read statement with condition based on primary key of first itab and get the corresponding data of 2table into 3table.
i am sending the sample code to u.
check it out. i think u will understand how to move.
select vbeln waerk netwr erdat audat kunnr
into table it_vbeln
from vbak
where vbeln in s_vbeln
and erdat in s_erdat.
if not it_vbeln[] is initial.
select kunnr name1
into table it_kunnr
from kna1
for all entries in it_vbeln
where kunnr = it_vbeln-kunnr.
endif.
loop at it_vbeln.
clear it_final.
it_final-vbeln = it_vbeln-vbeln.
it_final-waerk = it_vbeln-waerk.
it_final-netwr = it_vbeln-netwr.
it_final-erdat = it_vbeln-erdat.
it_final-audat = it_vbeln-audat.
read table it_kunnr with key kunnr = it_vbeln-kunnr.
it_final-name1 = it_kunnr-name1.
append it_final.
endloop. -
How Can I Add Pivot Tables of Excel Into JSP Pages
Hello all,
Basing upon a query to database, i wanted to add a Microsoft Excel pivot table functionality in JSP page [with the result of query].
Is it possible to create a Pivot Table in JSP with dynamic data from database ??
Can any body help me in solving this issue ???
Thanks & Regards
KrishnaThere are a few alternatives to doing this (depending on the clients you are serving this page up for).
Going the pure HTML
There is an open source project called JPivot which provides an HTML front end for Pivot Table (using tag libraries)
Going the Microsoft Office route there are a few options:
1) POI HSSF ( http://jakarta.apache.org/poi/index.html) allows you to "update" an existing Pivot table by replacing data values contained in a template pivot table.
2) Use the open source XELEM api (xelem.sourceforge.net) which produces SpreadsheetML (Micorsofts current XML file Format). At present, I don't believe this handles creating a pivot table from scratch (you have to manually create the Pivot Table template, read in the template (with XELEM) and update the data values in the template before writing it out. (the same holds true for POI)
3) Commercially the company I work for (www.workbeans.com) is writing a pure Java Pivot Table API that will allow you to create a Pivot Table in the Excel SpreadsheetML file format from scratch. (supported by Office 2000, XP and 2003). The Pivot table functionality isn't slated until a future release (Oct. 2005), so if you can wait until then we could help you further.
Best,
Eric
M. Eric DeFazio
Application Architect, workbeans
[email protected] -
How can I add check boxes without using the form widget?
I would like to use check boxes for our facets for our search engine. You can see an example below. Is there anyway to do this without using the form widget?
PJM - Site UpdatesIt is not possible to accomplish this with the Muse's Form Widgets. You may need to look for other online solutions and fetch the source code and add to the Muse page using the Insert HTML feature.
Cheers,
Vikas -
How can i add two table into one internal table
I WANT TO ADD THIS TWO DIFFERENT TABLE INTO ONE INTERNAL TABLE PLEASE HELP.
TABLES: J_1IEXCHDR, J_1IEXCDTL.
SELECT * FROM J_1IEXCHDR WHERE STATUS = 'P'.
WRITE: / J_1IEXCHDR-LIFNR,
J_1IEXCHDR-DOCNO,
J_1IEXCHDR-EXYEAR,
J_1IEXCHDR-BUDAT.
SELECT * FROM J_1IEXCDTL WHERE TRNTYP = J_1IEXCHDR-TRNTYP
AND DOCYR = J_1IEXCHDR-DOCYR
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / J_1IEXCDTL-EXBAS,
J_1IEXCDTL-EXBED,
J_1IEXCDTL-RDOC1,
J_1IEXCDTL-ECS.
ENDSELECT.
ENDSELECT.
THANKS IN ADVANCED.U have to link these 2 tables like this
<b>SELECT
J_1IEXCHDR~DOCNO
FROM J_1IEXCHDR inner join J_1IEXCDTL
on J_1IEXCHDRDOCYR = J_1IEXCDTLDOCYR
WHERE STATUS = 'P'.</b>
this is sample code only, and u have to check the F.key relationship.
Regards
Prabhu -
How can I add folders to mail, using Hotmail?
So, I just registered my hotmail to sync, but it only shows the inbox folder.
I would like it to work just like it does with my iphone 4s or iPad 3 (all my registered mails show the original folders of the mails).
I have already tried using Microsft Exchange account, but it asks me for a Server Adress which I doesn't know.
Any help would be great!actualy dont dowload Mbox from Fluent Factory, very poor app..... sorry but I've tried and there will never be any support from them when you need to.
but the good thing is that Hotmail and Outlook.com finally rolled out support for IMAP.
Incoming Mail Server: imap-mail.outlook.com
Outgoing Mail Server: smtp-mail.outlook.com
http://windows.microsoft.com/en-us/windows/outlook/send-receive-from-app
No more duplication issues once you switch over, and no need for a third party (mBox)software to bridge the missing feature gap. -
How can we add attachment in the PO using BAPI
How can we add attachment in the PO? I am using the BAPI_PO_CREATE1 function module to create the PO. I am getting a file from legacy system, this I need to add as an attachment into the particular PO through programming.
Note: After creation of PO the attachment should be available in ME23n transaction.REPORT ZBAPI_PO_CRATE.
data : PO_HEADER like BAPIEKKOC.
data : PO_HEADER_ADD_DATA like BAPIEKKOA.
data : PO_ITEMS like BAPIEKPOC occurs 0 with header
line.
data : PO_ITEM_SCHEDULES like BAPIEKET occurs 0 with
header line.
data : RETURN like BAPIRETURN occurs 0 with header
line.
DATA : BEGIN OF TAB OCCURS 0,
PO_NUMBER like BAPIEKKOC-PO_NUMBER,
DOC_DATE(10),
DOC_TYPE like BAPIEKKOC-DOC_TYPE,
CO_CODE like BAPIEKKOC-CO_CODE,
PURCH_ORG like BAPIEKKOC-PURCH_ORG,
PUR_GROUP like BAPIEKKOC-PUR_GROUP,
VENDOR like BAPIEKKOC-VENDOR,
PMNTTRMS like BAPIEKKOA-PMNTTRMS,
INCOTERMS1 like BAPIEKKOA-INCOTERMS1,
INCOTERMS2 like BAPIEKKOA-INCOTERMS2,
PO_ITEM like BAPIEKPOC-PO_ITEM,
MATERIAL like BAPIEKPOC-MATERIAL,
PUR_MAT like BAPIEKPOC-PUR_MAT,
ITEM_CAT like BAPIEKPOC-ITEM_CAT,
PLANT like BAPIEKPOC-PLANT,
NET_PRICE like BAPIEKPOC-NET_PRICE,
TAX_CODE like BAPIEKPOC-TAX_CODE,
DELIV_DATE(10),
QUANTITY like BAPIEKET-QUANTITY,
end of tab.
data: itab1 like alsmex_tabline occurs 0 with header
line.
DATA: gd_currentrow type i.
data : PURCHASEORDER like ekko-ebeln.
Data: tot_rec type i, "Total Records
gd_update type i, "Main Table Increement
Counter
gd_lines type i, "Success Table increement
Counter
w_textout like t100-text. "VARIABLE TO GET ERROR
LOG
data : begin of it_success occurs 0,
PURCHASEORDER LIKE ekko-ebeln, "PROJECT
end of it_success.
data : begin of it_error occurs 0,
pono like ekko-ebeln,
err_msg(73) TYPE c, "TO RETREIVE ERROR
MESSAGES
end of it_error.
data : pono like ekko-ebeln.
selection-screen begin of block b1 with frame.
skip 3.
parameter:p_infile like rlgrap-filename obligatory.
skip 3.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
PERFORM value_help.
start-of-selection.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_infile
i_begin_col = '1'
i_begin_row = '2' "Do not require
headings
i_end_col = '22'
i_end_row = '10000'
TABLES
intern = itab1
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. "Problem uploading
Excel Spreadsheet
endif.
*perform open_group.
sort itab1 by row col.
* Get first row retrieved
read table itab1 index 1.
* Set first row retrieved to current row
gd_currentrow = itab1-row.
loop at itab1.
* Reset values for next row
if itab1-row ne gd_currentrow.
append tab .
clear tab.
gd_currentrow = itab1-row.
endif.
case itab1-col.
when '0001'. "PGNAM
TAB-PO_NUMBER = itab1-value.
when '0002'. "RONAM
TAB-DOC_DATE = itab1-value.
when '0003'. "JVLEVEL
TAB-DOC_TYPE = itab1-value.
when '0004'. "FTTYPE
TAB-CO_CODE = itab1-value.
when '0005'. "LANG
TAB-PURCH_ORG = itab1-value.
when '0006'. "LTEXT
TAB-PUR_GROUP = itab1-value.
when '0007'. "LTEXT
TAB-VENDOR = itab1-value.
when '0008'. "LTEXT
TAB-PMNTTRMS = itab1-value.
when '0009'. "LTEXT
TAB-INCOTERMS1 = itab1-value.
when '0010'. "FTTYPE
TAB-INCOTERMS2 = itab1-value.
when '0011'. "FTTYPE
TAB-PO_ITEM = itab1-value.
when '0012'. "FTTYPE
TAB-MATERIAL = itab1-value.
when '0013'. "FTTYPE
TAB-PUR_MAT = itab1-value.
when '0014'. "FTTYPE
TAB-ITEM_CAT = itab1-value.
when '0015'. "FTTYPE
shift itab1-value left deleting leading space.
TAB-PLANT = itab1-value.
when '0016'. "FTTYPE
TAB-NET_PRICE = itab1-value.
when '0017'. "FTTYPE
TAB-TAX_CODE = itab1-value.
when '0018'. "FTTYPE
TAB-DELIV_DATE = itab1-value.
when '0019'. "FTTYPE
TAB-QUANTITY = itab1-value.
endcase.
endloop.
append tab.
clear tab.
sort tab by PO_NUMBER.
DELETE TAB WHERE PO_NUMBER = SPACE.
loop at tab.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-material
IMPORTING
OUTPUT = tab-material.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-PUR_MAT
IMPORTING
OUTPUT = tab-PUR_MAT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-vendor
IMPORTING
OUTPUT = tab-vendor.
concatenate tab-doc_DATE+4(4) tab-doc_DATE+2(2)
tab-doc_DATE+0(2)
into tab-doc_DATE.
concatenate tab-DELIV_DATE+4(4)
tab-DELIV_DATE+2(2)
tab-DELIV_DATE+0(2) into tab-DELIV_DATE.
pono = tab-PO_NUMBER.
if tab-po_number = pono.
PO_HEADER-DOC_DATE = tab-DOC_DATE.
PO_HEADER-DOC_TYPE = tab-DOC_TYPE.
PO_HEADER-CO_CODE = tab-CO_CODE.
PO_HEADER-PURCH_ORG = tab-PURCH_ORG.
PO_HEADER-PUR_GROUP = tab-PUR_GROUP.
PO_HEADER-VENDOR = tab-VENDOR.
PO_HEADER-PO_NUMBER = tab-PO_NUMBER.
PO_HEADER_ADD_DATA-PMNTTRMS = tab-PMNTTRMS.
PO_HEADER_ADD_DATA-INCOTERMS1 = tab-INCOTERMS1.
PO_HEADER_ADD_DATA-INCOTERMS2 = tab-INCOTERMS2.
PO_ITEMS-PO_ITEM = tab-PO_ITEM.
PO_ITEMS-MATERIAL = tab-MATERIAL.
PO_ITEMS-PUR_MAT = tab-PUR_MAT.
PO_ITEMS-ITEM_CAT = tab-ITEM_CAT.
PO_ITEMS-PLANT = tab-PLANT.
PO_ITEMS-NET_PRICE = tab-NET_PRICE.
PO_ITEMS-TAX_CODE = tab-TAX_CODE.
append po_items.
PO_ITEM_SCHEDULES-PO_ITEM = tab-PO_ITEM.
PO_ITEM_SCHEDULES-DELIV_DATE = tab-DELIV_DATE.
PO_ITEM_SCHEDULES-QUANTITY = tab-QUANTITY.
append PO_ITEM_SCHEDULES.
endif.
at end of PO_NUMBER.
CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
PO_HEADER = PO_HEADER
PO_HEADER_ADD_DATA =
PO_HEADER_ADD_DATA
* HEADER_ADD_DATA_RELEVANT =
* PO_ADDRESS =
* SKIP_ITEMS_WITH_ERROR = 'X'
* ITEM_ADD_DATA_RELEVANT =
* HEADER_TECH_FIELDS =
IMPORTING
PURCHASEORDER =
PURCHASEORDER
TABLES
PO_ITEMS = PO_ITEMS
* PO_ITEM_ADD_DATA =
PO_ITEM_SCHEDULES =
PO_ITEM_SCHEDULES
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_TEXT =
RETURN = RETURN
* PO_LIMITS =
* PO_CONTRACT_LIMITS =
* PO_SERVICES =
* PO_SRV_ACCASS_VALUES =
* PO_SERVICES_TEXT =
* PO_BUSINESS_PARTNER =
* EXTENSIONIN =
* POADDRDELIVERY =
if PURCHASEORDER <> space.
commit work.
ADD 1 TO gd_update.
it_success-PURCHASEORDER = PURCHASEORDER.
append it_success.
clear:PO_HEADER,PO_HEADER_ADD_DATA,PURCHASEORDER.
refresh : PO_ITEMS,PO_ITEM_SCHEDULES,RETURN.
ELSE.
loop at return.
it_error-pono = tab-PO_NUMBER.
it_error-err_msg = return-MESSAGE .
Append it_error.
ENDLOOP.
clear:PO_HEADER,PO_HEADER_ADD_DATA,PURCHASEORDER.
refresh : PO_ITEMS,PO_ITEM_SCHEDULES,RETURN.
endif.
endat.
endloop.
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_SUCESS.
ENDIF.
* IF SUCESS FAILS Display Error Report
DESCRIBE TABLE it_error LINES gd_lines.
IF gd_lines GT 0.
PERFORM errorheadings.
PERFORM errorreport.
ENDIF.
*& Form display_column_headings
* text
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records inserted
successfully:'(013).
WRITE:/ sy-uline(15).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase order'(004), sy-vline.
WRITE:/ sy-uline(15).
ENDFORM. "display_column_headings
*Subroutine to display SUCESS REPORT
FORM DISPLAY_SUCESS.
FORMAT COLOR COL_NORMAL.
LOOP AT it_success.
WRITE:/ sy-vline,
(10) it_success-PURCHASEORDER, sy-vline.
CLEAR it_success.
ENDLOOP.
WRITE:/ sy-uline(15).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. "
DISPLAY_REPORT
*& Form errorreport
* text
FORM errorreport.
LOOP AT it_error.
WRITE:/ sy-vline,
(10) it_error-pono, sy-vline,
(40) it_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
endform. "errorreport
*& Form ERRORHEADINGS
* text
FORM ERRORHEADINGS.
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) 'ERROR.'(009), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. "ERRORHEADINGS
**& Form value_help
** text
** --> p1 text
** <-- p2 text
FORM value_help .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',*.*,*.*.'
MODE = 'O'
TITLE = ' '
IMPORTING
FILENAME = p_infile
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
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. "value_help -
How can I add a new column in compress partition table.
I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
COMPRESS PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
Note :
When I create table with this clause it will allow me to add a column.
CREATE TABLE Employee
Empno Number,
Tr_Date Date
PARTITION BY RANGE (Tr_Date)
PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
PARTITION JUNK Values LESS THAN (MAXVALUE));
But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.Hi Fahed,
I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
Topic : When to Use Table Compression
Bug
Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
BUG:<2421054>
Affects: RDBMS (9-A0)
NB: FIXED
Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
Details:
This is an enhancement to allow "ALTER TABLE" to ADD/DROP
columns for tables using the COMPRESS feature.
In 9i errors are reported for ADD/DROP but the text may
be misleading:
eg:
ADD column fails with "ORA-22856: cannot add columns to object tables"
DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
Note that a table which was previously marked as compress which has
now been altered to NOCOMPRESS also signals such errors as the
underlying table could still contain COMPRESS format datablocks.
As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
Best Regards,
Muhammad Waseem Haroon
[email protected] -
How can I add a new record in an Access table.
How can I add a new record in access with LabView, using activex, without using the database connectivity tools.
Message Edited by Noawena on 05-16-2008 09:25 AMMuch easier with a toolkit but you could use ADO objects,
get connection, make a SQL object "INSERT record INTO table where ...."
Execute the parameterized query
Free up record sets data
close connection when done.
This is a very simplified version
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Maybe you are looking for
-
Iphone 5 - can't delete albums in the albums no minus sign when in edit
I need to free up storage on my Iphone 5...when I am in ALBUMS ...I chose EDIT and NO MINUS sign appears to the left. I have old photo albums from a blackberry torch and photos from various camers got loaded up I am guessing through Itunes on a PC t
-
EJB problem (Seam 2.1.2 + WLS 10.3)
Hi, I'm having some problems getting the EJB version of the booking example in Seam 2.1.2 working with WebLogic 10.3, and I'm hoping that someone here might have some advice. I followed the instructions in Chapter 39 of the Seam documentation for bui
-
Waiting time between entry posting in R/3 and avail. in BW
Dear SAP community, We have set up a process chain which gives us the freedom to load GL account into BW on an ad-hoc basis. Unfortunately it is not really ad-hoc after we have posted an entry in GL account in R/3 we need to wait approximately 1 hou
-
Hi, For some reason, the popup window link in my Flash website opens up a popup which doesn't behave to the window size rules I set. The website is www.caveataudiens.net , click on the 'music' button, and then on the Jukebox button to see as example.
-
Portlet Consumer Error - automatically refreshing portlets
Hi, I am developing ADF webcenter apllication (Jdev 11.1.1.7) and i am using portlets to display summary information. When i deploy my application in server, portlets are automatically refreshing for every 2,3 secs finally i got "Portlet Consumer Err