Obtain Data Table header Dynamicaly
Hi all,
I have a requirment.
user will give the name of a database table and all the field-header (i.e. Field labels) will be stored in a internal table.
Is there any FM , suitable for that.
Thanks in advance.
Regards,
Anirban
Hello
DB_GET_TABLE_FIELDS
Similar Messages
-
Data table header facet with multiple components?
Hi,
I have a data table to which I wish to add buttons to change the sort order of the items displayed. However when I add the 'buttons' to the 'header' facet I get strange results - some components are shown, some are not, and the order they appear seems almost random.
Is the header / footer facet designed only for one component - or can I combine them somehow?
Code snippet is
<h:dataTable id="table" rowClasses="oddRow,evenRow" width="80%"
value="#{ControllerBean.orderedResults}" var="meet">
<h:column>
<f:facet name="header">
<h:commandLink action="#{ControllerBean.setOrder}">
<h:graphicImage value="/img/up.gif" style="border: 0px" />
<f:param name="order" value="up-title" />
</h:commandLink>
<h:outputText value="#{msgs.title}" />
<h:commandLink action="#{ControllerBean.setOrder}">
<h:graphicImage value="/img/down.gif" style="border: 0px" />
<f:param name="order" value="down-title" />
</h:commandLink>
</f:facet>
<h:outputText id="meetTitle"
value="#{meet.title}" />
</h:column>
etc..
So to be clear - I want a header that contains two graphic buttons separated by the text. When I run this code as is here, I get just the 'down' button, but by changing the order I can sometimes get the down button and the text......
Cheers
ReelingYes, you can place it in a panelGrid or panelGroup component.
The following is an excerpt from a book:
TIP: To place multiple components in a table header or footer, you must
group them in an h:panelGroup tag, or place them in a container component
with h:panelGrid or h:dataTable. If you place multiple components in a facet, only the
first component will be displayed.
Thus you could have something like:
<f:facet name="header">
<h:panelGrid columns="1">
<h:outputText value="#{fields.recordings}" style="font-weight: bolder" />
<h:panelGroup>
<h:outputText value="#{fields.type}" style="font-weight: bolder"/>
<h:outputText value="#{fields.date}" style="font-weight: bolder"/>
<h:outputText value="#{fields.time}" style="font-weight: bolder"/>
</h:panelGroup>
</h:panelGrid>
</f:facet> -
How to hide the table header if no data present
Hi
I need to hide the table header if no data present. Table has 5 column. if no any clolumn has data then this table section should not be display.
i am using <?if:count(Installation_Event_S19)= 0?> but this is not work for me.
Could you please help me out.
Thanks
Indrajeet KumarHi Priya,
Thank you very much !!! its work fine.
Thanks
Indrajeet Kumar -
Project cost plan Header Data table ( PS module - T.code CJR2)
Hi,
I am working on PS module where we have to build a integration between PS Cost plan (At WBS Element level) to SD Quotation. I have to use transaction CJR2 for this. we will add the custom field 'Indicator' on the initial screen of transaction CJR2 for this. I want to know what is the HEADER DATA table for Project Cost Plan, so i can add this custom field in that table and letter on use in CJR2.
If someone have done any kind of modification for work on CJR2 transaction, please provide me some information on this since i am first time working on PS module. I need some information on modifying the initial screen on transaction CJR2.
Any inputs will be appreciated.
Thanks,Hi,
you'll find Project cost plan in tables RPSCO / COSP
regards Andreas -
How to swap column-data along with Table header
Hi All!
I found a smple JTableDemo.java class. When I run it it provided sorting on the table as well as Dragging Column-data along with Table header while swaping two columns-headers.
I designed my own table and apply some changes to TableModel. Afterwords it swaps Table-Headers only, but not their respective columns.
Can someone give me a clue for that, where the logical error may be?
Thanx in Advancesurprised.. since you have asked, it must have some more tricky issue. Any way what i thought of it
in before insert on table2
simply insert into table1 (cr_id) values (:new.cr_id_id);
i assume that table1 pk does not generated through sequence
proposed insertion will not violate the uniqueness and create another record only in table1
what is thehidden agenda for not using simple before insert trigger as above.
yours
dr.s.r.bhattachar -
Create Quotation by sending different partner data to header & item table in a Report
Hello all,
Can any one please guide me how can I send different Partner data to Header & Item by running a Z Quotation Report in SE38. Actually Now I am able to create a Quotation which takes same Partner data of Header to Item data as well but my requirement is to send different Partner data to Header & Item in a quotation.
If you have sample code for the same please do share. I will be thankful to you.
Waiting for helpful suggestions.
Regards
-AjayHi Ajay,
I was referring to CRM_PARTNER_MAINTAIN_MULTI_OW and CRM_PARTNER_MAINTAIN_SINGLE_OW function modules. A sample working code (written in badi) for an order below.
l_wa_partner_com-partner_no = l_v_bp_guid.
l_wa_partner_com-partner_fct = l_c_partner_fct.
l_wa_field_names-fieldname = l_c_field_partner.
INSERT l_wa_field_names INTO TABLE l_i_input_fields.
l_wa_field_names-fieldname = l_c_field_fct.
INSERT l_wa_field_names INTO TABLE l_i_input_fields.
** Update the order with new partners
CALL FUNCTION 'CRM_PARTNER_MAINTAIN_SINGLE_OW'
EXPORTING
iv_ref_guid = is_orderadm_h_wrk-guid
iv_ref_kind = l_c_ref_kind " Pass B here in u'r case
is_partner_com = l_wa_partner_com
CHANGING
ct_input_field_names = l_i_input_fields
EXCEPTIONS
error_occurred = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
Thanks,
Faisal -
I18n: text label of Table Header of Data Table Component
hi all
JSC Hangs when i try to change text label of Table Header (Column) of Data Table Component to my favorite language for example Arabic or Persian Language.
is this bug!!!Hi,
Please take a look at the tutorial Internationalization at
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
may help you
regards -
Change Data Table column header color
How do I change the background color displayed in data table column headers?
Thanks for your response. Problem is that I'm creating a portlet and the stylesheet.css file does not appear to exist, so Winston's blog does not help.
-
Abap code not working - deleting based on master data table information
Hi,
I wrote a piece of code earlier which is working and during test we found out that it will be hard for the support guys to maintain because it was hard coded and there is possibility that users will include more code nums in the future
sample code
DELETE it_source WHERE /M/SOURCE EQ 'USA' AND
/M/CODENUM NE '0999' AND
/MCODENUM NE '0888' AND.
Now I created a new InfoObject master data so that the support people can maintain the source and code number manually.
master data table - the codenum is the key.
XCODENUM XSOURCE
0999 IND01
0888 IND01
now I wrote this routine all the data gets deleted.
tables /M/PGICTABLE.
Data tab like /M/PGICTABLE occurs 0 with header line.
Select * from /M/PGICTABLE into table tab where objvers = 'A'.
if sy-subrc = 0.
LOOP at tab.
DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM NE tab-XCODENUM.
ENDLOOP.
Endif.
But when I chage the sign to EQ, I get opposite values , Not what I require.
DELETE it_source WHERE /M/SOURCE EQ tab-XSOURCE AND /M/CODENUM EQ tab-XCODENUM.
Cube table that I want to extract from
/M/SOURCE /M/CODENUM
IND01 0999
IND01 0888
IND01 0555
IND01 0444
FRF01 0111
I want to only the rows where the /M/CODENUM = 0999 and 0888 and i would also need FRF101
and the rows in bold should be deleted.
thanks
Edited by: Bhat Vaidya on Jun 17, 2010 12:38 PMIt's obvious why it deletes all the records. Debug & get your answer i wont spoon feed
Anyways on to achieve your requirement try this code:
DATA:
r_srce TYPE RANGE OF char5, "Range Table for Source
s_srce LIKE LINE OF r_srce,
r_code TYPE RANGE OF numc04,"Range table for Code
s_code LIKE LINE OF r_code.
s_srce-sign = s_code-sign = 'I'.
s_srce-option = s_code-option = 'EQ'.
* Populate the range tables using /M/PGICTABLE
LOOP AT itab INTO wa.
s_code-low = wa1-code.
s_srce-low = wa1-srce.
APPEND: s_code TO r_code,
s_srce TO r_srce.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM:
r_code COMPARING ALL FIELDS,
r_srce COMPARING ALL FIELDS.
* Delete from Cube
DELETE it_source WHERE srce IN r_srce AND code IN r_code. -
Getting selected values from a data table
My data table gets values directly from a result set.
I went through http://balusc.blogspot.com/2006/06/using-datatables.html#top ,
however, the data table shown in this example takes values from a simple list. I have trouble in getting selected values.
Can anyone suggest how to select multiple values. here is a small code sample of what I have
SessionBean
ResultSet rs= db.retrieve_draft();
datamodel = new ResultSetDataModel();
datamodel.setWrappedData(rs);This is the JSF
<h:dataTable binding="#{Engineer.dataTable1}" headerClass="list-header" id="dataTable1"
rowClasses="list-row-even,list-row-odd" style="left: 144px; top: 192px; position: absolute"
value="#{SessionBean1.datamodel}" var="currentRow">
<h:column id="column1">
<h:outputText id="outputText77" value="#{currentRow['report_number']}"/>
<f:facet name="header">
<h:outputText id="outputText78" value="Report Number"/>
</f:facet>
</h:column>Edited by: ktip on Jul 29, 2008 11:04 AMHere is what I was doing :
This is my Session Bean (viz. SessionBean1)
private CachedRowSetDataProvider draft_infoDataProvider;
private CachedRowSetXImpl draft_RowSet;
public CachedRowSetDataProvider getDraft_info() {
return draft_infoDataProvider;
public void setDraft_info(CachedRowSetDataProvider draft_info) {
this.draft_info = draft_infoDataProvider;
public CachedRowSetXImpl getDraft_RowSet() {
return draft_RowSet;
public void setDraft_row(CachedRowSetXImpl draft_row) {
this.draft_row = draft_RowSet;
public void get_drafts()
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3308/test";
String dbUser = "root";
String dbPassword = "adminadmin";
con = DriverManager.getConnection(url, dbUser, dbPassword);
String sql="SELECT report_id from reports WHERE status='Draft' ";
ResultSet rs=null;
try
Statement stmt1=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs=stmt1.executeQuery(sql);
draft_RowSet=new CachedRowSetXImpl();
draft_RowSet.populate(rs);
draft_infoDataProvider=new CachedRowSetDataProvider(draft_RowSet);
result="ok";
catch(SQLException e)
System.out.println(e);
result="fail";
Here is my jsp page (developed in Netbeans 6.1) showing the data table
<webuijsf:table augmentTitle="false" binding="#{Engineer.table1}" clearSortButton="true" deselectMultipleButton="true"
id="table1" selectMultipleButton="true" sortPanelToggleButton="true"
style="left: 48px; top: 144px; position: absolute; width: 450px" title="Table" width="0">
<webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{SessionBean1.draft_infoDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="report_number" id="tableColumn1" sort="test_report.report_number">
<webuijsf:staticText id="staticText1" text="#{currentRow.value['reports.report_id]}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>Doing all this just resulted in a javax.Naming.Exception : Data Source is null
I tested this piece of code to give me the number of rows in the underlying rowset and it worked well. But somehow I could not get to display the data. Am I missing something?
Edited by: ktip on Jul 31, 2008 1:21 PM -
I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ?Hi Amol,
According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
In Reporting Services, when exporting to excel file, it has limitation for textbox.
Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
Reference:
Exporting to Microsoft Excel (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
How to obtain date of creation if image is obtained using getImage()
When Image is obtained using getImage() method , how to
obtain date of creation or another header value if image is
obtained using getImage method.Actually, some formats do indeed have creation or modification dates built in. e.g. http://www.w3.org/TR/PNG-Chunks.html#C.tIME. (Of course since most programs save a new copy of the file every time, the two dates are the same.) However, just because formats have this data doesn't mean it's reliable or even present. Your best bet is to pass creation dates in an Applet param tag for applets (assuming you were referring to Applet.getImage()) or to parse out a filename from a classloader URL and use a File object to check (assuming you were instead referring to Toolkit.getImage(URL)). That's the best answer I have without knowing more about what you are trying to accomplish.
-
Please give me idea now I compile all branch data in head office only new r
Hi master
Sir I have 5 office In different city and one head office in Karachi all branch have same oracle system my question is how I get new data and compile for accumulative reporting
I want only new record and modify record not old record
Old record already I import
When I use oracle import and export tool that no give me right result
If xxx table exists in database then import tool not replace and no insert or no replace with previous data with new modify data
Such as
First time
V_no=897 have debit amount 3998 is Islamabad branch and i export form Islamabad and import in Karachi office
Next time
Islamabad office change v_no=897 debit amount with 76555 and add many new record
I export form Islamabad and import in Karachi office but system no change and not add new record in Karachi office
Please give me idea now I compile all branch data in head office only new record and modify record
Thanks
aamirHere a very simple example with table EMP, assuming source table has a primary key. Firstly you create a materialized view log on source table (necessary for fast refresh) :
SYS@db102 SQL> conn test/test
Connected.
TEST@db102 SQL> create materialized view log on emp including new values;
Materialized view log created.
TEST@db102 SQL> then at destination DB/user :
TEST@db102 SQL> conn scott/tiger@test10
Connected.
SCOTT@test10 SQL> create database link test
2 connect to test identified by test
3 using 'db102';
Database link created.
SCOTT@test10 SQL> create materialized view emp_mv
2 refresh fast
3 as select * from emp@test;
Materialized view created.
SCOTT@test10 SQL>Now emp_mv is the exact copy of emp. To refresh the MV, to reflect changes :
SCOTT@test10 SQL> exec dbms_mview.refresh('EMP_MV','F');
PL/SQL procedure successfully completed.
SCOTT@test10 SQL> ...but I strongly recommend you to read the documentation... -
How to add the Row count(number of rows in table) in the table header?
Hi,
I'm having a table. This table is viewed when i click on a search button.
<b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
How to do this? could any one explain me with the detailed procedure to achieve this.
Thanks & Regards,
SureshIf you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
int numRows = wdContext.node<TableDataSourceNode>().size();
String text = wdComponentAPI.getTextAccessor().getText
IMessage<ComponentName>.TABLE_HEADER_TEXT,
new Object[] { String.valueOf(numRows) }
wdContext.currentContextElement().setTableHeaderText(text);
Maybe you want to provide a separate message for the case that there are no entries.
Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
Armin -
JSF-Data Table displaying all data in a single row
Hi Guys,
Im new to JSF, im trying to display the details from a List in a data table, but all the details are getting displayed in a single cell instead of displaying as rows, can someone help me with this problem?You need post your code so that we can view it.
This is an example of dataTable
<h:dataTable border="1" id="qresults" cellpadding="4" styleClass="subjectQRTbl" cellspacing="4" value="#{wormingList.worming}" var="bbr" first="#{wormingList.firstRowIndex}" rows="#{wormingList.noOfRows}" rowClasses="evenRow,oddRow">
<h:column>
<f:facet name="header">
<h:outputText escape="false" value="Vaccination Date" />
</f:facet>
<h:commandLink id="locnum" action="#{appAction.getWormingRecord}" title="Update Worming History Record">
<h:outputText value="#{bbr.dateWormed}">
<f:convertDateTime pattern="MM/dd/yyyy"/>
</h:outputText>
<f:param name = "recordId" value ="#{bbr.id}" />
</h:commandLink>
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText escape="false" value="Vaccination Type" />
</f:facet>
<h:outputText value="#{bbr.type}" styleClass="readOnly" />
</h:column>
<h:column>
<f:facet name="header" >
<h:outputText value="Vaccination Dosage" />
</f:facet>
<h:outputText value="#{bbr.dosage}"styleClass="readOnly"/>
</h:column>
</h:dataTable>
Hope this helps
Maybe you are looking for
-
E61: Compatibility issue with Excel sheets
Hello, I am having difficulties transferring an Excel file from my E61 to my laptop running Office 2007: I had originally written the file in Office 2003 and I have now added two more sheets to the file and renamed the original sheet on my E61. When
-
I have Photoshop CC on my main iMac. I'd like to put it on my backup iMac. Is that possible to do without buying another membership?
-
Promise T3 and port multiplier function
I have a K9A2 Platinum mobo. It has a Promise T3 controller for the ESata ports. I can find no documentation on this controller, so maybe the company who made them went out of business. I am looking for the information about this controller of whethe
-
Getting Core dump on getting environment variable
I first found this problem trying to display my GUI in jdk1.5.0_05. I have located it to be core dumping in the JNI C code for getting the envrionment, specifically Java_java_lang_ProcessEnvironment_environ. I wrote some test code to just call System
-
Visio workflow is not imported in SharePoint Designer 2010
Hi, I created a workflow in Visio 2010 Professional, however when I try importing into SharePoint Designer, I do not see it appearing in a different tab. There was no error during the import, but it is not imported. Must I use Visio 2010 Premium only