Displayin message and fixing the number of rows in a table

Hi Experts,
I have a requirement like this
there is a table, where i need to diplay a message when there are no records and no rows should be visible on that table.
Also, when the records are populated from the context, i need to fix the number of rows in that table and display the records.
Please let me know hw this can be achieved.
Also in the table I have Link to URL, please let me know how to handle this reference, when i set the reference Property, its giving me an error stating that the file doesn't exist when the table gets loaded.
Thanks in Advance
Regards,
Palani

Hi
Oh!!  You should to  explain it at first thread itself that you want to display a JPG imange or other WDWebResourceTypetaken form the backend.
1. So this is not at all a URL
2. You have to convert binary data to WDWebResource then display it in either Image UI element or other (like PDF , txt etc)
3
try
               //        Read the datasource of the FileUpload
               IWDResource res = wdContext.currentContextElement().getResource();
               InputStream in = res.read(false);
               ByteArrayOutputStream bOut = new ByteArrayOutputStream();
               int length;
               byte[] part = new byte[10 * 1024];
               while ((length = in.read(part)) != -1)
                    bOut.write(part, 0, length);
               in.close();
               bOut.close();
               IPrivateUploadCompView.IImageTableElement ele = wdContext.nodeImageTable().createImageTableElement();
               ele.setImage(wdContext.currentContextElement().getResource().getUrl(0));
               ele.setText(res.getResourceName());
               wdContext.nodeImageTable().addElement(ele);
          catch (Exception e)
               wdComponentAPI.getMessageManager().reportWarning(e.toString());
Here I assume that you convert that data to IWDResource type or
4.
WDWebResource.getWebResource(wdContext.currentContextElement().getresource(), type);
// getResource of type binary which u read from BAPI and set it in local context , type is MIMETYPE or hardcode it as "JPG"
5. Further help
   [Help1|To Displayan Image in Webdynpro Java from Standard Function Module;
[Help2|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumentstobeusedinWeb+Dynpro]
[Help3|http://wiki.sdn.sap.com/wiki/display/KMC/GettinganimagefromKMDocumenttobeusedinWeb+DynPro]
It might code look strange at first , please do some reserch in SDN ,I did my best at this level.
Best Regards
Satish Kumar

Similar Messages

  • Loop through a csv file and return the number of rows in it?

    What would be simplest way to loop through a csv file and
    return the number of rows in it?
    <cffile action="read" file="#filename#" output="#csvstr#"
    >
    <LOOP THROUGH AND COUNT ROWS>

    ListLen(). Use chr(13) as your delimiter

  • Sales Invoice - Fixing the number of rows isn't the solution. Ideas?

    Hi All,
    I have been working on converting the standard eBS Sales Invoice report to BIP over the past few weeks. I started to use the solution on Tim's blog:
    http://blogs.oracle.com/xmlpublisher/2007/03/27/
    For those people who haven't looked this, the solution uses variables to set and calculate the number of transaction rows to be displayed on a page. Filler rows are also inserted to pad out the page should the number of transaction rows be less that the number to be displayed on a page (if using this be careful though as there is a problem with the way the filler rows work as pointed out by Mike Parr in the comments of the blog http://blogs.oracle.com/xmlpublisher/2007/03/anatomy_of_a_template_ii_heade.html).
    This solution is fine if the size of the data in the transaction row is never long enough to cause it to wrap within a column. For example, in the Sales Invoice, it is common for the Invoice Line Description to wrap 3 or 4 lines within the column. When this happens, the rows per page method goes out of the window as the number that can physically fit on the page is reduced due to the single data row spanning multiple layout rows.
    I have had a good play around with fixing table row heights but to no avail. Also had a look at some of the standard RTF templates available in the latest release of R12. but couldn't find an example where this problem is addressed. I am 100% sure that someone must have hit this before so any advice and/or solutions would be greatly appreciated.
    Perhaps the solution for this could be incorporated into a future blog post or example?
    Cheers,
    Jon.

    Yep agreed. With fixed width fonts you could determine how many characters will display on a line but there is no telling where the word wrapping will occur. Suppose you could get really clever and use the position of the spaces to determine where the wraps will occur, then work out how many rows the line will take up (gulp!). Anyway, using fixed width fonts like courier will make the report look rubbish so I want to avoid this.
    A response from the Oracle bod's wouldn't go a miss on this? Tim, et al?
    Cheers,
    Jon.

  • TS1717 ATH.exe has stopped working.  How do I stop getting this error message and fix the problem?

    I keep getting the error message ATH.exe has stopped working. How do I fix the problem so I don't the error message anymore?

    There is a problem that Apple needs to fix (ha ha.. there are many but I digress) with ATH hanging after an ios device has been removed from the USB slot.
    Re-inserting the device creates a new ATH instance which has some kind of conflict with the existing (hung) instance.
    The solution is to end the process using CTRL-Alt-DEL and under processes there will mostlikely be two (or more). Kill them both, re-insert your device and it should sync OK.
    Apple - please fix this (and the firewall problem) immediately.

  • How to check the number of rows in a table with input data?`

    Dear all,
    I am having a table ( with declaration of 5 rows during the init ) there's a next button which will add another 5 rows by pressing. Let say the user ony key in 7 rows of data.. how should i track it? coz these data act as input to my bapi function. One of the input field of my bapi is to state how many rows of data that a user had key in. Thank you.

    I think ur problem is empty records, u dont want to process empty table rows.
    m I right?
    if yes then just before processing the data / records, check for empty records and remove unwanted rows from the node.
    for (int i = 0; i < TableNode.size(); i++)
             if all cells of row(i) are empty
                   remove row(i) from Table Node.
    OR if you dont want to remove empty rows from display (screen), then at the time of processing, transfer useful rows to a separate node and process that node.
    Best Regards
    Deepak

  • How to change the number displaying rows in a table

    Hi all,
    i have a table for resources in Debrief Work order (Standard Screen), we need to change the default displaying rows. inistially it displayed 3 empty rows.
    i tried to change the Records Displayed for the table but it did not affect.
    also it is possible to change the "Add 3 rows" button in the table to add for example 5 rows instead?
    any idea?
    Regards,
    Mahdi Charara

    Hi,
    Through personalization we can do.On standared page top right u will find personalization link.click on the clink next expand all there find apporiate table .Here u will fine reorder button set as u want display and save. then u can see the change.For add row functionality u need to extend the co.

  • Smartforms table: how to fix the number of rows to be display in the table.

    Hello.
    I´m having problems with a smartform. I have defined a window with 7 cm high. Then I have define a table to print the content of a table.
    I'm using the header, the main area, and the footer. It seems to be ok. But the main area is sizeble. I mean, that if in the table has 2 records, it dispaly the 2 records and inmediatly display the footer. It probably use only 3 cm of the 7 cm defined for the high of the window.
    And I want that the footer of the table would be display at the end of the 7 cm of the window. Is that posible ?
    Please, tomorrow we will have our kick off the module and this is the last issue we have.
    Thanks in advance for your help.

    Better idea wud be to create a WINDOW, just Below you Main window (After table) ..
    In Form Layout (Form Painter) you can fix this Window on any place , Pass the FOOTER text node over there  .. So you will get a Static FOOTER diplay ..
    That what you need ?? Let me know
    Edited by: Lokesh Tarey on Jul 22, 2010 7:15 AM

  • Count the number of rows in each table

    I have a list of table names, how to I write a query to find out the row count of each table.
    select table_name from all_tables a where owner='XXX' and num_row > 100
    or
    select table_name from all_tables a where owner='XXX' and sample_size > 100
    doesn't quite work.
    Why?
    Thanks in advance,
    Edited by: mpt_fz on Jan 12, 2010 12:06 PM

    Well, then another method learned from Michael ;)
    scott@ORCL>
    scott@ORCL>select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Elapsed: 00:00:00.14
    scott@ORCL>
    scott@ORCL>
    scott@ORCL>select table_name,
      2         DBMS_XMLGEN.getxmltype(
      3                                 'select count(*) c from '||table_name
      4                               ).extract('//text()').getnumberval() tot_rows
      5  from user_tables
      6  where iot_type is null
      7  or iot_type != 'IOT_OVERFLOW';
    TABLE_NAME                       TOT_ROWS
    A_TEST_TB_CASHFLOW                     14
    TEST_DUMMY                              1
    A_TEST_TB_CASHFLOW_N                    1
    TEST_CAST                               1
    DEPT                                    4
    EMP                                    14
    BONUS                                   0
    SALGRADE                                5
    EMP_DETAILS                             3
    T_EMP                                   0
    AUDIT_T                                 0
    TABLE_NAME                       TOT_ROWS
    C_C                                     4
    TRAIN_DET                               2
    TEST_COM_IMP                            2
    TIME_P                                  1
    PRI_UQ                                  4
    TEST_CHK                                0
    ANSHUMANSAHAISGENIOUS                   1
    T                                       1
    XEUROPE                                 2
    D_D                                     8
    PUBLICTRANSPORT                         4
    TABLE_NAME                       TOT_ROWS
    XASIA                                   2
    TF1                                     0
    TEST_HH                                14
    TEST_SWAP                               4
    REVIVE_XML                              3
    XGMT                                    1
    CUSTOMER_DET                            1
    FOURWHEELER                             2
    SPOOL_LOG                              13
    CITYTRANSPORT                           8
    T1                                      2
    TABLE_NAME                       TOT_ROWS
    T2                                      2
    A_A                                     1
    B_B                                     2
    AUTOMOBILE                              1
    XDUAL                                   1
    S_TEMP                                  0
    39 rows selected.
    Elapsed: 00:00:08.78
    scott@ORCL>Regards.
    Satyaki De.

  • XMLIndex: finding indexed XPaths and the number of rows in the path table

    Hi,
    I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
    In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
    I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
    If anyone knows a more straightforward way of doing this all advice is very much appreciated.
    Best Regards,
    Rasko Leinonen

    Thanks Marco,
    I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
    begin
    for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
    loop
    declare
    v_i BINARY_INTEGER := 1;
    v_id raw(8);
    v_len BINARY_INTEGER := 2;
    v_skip BINARY_INTEGER := 1;
    begin
    while v_i < utl_raw.length(v_row.path) and
    v_i + v_len <= utl_raw.length(v_row.path)
    loop
    v_i := v_i + v_skip;
    v_id := utl_raw.substr(v_row.path, v_i, v_len);
    --dbms_output.put_line(v_id);
    for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
    where ID = v_id )
    loop
    if rawtohex(v_row2.flags) = '01'
    then
    dbms_output.put('@');
    end if;
    dbms_output.put(v_row2.localname);
    if v_i + v_len < utl_raw.length(v_row.path)
    then
    dbms_output.put('/');
    end if;
    end loop;
    v_i := v_i + v_len;
    end loop;
    dbms_output.put_line('');
    end;
    end loop;
    end;
    Example output:
    RUN
    RUN/@accession
    RUN/@alias
    RUN/@instrument_model
    RUN/@run_date
    RUN/@run_center
    RUN/@total_data_blocks
    RUN/EXPERIMENT_REF
    RUN/EXPERIMENT_REF/@accession
    RUN/EXPERIMENT_REF/@refname
    RUN/DATA_BLOCK
    RUN/DATA_BLOCK/@name
    RUN/DATA_BLOCK/@total_spots
    RUN/DATA_BLOCK/@total_reads
    RUN/DATA_BLOCK/@number_channels
    RUN/DATA_BLOCK/@format_code
    RUN/DATA_BLOCK/@sector
    RUN/DATA_BLOCK/FILES
    RUN/DATA_BLOCK/FILES/FILE
    RUN/DATA_BLOCK/FILES/FILE/@filename
    RUN/DATA_BLOCK/FILES/FILE/@filetype
    RUN/RUN_ATTRIBUTES
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE

  • Count the number of rows in a workbook.

    Hi Experts , I have a requirement to count the number of rows in a WorkBook.Will it be possible to do this by creating a KeyFigure?Or are there any options in BEx to count and display the number of Rows.Many thanks for all your help.

    Hi
    In the query create a calculated key figure called 'Count' and put a formula as =1, then use this count where ever applicable..you can very well count the no. of rec.
    with this.
    Hope this helps..
    assign points if useful..
    Cheers,
    Pattan.

  • Number of rows in each table

    Hi
    How to find the number of rows in each table of a database by just using a SQL query,
    and should not use the data dictionary tables also... is there any way...??
    Thanks
    MJ

    It can be done in a single SQL like ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>SELECT table_name,
      2         DBMS_XMLGEN.getxmltype ('SELECT Count(*) c FROM ' || table_name).EXTRACT ('//text()').ge
    tnumberval() tot_rows
      3  FROM user_tables;
    TABLE_NAME                       TOT_ROWS
    QUESTIONTYPE                            0
    SRGROUPTABLE                            1
    ST_TEST                                 4
    REGISTER                                0
    DEB_1                                   2
    EMP1                                    0
    6 rows selected.
    Elapsed: 00:00:12.04Credit goes to Michael. ;)
    Regards.
    Satyaki De.

  • Determine Number of  rows in Internal Table

    Hi,
      I have defined my internal table as follows:
         TYPES : BEGIN OF ABC_KEY,
                  FIELD1(2)   TYPE C,
                  FIELD2(1)   TYPE C,
                  FIELD3(8)   TYPE N,
                  END OF ABC_KEY.
    DATA: itab1 TYPE TABLE OF ABC_KEY
                      WITH KEY FIELD1,
           wa_lines_1 LIKE LINE OF itab1.
    How can I retrieve the number of rows in Internal Table?
    Thanks.
    Regards,
    bw_newbie

    You can define the number of rows of the internal table using the DESCRIBE itab command .
    As the rest have already stated a sample code snippet .
    For more info type in DESCRIBE in your prgram and click on (F1) by placing the cursor on DESCRIBE .
    You will find more options as to how you can use the DESCRIBE command according to your requirement .
    Thanks ,
    Hari

  • How to retrieve number of rows of a table by jdbc?

    can anyone show me a simple snippet of a java code about how to retrieve the number of ROWS in a table?
    or even only showing the jdbc command that does this job would be enough.
    thanks in advance :)
    cheers

    1. query for the count, then execute the query
    "select count(*) from test" then
    "select * from test"
    2. create a scrollable ResultSet then
    rs.last();
    int count = rs.getRow();
    rs.beforeFirst();
    Jamie
    p.s. this topic has been discussed MANY times. Do a search on this forum and you will get lots of other discussions on this topic.

  • Does someone can fix my keyboard when I press the r- y ,f-h,v-n, they apears together. like this ry ry fh fh cn nv and 4 the number 4 and 6 too.HELPME

    Does someone can fix my keyboard when I press the r- y ,f-h,v-n, they apears together. like this ry ry fh fh cn nv and 4 the number 4 and 6 too.HELPME

    Bring it to an Apple store or AASP.

  • Can I "count" the number of rows excluding the header and footers

    I have some tables that consist of a different number of rows, as the number is part of an equation I need to know the number of rows excluding the header and footers. I have the work around in =ROWS(ColumnG)-3, but is there a tidier way? I want to be able to add footers (or headers) too and not have these counted.
    Many thanks
    Lee

    Hi Lee,
    Add a column to your table (for purposes of this discussion, the new column is placed before column C, and becomes the new column C). enter the formula below in all regular cells, but NOT in header or footer cells:
    =1
    Use the formula below, placed anywhere (except in a regular cell in column C) to get the number of non-header, non-footer cells:
    =COUNT($C)
    The first formula will automatically be placed in cells added to column C, and the results will change to reflect the added rows.
    Regards,
    Barry

Maybe you are looking for

  • HP Photosart 7520, printing photo from iMac iPhoto, OSX Yosemite 10.10.1 color issues

    First time ever tried printing a photo - on HP photo paper, using HP ink cartridges. It prints a color portrait accurately, except for eye glass frames and shadow shades which it prints in "green". I tried editing the same portrait in iPhoto to black

  • A problem with BIOS ??

    Hello, I have a HP pavilion dv3 and seems that my BIOS is down...when I turn on the PC, my screen just keeps flashing black and white...I tried to turn it on by pressing the windows key with B and power button what worked just once and then I turned

  • DEPRECIATION PROCESS IN ORACLE ASSETS(FADEPR)

    제품 : FIN_FA 작성날짜 : 2003-05-20 DEPRECIATION PROCESS IN ORACLE ASSETS(FADEPR) ============================================= PURPOSE Oracle Assets 에서의 depreciation process 를 간략하게 기술 Explanation DEPRECIATION IN ORACLE ASSETS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How can I make a TCP server for muticonnec​tion clients??

    Dear group, I try to change a complicated TCP server with only one client posibility to a multiclient. I've seen the examples, even some solution on the ni web, but I don't understand very well how it's works. I need also logging for each client in a

  • My screen has gone purple on my macbook pro what can i do ?

    my screen has gone purple with horizontal lines going through the screen i have a mac book pro