Trouble displaying referred value in Table component

My need:
I have a database table (call it Table A) that I'd like to display, row-by-row, but I have several columns (say, columns 1 and 2) that store integer values which, in turn, reference lookup tables (call them Tables B and C). Rather than display the integer values from Table A's columns 1 and 2, I'd like to substitute the equivalent String values from lookup Tables B and C in my visual Table component.
What's the best way of achieving this? I currently retrieve data from a simple CachedRowSet stored in my SessionBean1 (it's just a SELECT * from Table A), but I suppose I could create a new CachedRowSet that joins to Tables B and C for the values in Table A's columns 1 and 2.
Is there a better (maybe even simpler and more elegant) way?

You could right-click on the rowset in the Outline window and choose Edit to open the query editor. You can drag in tables B and C, and elminiate any columns you don't need.
You can have several dataproviders bound to this rowset, and tables bound to the dataproviders. You can choose which columns to display in each table.
See http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/databoundcomponents.html
Chris

Similar Messages

  • Accessing list of DISPLAY objects in a table component.

    Hi there,
    I am using a class that extends ObjectListDataProvider to populate a JSF table component.
    I need to access the list of objects that are actually displayed currently in the table. The table uses pagination so there are other table elements not displayed and I do not want those.
    Can someone help me?
    thanks

    Hello,
    I've been working with this method and it works good with pagination as far as you do not start to sort the table... it starts to append new rows at the end.
    The only workaround I've found so far is to call clearSort() before getting the ids... but that is just partially nice...
    So, maybe I'm doing something wrong or maybe there is a bug that could be fixed in 1.2?
    Regards,
    Rob

  • Listbox displaying dynamic values in table control

    Hi Experts,
    The requirement that I have is that there are two columns in an internal table out of which second one is a listbox.
    There is a need of displaying dynamic values in a row in a listbox according to value entered in first column of the same row, not affecting the listbox values in other rows.
    I am using VRM_SET_VALUES for populating listbox, but it results in populating the listbox in all other rows also.
    Please help.
    Thanks,
    Garima

    Hi Thanks for the link..
    But my problem is something else.
    I want the same listbox of a column in a table control to show me different values in different rows on the basis of value in another column .
    Regards,
    Garima

  • Need to display null values against table

    Hi All,
    I have one table in which I only need to display null values along with the rest of columns. for example
    ename sal date
    scott 2000 15/07/06
    Michal
    now my query should return---
    ename sal date
    michal
    hare krishna
    Alok

    Maybe it is something like this?:
    michaels>  select column_name || ' contains ' ||
           dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() ||
           ' NULL values' null_columns
      from cols
    where table_name = 'EMP'
       and dbms_xmlgen.getxmltype ('select sum(nvl2(' || column_name || ',0,1)) c from ' || table_name ).extract ('//text()').getnumberval() > 0
    NULL_COLUMNS                                                                               
    MGR contains 1 NULL values                                                                 
    COMM contains 10 NULL values  

  • Display Updated values  in table from server (iphone)

    hello everyone,
    I am having problem while displaying updated data in a table. I m getting data from a server and then trying to displaying it in a table view. but data in table only update after scroll.
    I also tried to call the method [myTableView reloadData] inside main thread. but that doesnt solve to problem too. and my GUI doesnt work when I does that.
    Can anyone solve my prob.
    Thanx in advance.

    Hi..Friends..finally i got the solution for this problem, we have to use performselector method to varying the message at run time.if u want any help click this link,http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC /Articles/ocSelectors.html
    Thanku....

  • Call Web Service and display return values in table

    Hi all,
    I am calling a self-implemented web service with visual composer. The webservice returns the following data shown below.
    Each item like carID, carBrand etc. should be displayed in an output table.
    The problem is, that he doesn't display any data at all. Is there a problem with the webservice data which is returned or do I have to do some further settings in visual composer?
    Thank you for your help! Kind regards, Patrick.
      <?xml version="1.0" encoding="utf-8" ?>
    - <ArrayOfCar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://IBM-W2003-EAI/GetCarList">
    - <Car>
      <CarID>A-471</CarID>
      <CarBrand>Alfa</CarBrand>
      <CarModel>156</CarModel>
      <Kw>100</Kw>
      <Ps>136</Ps>
      <Km>79000</Km>
      <Year>1998</Year>
      <Price>7500,0000</Price>
      <Url />
      <Status>Available</Status>
      </Car>
    - <Car>
      <CarID>A-736</CarID>
      <CarBrand>Audi</CarBrand>
      <CarModel>A4</CarModel>
      <Kw>110</Kw>
      <Ps>150</Ps>
      <Km>87000</Km>
      <Year>2000</Year>
      <Price>15780,0000</Price>
      <Url />
      <Status>Reserved</Status>
      </Car>
    </ArrayOfCar>

    Hi Shai,
    the webservice is working well, trying to test it with webservice navigator.
    He also returns the correct number of rows (because there appears slider beneath the table output and I also counted the rows), but there is no data displayed in visual composer.
    I have got no further ideas, what the problem is...
    THank you for your support.
    Kind regards, PAtrick.

  • Displaying ssize_t value in table cell

    Hello,
    I want to display a number of type ssize_t in a numeric table cell. In the UI editor, the cell has been set to intptr_t.
    Running the code in debug64 works fine, in debug I receive the error message:
    FATAL RUN-TIME ERROR:   Invalid argument type: found 'int', expected '__int64'.
    I have to add: in the UI editor I have created the table with one row only, I add more rows programmatically using InsertTableRows (but the cell types should be inherited). The error only shows up when filling the cell of the last row.
    Ideas?
     

    LuisG wrote:
    However, the (5,1) cell that you already have still has int64. This must be because you created that row before you changed the data type for future cells.
    Hi Luis,
    thanks - you are correct (of course )
    But...
    If I change the default values there is a popup that tells me exactly this.... But it also seems to offer applying those changes to the existing cell. However it appears that clicking Yes has no effect...
    I agree that it is my fault, I misunderstood this statement - it does not promise to actually apply the value, it only asks if I would like to... 

  • Trouble with passing values into table !

    Well my problem seems to be very small but have tried a lot of books and e-books to get a possible solution, but all in vain.
    The problem is I have a table, lets say 'tab', which has a varchar2 column, lets say 'col'.
    I want to be able to make an insert into this 'col' column of the table 'tab'.
    Simple inserts with all symbols work fine. But when I run the following insert, it fails.....
    insert into tab
    values('abcn&def');
    Assume the table tab has a single column 'col' of varchar2 datatype. When I run the insert statement it prompts a value. Is there anyway I can store '&' as a part of the data?

    In SQL*Plus ampersand character (&) is the default character to identify a parameter.
    Either use set define off or set define to a different character.
    SQL > set define off
    --- this will turn off & as the input parameter definition charatcer
    or use
    SQL > set define *
    -- this will set * as the input parameter definition charatcer instead of &
    Shakti
    (http://www.impact-sol.com)
    (Developers of Guggi Oracle)

  • Table component disturbing the order of rows while displaying

    HI,
    In jspx when ever data is displayed in table,when we select last page the table component
    is displaying data which is not sorted.(values given to table are changed in output).
    This is occuring only in last page.
    EX:If i have 87 records with pagination,where 15 are displayed.
    when i select to last page the output from my query is not matching the data viewed.
    Using apache trinidad1.0.5
    Regards,
    Vin
    Edited by: vinTK on Apr 26, 2012 6:16 AM

    I think that it's a very common situation.
    No ideas?
    I think that it's interesting to create appz with great performance.

  • Displaying default value for a field in ALV table

    Hai all,
         I am having an ALV table in which I want to display Requisition number by default using a value which i generated randomly and it is stored in a variable.
    While displaying ALV table my req number field should display that value by default when ever user is inserting a row( all the coloumns n my alv are editable.
    Is it possible?? 
    Kindly give some suggestions.
    Thanks in Advance,
    Nalla.B

    Hai Kris,
        I took help from ur link and i declared a global attribute request_number.
    and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
    FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
      DATA bill_details TYPE REF TO zdom_bill_detail.
      LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
        bill_details ?= <wa_row>-r_value.
        IF bill_details->REQ_NUMBER IS INITIAL.
      DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
      DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
      DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
    navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
      lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
    lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
          lo_el_bill_detail->set_attribute(
            EXPORTING
              name  = 'REQ_NUMBER'
              value = wd_comp_controller->request_number
    Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
    lo_el_bill_detail->set_attribute(
        name =  `REQ_NUMBER`
        value = wd_comp_controller->request_number ).
    Pls give some suggestions,
    Thanks in Advance,
    Nalla.B

  • User-Defined Type does not display values in Table Data grid

    I have a User defined Type that is a collection of one character VARCHAR2 values. In the Table Data grid it does not display the character values. I know on all our other Oracle development applications these values display. Is this a bug or is there a snippet to display these values?

    Version: 1.0.0.15
    DB: 10.2.0
    Workstation OS: Windows XP

  • OO  ALV  displaying  without  Values  despite Internal  table contains

    My   below  OO  ALV  displaying  without  Values  despite Internal  table contains  the values ...
    Help  please ...
    REPORT zsd_concession1  NO STANDARD PAGE HEADING
                            LINE-SIZE 285
                            LINE-COUNT 64
                            MESSAGE-ID zz.
    Program Description ******************************
    This report is to Calculate consession against Quotations
    complying  standards for enhanced Performance, Readability &
    Maintenance.
    Change Log *********************************
    Remedy # /       Who       When        Why / What
    Transport #
    CLASS lcl_event_handler DEFINITION DEFERRED.
    *&      Data Definitions .
    DATA: BEGIN OF vbap_wa,
                vbeln               TYPE  vbak-vbeln,           "Quotation#
                erdat               TYPE  vbak-erdat,           "Quot date
                knumv               TYPE  vbak-knumv,           "Cond Rec#
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF vbap_wa,
           BEGIN OF konv_wa,
                knumv               TYPE  konv-knumv,  "Cond#
                kposn               TYPE  konv-kposn,  "Cond Item#
                kappl               TYPE  konv-kappl,  "Applic
                kschl               TYPE  konv-kschl,  "Cond Typ
                kbetr               TYPE  konv-kbetr,  "Price ZBP1,ZNAA,ZNAX
           END   OF  konv_wa,
           BEGIN OF vbpa_wa,
                vbeln               TYPE  vbpa-vbeln,  "Quot#
                posnr               TYPE  vbpa-posnr,  "Item#
                parvw               TYPE  vbpa-parvw,  "Prt Fn
                kunnr               TYPE  vbpa-kunnr,  "Cust#
           END   OF  vbpa_wa,
           BEGIN OF result_wa,
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF result_wa.
    DATA: ikonv      LIKE  STANDARD TABLE OF konv_wa,
          ivbap      LIKE  STANDARD TABLE OF vbap_wa,
          ivbpa      LIKE  STANDARD TABLE OF vbpa_wa,
          iresult    LIKE  STANDARD TABLE OF result_wa.
    *Work storage
    DATA: BEGIN OF ws,
             vbeln       TYPE vbak-vbeln,
             ok_code     TYPE sy-ucomm,
             alv_save    TYPE c,   "ALV save
             alv_variant TYPE disvariant, "ALV Variant
             alv_sort    TYPE lvc_t_sort, "Sort table
          END  OF ws.
    *Data declarations for ALV Main list
    DATA : ty_lay1        TYPE        lvc_s_layo,
           it_fieldcat    TYPE        lvc_t_fcat ,
           ty_fieldcat    TYPE        lvc_s_fcat ,
           l_smenu        TYPE REF TO cl_ctmenu,
           c_alv1         TYPE REF TO cl_gui_alv_grid,
           c_cont1        TYPE REF TO cl_gui_custom_container,
           e_dclick       TYPE REF TO lcl_event_handler.
    *Data declarations for ALV Interactive list
    DATA : ty_lay2        TYPE        lvc_s_layo,
           it_fcat        TYPE        lvc_t_fcat ,
           ty_fcat        TYPE        lvc_s_fcat ,
           c_alv2         TYPE REF TO cl_gui_alv_grid,
           c_cont2        TYPE REF TO cl_gui_custom_container.
    *Field-Symbols
    FIELD-SYMBOLS:
          <konv>  LIKE   konv_wa,
          <vbap> LIKE   vbap_wa.
    *Constants
    CONSTANTS:
          c_end_row    TYPE  i  VALUE  65000.
    *CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
         handle_double_click
         FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row.
    ENDCLASS. "lcl_event_handler DEFINITION
    *CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD handle_double_click.
        DATA: sec_wa LIKE LINE OF iresult.
    *Reading the selected data into a variable
        READ TABLE iresult INDEX e_row-index INTO sec_wa.
    *Select the field details of the selected table
    SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
    WHERE tabname EQ ls_dd02l-tabname.
    *Calling the ALV containing the field values
        CALL SCREEN 101.
      ENDMETHOD. "handle_double_click
    ENDCLASS. "lcl_event_handler IMPLEMENTATION
    *&      SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE  text-001.
    SELECT-OPTIONS:
        s_vbeln  FOR  ws-vbeln DEFAULT '2002354788' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    INITIALIZATION.
      PERFORM setup_screen_defaults.
    START-OF-SELECTION.
      PERFORM gather_report_data.
    END-OF-SELECTION.
      PERFORM create_output.
    *&      Form  initialization
    FORM setup_screen_defaults.
      CLEAR: ws, konv_wa, vbap_wa, vbpa_wa.
      REFRESH: ivbpa, ikonv, ivbap, iresult.
    ENDFORM.                    " setup_screen_defaults
    *&      Form  gather_report_data
    FORM  gather_report_data.
      SELECT  vbeln posnr parvw kunnr
               INTO TABLE ivbpa
               FROM vbpa
               WHERE vbeln IN s_vbeln
               AND ( parvw = 'SP' OR "SoldTO
                     parvw = 'WE' OR "ShipTo
                     parvw = 'ZT' ). "Top Parent
      SELECT  vkvbeln vkerdat vkknumv vpposnr vp~matnr
              z1zansicat z1zansigrd z2~zcurrvaltnarea
              z2zcurrcstusd m1zzbrndnm zg~zqedscgrp
              m1mstav  vpkwmeng  vp~netpr
        INTO CORRESPONDING FIELDS OF TABLE ivbap
        FROM  vbak  AS vk
        INNER JOIN vbap AS vp
           ON vpvbeln = vkvbeln
        INNER JOIN zmarall AS z1
           ON z1matnr = vpmatnr
        INNER JOIN zco002 AS z2
           ON z2matnr = vpmatnr
        INNER JOIN zglbprc AS zg
           ON zgmatnr = vpmatnr
        INNER JOIN mara AS m1
           ON m1matnr = vpmatnr
        WHERE  vk~vbeln IN s_vbeln
        AND    vk~auart = 'AG'."AG = Quot
      SORT ivbap BY posnr matnr.
      SELECT  kvknumv kvkposn kvkappl kvkschl kv~kbetr
              INTO TABLE ikonv
              FROM  konv AS kv
              FOR ALL ENTRIES IN ivbap
              WHERE  kv~knumv = ivbap-knumv
              AND    kv~kposn = ivbap-posnr
              AND    kv~kappl EQ 'V'
              AND    ( kv~kschl EQ 'ZBP1'
                   OR kv~kschl EQ 'ZNAX'
                   OR kv~kschl EQ 'ZNAA' ).
      SORT ikonv BY knumv kposn.
      LOOP AT  ivbap  ASSIGNING  <vbap>.
        CLEAR konv_wa.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZBP1'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-lprc = konv_wa-kbetr.
        ENDIF.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZNAX'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-sprc = konv_wa-kbetr.
        ENDIF.
        READ TABLE ikonv INTO  konv_wa WITH KEY
                                   knumv = <vbap>-knumv
                                   kposn = <vbap>-posnr
                                   kschl = 'ZNAA'
                                   BINARY  SEARCH.
        IF sy-subrc EQ 0.
          <vbap>-sprc = konv_wa-kbetr.
        ENDIF.
      ENDLOOP.
      SORT ivbap BY posnr matnr.
      LOOP AT ivbap INTO vbap_wa.
        MOVE-CORRESPONDING  vbap_wa TO result_wa.
        APPEND  result_wa TO iresult.
        CLEAR:  vbap_wa, result_wa.
      ENDLOOP.
    ENDFORM.                    " gather_report_data
    *&      Form  create_output
    FORM create_output.
      CALL SCREEN 100.
    FREE: iresult.
    ENDFORM.                    " create_output
    *&      Module  PBO_0100  OUTPUT
          text
    MODULE pbo_0100 OUTPUT.
      SET PF-STATUS '0100'.
      SET TITLEBAR '0100'.
      IF c_cont1 IS INITIAL.
    *Creating object of container
        CREATE OBJECT c_cont1
         EXPORTING
           container_name = 'CCONT1'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Creating object of alv
        CREATE OBJECT c_alv1
           EXPORTING
            i_parent = c_cont1.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Alv layout
        PERFORM alv_100_layout.
        PERFORM save_alv_layout.
    *Alv field catalogue
        PERFORM alv_100_fieldcat.
    *Displaying the ALV grid
        CALL METHOD c_alv1->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay1
            i_save          = ws-alv_save
            is_variant      = ws-alv_variant
          CHANGING
            it_outtab       = iresult[]
            it_sort         = ws-alv_sort
            it_fieldcatalog = it_fieldcat[].
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *Create object of the event class
    *and setting handler for double click
        CREATE OBJECT e_dclick.
        SET HANDLER e_dclick->handle_double_click FOR c_alv1.
      ENDIF.
    ENDMODULE.                 " PBO_0100  OUTPUT
    *&      Module  PAI_0100  INPUT
          text
    MODULE pai_0100 INPUT.
      ws-ok_code = sy-ucomm.
      CASE ws-ok_code.
        WHEN 'BACK'.
          CALL  SELECTION-SCREEN  1000.
          CLEAR ws-ok_code.
        WHEN 'EXIT'.
          LEAVE TO  SCREEN  0.
          CLEAR ws-ok_code.
          EXIT.
        WHEN 'CANCEL'.
          LEAVE TO  SCREEN  0.
          CLEAR ws-ok_code.
          EXIT.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " PAI_0100  INPUT
    *&      Form  alv_100_layout
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_layout.
      ty_lay1-numc_total = 'X'. " Numc total line
    ty_lay1-cwidth_opt = 'X'. " Optimal column width
      ty_lay1-detailinit = 'X'. " Show values that are initial in
      ty_lay1-sel_mode = 'A'. " Column selection mode
      ty_lay1-no_merging = 'X'. " No merging while sorting columns
      ty_lay1-keyhot     = 'X'.
      ty_lay1-grid_title = 'SD Concessions'.
      ty_lay1-zebra      = 'X'.
      ty_lay1-no_toolbar = ' '.
    ENDFORM.                    " alv_100_layout
    *&      Form  alv_100_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'posnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Item#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'matnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Mat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'zansicat'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'AnsiCat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'zansigrd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Grade'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'zcurrvaltnarea'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Val Area'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 6.
      ty_fieldcat-fieldname = 'zcurrcstusd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Cost $'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 7.
      ty_fieldcat-fieldname = 'zzbrndnm'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Brand'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 8.
      ty_fieldcat-fieldname = 'zqedscgrp'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'QE'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 9.
      ty_fieldcat-fieldname = 'mstav'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Status'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 9.
      ty_fieldcat-fieldname = 'kwmeng'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Qty'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 10.
      ty_fieldcat-fieldname = 'lprc'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'List Price'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 11.
      ty_fieldcat-fieldname = 'sprc'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Discount'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 12.
      ty_fieldcat-fieldname = 'netpr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Quot Price'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 13.
      ty_fieldcat-fieldname = 'mrgn'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Margin%'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
    ENDFORM.                    " alv_100_fieldcat
    *&      Module  PBO_0101  OUTPUT
          text
    MODULE pbo_0101 OUTPUT.
    *Check if the Custom container exists.
      IF c_cont2 IS INITIAL.
    *Creating container object
        CREATE OBJECT c_cont2
          EXPORTING
            container_name = 'CCONT2'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *creating ALV grid for interactive list
        CREATE OBJECT c_alv2
          EXPORTING
           i_parent = c_cont2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    *ALV layout
        PERFORM alv_101_layout.
    *ALV fieldcatalogue
        PERFORM alv_101_fieldcat.
    *Sorting the output by field position
        SORT iresult BY posnr.
    *ALV for display field details
        CALL METHOD c_alv2->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay2
          CHANGING
            it_outtab       = iresult[]
            it_fieldcatalog = it_fieldcat.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " PBO_0101  OUTPUT
    *&      Module  PAI_0101  INPUT
          text
    MODULE pai_0101 INPUT.
    ENDMODULE.                 " PAI_0101  INPUT
    *&      Form  alv_101_layout
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_layout.
      ty_lay2-grid_title = 'Line Details'.
      ty_lay2-zebra = 'X'.
      ty_lay2-no_toolbar = 'X'.
    ENDFORM.                    " alv_101_layout
    *&      Form  alv_101_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_fieldcat.
      REFRESH it_fieldcat.
    REFRESH it_fcat.
    CLEAR ty_fcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'posnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Item#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'matnr'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Mat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'zansicat'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'AnsiCat#'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'zansigrd'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Grade'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'zcurrvaltnarea'.
      ty_fieldcat-tabname = 'iresult'.
      ty_fieldcat-coltext = 'Val Area'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
    ENDFORM.                    " alv_101_fieldcat
    *&      Form  save_alv_layout
          text
    -->  p1        text
    <--  p2        text
    form save_alv_layout.
    ws-alv_save = 'A'.
    ws-alv_variant-report = sy-repid.
    endform.                    " save_alv_layout

    Hello
    Creating fieldcatalogs manually is one of the major error sources in ALV programming.
    There is hardly any reason why NOT to use the standard-fm LVC_FIELDCATALOG_MERGE in order to create a proper fieldcatalog.
    If you need some modification of the standard fieldcatalog (e.g. renaming of columns, etc.) just do your post-processing after calling the fm.
    Regards
      Uwe

  • Read integer values from spreadsheet and display the values in a table

    Hi all,
    I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  
    It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.
    Thank you. 
    Solved!
    Go to Solution.

    No don't take element by element just convert as a whole. See the attached example
    Good luck
    The best solution is the one you find it by yourself

  • How to display dynamic values in poplist at row level in advanced table

    I want to display dynamic values in poplist at row level based on a row value in advanced table, with lov i can achieve it, is there any way to achieve this in poplist
    Thanks
    Bbau

    Babu,
    You have been long enough in forum and still come out with these one liners. Problem statement is not clear.
    --Shiv                                                                                                                                                                                                                                                               

  • Show return value of a method-call within a column of ADF table component

    Hi,
    I'm currently developing a ADF "Master Form - Detail Table" component, which displays trips of a car in master form, and all related trip-point information in detail table. This detail table contains the following fields within a row :
    - idTripPoint
    - receivedAt
    - speed
    - coordinates
    Everything is displayed well when deploying my app. What I now want to implement is one more column into my detail table, which displays the result of a method-call which gets the coordinates of the corresponding tripPoint and executes a query to find the nearest neighbour to this point. This method afterwards returns a string which contains a textual description for the coordinates (e.g. 10 km south of Hilton Plaza). This method is defined within my SessionBean and also available within the Data Control Palette.
    What I first did, was just to drag the result (String) of my getTripPointDescription(JGeometry) method to a newly created column within my details table, released it there and set the corresponding NDValue for my method. I used the id of my details table table definition in PageDef for that (${bindings.TripstripPointsList.currentRow.dataProvider.coordinates}). I don't know if this is correct.
    When deploying my app, nothing happened, because my method has never been called. So I decided to implement an invokeAction within my PageDef which calls the generated methodAction within PageDef.
    It looks like that now:
    <executables>
    <invokeAction id="callDescription" Binds="getTripPointDescription"
    Refresh="prepareModel"/>
    </executables>
    <bindings>
    <methodAction id="getTripPointDescription"
    InstanceName="TripsEJBFacadeLocal.dataProvider"
    DataControl="TripsEJBFacadeLocal"
    MethodName="getTripPointDescription"
    RequiresUpdateModel="true" Action="999"
    IsViewObjectMethod="false"
    ReturnName="TripsEJBFacadeLocal.methodResults.TripsEJBFacadeLocal_dataProvider_getTripPointDescription_result">
    <NamedData NDName="tripPoint"
    NDValue="${bindings.TripstripPointsList.currentRow.dataProvider.coordinates}"
    NDType="oracle.spatial.geometry.JGeometry"/>
    </methodAction>
    </bindings>
    Now my method is called once for the coordinates of the first row of my detail table and the generated result is entered within each row.
    So how is it possible to get this standard-behaviour (within other application-frameworks) work in ADF? I just want to display a textual description of a coordinate instead of x/y coordinates within my table. And the corresponding method to get this textual description based on the x/y coordinate should be called for each row displayed in my table.
    I currently walked through all ADF-tutorials and blogs I found on the Internet, but every table example I found only displays data of the associated Entity-Bean. And method Action and accessorIterator are only used with command objects.
    Thank you,
    Thomas

    Sorry, I forgot to say which technologies I use:
    - Toplink Essentials JPA for Model layer (EJB 3.0)
    - ADF in View Layer
    I still hope someone can help me finding an answer.
    Bets Regards,
    Thomas

Maybe you are looking for

  • DVD drive is initiating "safe to remove hardware" by itself

    Hi. I am getting the following 2 error messages. I just did a clean re-install of Windows 7 and for the first 3 weeks I had no issues at all (could be unrelated). I am not initiating anything. My laptop is doing this by itself. It just randomly on it

  • Problem with PhPmyadmin and Pfadmin

    I have some Problem loading some Websites, i think its more a domain problem, following: If I want to load my Website in Firefox beta (latest), works, if I want to access phpmyadmin or pfadmin, it cant find anything, if I type in the IP it works, but

  • Emac will not connect to LCD projector while running iMovie

    I am working on an eMac running 10.3.9. We have the eMac connected to an LCD projector in a computer lab setting. Things work fine - until we try to run iMovie on the projector. A message appears on the screen asking for a resolution of 1024 X 768. W

  • X11 Quartz Don't want as default Server

    Hi, I recently installed some software that needed me to install X11 - Quartz so I could run it. Once X11 -Quartz was insalled a pop up notice came up saying that I need to logout and login to make it my default server... what does it mean my default

  • Ess homepage translation

    Hi, We recently installed ESS on NW04S and have issues with the translation of the homepage framework. It always renders in english even when other pages renders in french. Does someone know what has to be configured? Thanks for your help! Renaud