Display Nested table data in an ALV format

Hi All,
Is there any way to display nested table data in an ALV format. This table has 20-30 structures in it and there is no way to create a common structure using all the fields. Kindly let me know what is the best way to display the nested structure data.
Thanks a lot for your responce.
Regards,
Priti

REPORT  yh_alvtreedemo1.
TYPE-POOLS : fibs,stree.
TYPE-POOLS:slis.
DATA : t_node TYPE snodetext.
DATA : it_node LIKE TABLE OF t_node,
       wa_node LIKE t_node.
DATA: t_fieldcat    TYPE slis_t_fieldcat_alv,
      fs_fieldcat   TYPE slis_fieldcat_alv.
DATA:w_repid LIKE sy-repid.
*Internal Table declarations
DATA: BEGIN OF fs_scarr,
        carrid LIKE scarr-carrid,
      END OF fs_scarr.
DATA:BEGIN OF fs_spfli,
        carrid LIKE spfli-carrid,
        connid LIKE spfli-connid,
     END OF fs_spfli.
DATA:BEGIN OF fs_sflight,
        carrid LIKE sflight-carrid,
        connid LIKE sflight-connid,
        fldate LIKE sflight-fldate,
     END OF fs_sflight.
DATA:BEGIN OF fs_sbook,
        carrid LIKE sbook-carrid,
        connid LIKE sbook-connid,
        fldate LIKE sbook-fldate,
        bookid LIKE sbook-bookid,
     END OF fs_sbook.
DATA:t_scarr LIKE TABLE OF fs_scarr,
     t_spfli LIKE TABLE OF fs_spfli,
     t_sflight LIKE TABLE OF fs_sflight,
     t_sbook LIKE TABLE OF fs_sbook.
START-OF-SELECTION.
  PERFORM get_data.
  PERFORM build_tree.
  PERFORM display_tree.
*&      Form  get_data
FORM get_data .
  SELECT carrid
         FROM scarr
         INTO TABLE t_scarr.
  SELECT carrid
          connid
          FROM spfli
          INTO TABLE t_spfli
          FOR ALL ENTRIES IN t_scarr
          WHERE carrid EQ t_scarr-carrid.
ENDFORM.                    " get_data
*&      Form  build_tree
FORM build_tree .
  CLEAR: it_node,
         wa_node.
  SORT: t_scarr BY carrid,
        t_spfli BY carrid connid,
        t_sflight BY carrid connid fldate,
        t_sbook BY carrid connid fldate bookid.
  wa_node-type = 'T'.
  wa_node-name = 'Flight Details'.
  wa_node-tlevel = '01'.
  wa_node-nlength = '15'.
  wa_node-color = '4'.
  wa_node-text = 'Flight'.
  wa_node-tlength ='20'.
  wa_node-tcolor = 3.
  APPEND wa_node TO it_node.
  CLEAR wa_node.
  LOOP AT t_scarr INTO fs_scarr.
    wa_node-type = 'P'.
    wa_node-name = 'CARRID'.
    wa_node-tlevel = '02'.
    wa_node-nlength = '8'.
    wa_node-color = '1'.
    wa_node-text = fs_scarr-carrid.
    wa_node-tlength ='20'.
    wa_node-tcolor = 4.
    APPEND wa_node TO it_node.
    CLEAR wa_node.
    LOOP AT t_spfli INTO fs_spfli WHERE carrid EQ fs_scarr-carrid.
      wa_node-type = 'P'.
      wa_node-name = 'CONNID'.
      wa_node-tlevel = '03'.
      wa_node-nlength = '8'.
      wa_node-color = '1'.
      wa_node-text = fs_spfli-connid.
      wa_node-tlength ='20'.
      wa_node-tcolor = 4.
      APPEND wa_node TO it_node.
      CLEAR wa_node.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    " build_tree
*&      Form  display_tree
FORM display_tree .
  CALL FUNCTION 'RS_TREE_CONSTRUCT'
    TABLES
      nodetab = it_node.
  w_repid = sy-repid.
  CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
    EXPORTING
      callback_program      = w_repid
      callback_user_command = 'USER_COMMAND'
      callback_gui_status   = 'SET_PF'.
ENDFORM.                    " display_tree
*&      Form  pick
*      -->COMMAND    text
*      -->NODE       text
FORM user_command    TABLES pt_nodes         STRUCTURE seucomm
                             USING pv_command       TYPE c
                         CHANGING pv_exit        TYPE c
                                  pv_list_refresh  TYPE c.
  pv_list_refresh = 'X'.
  IF pt_nodes-tlevel = '03'.
    CLEAR t_fieldcat[].
    SELECT carrid
           connid
           fldate
           FROM sflight
           INTO TABLE t_sflight
           WHERE connid EQ pt_nodes-text.
    fs_fieldcat-col_pos = 1.
    fs_fieldcat-fieldname = 'CARRID'.
    fs_fieldcat-seltext_m = 'Airlinecarrier'.
    fs_fieldcat-key = 'X'.
    fs_fieldcat-hotspot = 'X'.
    APPEND fs_fieldcat TO t_fieldcat.
    CLEAR fs_fieldcat.
    fs_fieldcat-col_pos = 2.
    fs_fieldcat-fieldname = 'CONNID'.
    fs_fieldcat-seltext_m = 'Connection No'.
    fs_fieldcat-key = 'X'.
    fs_fieldcat-hotspot = 'X'.
    APPEND fs_fieldcat TO t_fieldcat.
    CLEAR fs_fieldcat.
    fs_fieldcat-col_pos = 3.
    fs_fieldcat-fieldname = 'FLDATE'.
    fs_fieldcat-seltext_m = 'Flight Date'.
    fs_fieldcat-key = 'X'.
    fs_fieldcat-hotspot = 'X'.
    APPEND fs_fieldcat TO t_fieldcat.
    CLEAR fs_fieldcat.
    w_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program = w_repid
        it_fieldcat        = t_fieldcat[]
      TABLES
        t_outtab           = t_sflight.
  ENDIF.
ENDFORM.                    "pick
*&      Form  set_pf
*       text
FORM set_pf.
  SET PF-STATUS 'MYPF'.
ENDFORM.                    "set_pf

Similar Messages

  • How to display table data without  using ALV  and table element.

    Hi,
            Its possible to display table data without using ALV  and table element.
           Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
           (every time i am fetching single row data ),
           But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
           settings and header data etc..things.
          Give solution to  display data part..
    Regards,
    Rakhi.

    Hi,
    Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
    In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
      DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
    * Standard Filter Function setting to FALSE
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
    * Standard Filter Function setting to FALSE Ends
    Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
    Hope this answers your query.
    Thanks.
    Kumar Saurav.

  • How to display a table data on Screen having a Table control

    Hi ,
    I am new to ABAP.I would like to display a table data (Eg: ZDemo) on a screen at run time.I have defined a Table control in screen. Now I want to populate data from ZDemo to table control.How can I do that?Please help moving forward in this regard.

    Hi Gayatri,
      After creating table control do the following steps.
    1. In the flow logic section write the following code:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
    LOOP AT I_LIKP WITH CONTROL LIKP_DATA CURSOR LIKP_DATA-CURRENT_LINE.
      MODULE ASSIGN_DATA.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0200.
    LOOP AT I_LIKP.
    ENDLOOP.
    I_LIKP is the internal table which is used to display table data in the table control.
    2. In Process Before Output, in the module STATUS_0200 write the following code:
      DESCRIBE TABLE I_LIKP LINES FILL.
      LIKP_DATA-LINES = FILL.
      In Process After Input, in the module USER_COMMAND_0200 write the following code:
      CASE SY-UCOMM.
       WHEN 'LIPS'.
        READ TABLE I_LIKP WITH KEY MARK = 'X'.
        SELECT VBELN
               POSNR
               WERKS
               LGORT
               FROM LIPS
               INTO TABLE I_LIPS
               WHERE VBELN = I_LIKP-VBELN.
        IF SY-SUBRC = 0.
         CALL SCREEN 200.
        ENDIF.
       WHEN 'BACK'.
        SET SCREEN 200.
      ENDCASE.
    In Process Before Output and in the module ASSIGN_DATA which is there inside the loop write the following code:
    MOVE-CORRESPONDING I_LIKP TO LIKP.
    So, Totally your flow logic code should be like this.
    TABLES: LIKP, LIPS.
    DATA: BEGIN OF I_LIKP OCCURS 0,
           VBELN LIKE LIKP-VBELN,
           ERNAM LIKE LIKP-ERNAM,
           ERZET LIKE LIKP-ERZET,
           ERDAT LIKE LIKP-ERDAT,
           MARK  TYPE C VALUE 'X',
          END OF I_LIKP,
          BEGIN OF I_LIPS OCCURS 0,
           VBELN LIKE LIPS-VBELN,
           POSNR LIKE LIPS-POSNR,
           WERKS LIKE LIPS-WERKS,
           LGORT LIKE LIPS-LGORT,
          END OF I_LIPS,
          FILL TYPE I.
    CONTROLS: LIKP_DATA TYPE TABLEVIEW USING SCREEN 200,
              LIPS_DATA TYPE TABLEVIEW USING SCREEN 300.
    DATA: COLS LIKE LINE OF LIKP_DATA-COLS.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
      WHEN 'LIKP'.
       SELECT VBELN
              ERNAM
              ERZET
              ERDAT
              FROM LIKP
              INTO TABLE I_LIKP
              WHERE VBELN = LIKP-VBELN.
       IF I_LIKP[] IS INITIAL.
         CALL SCREEN 200.
       ENDIF.
      WHEN 'EXIT'.
       LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  assign_data  OUTPUT
          text
    MODULE ASSIGN_DATA OUTPUT.
    MOVE-CORRESPONDING I_LIKP TO LIKP.
    ENDMODULE.                 " assign_data  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
          text
    MODULE STATUS_0200 OUTPUT.
      DESCRIBE TABLE I_LIKP LINES FILL.
      LIKP_DATA-LINES = FILL.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
          text
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
       WHEN 'LIPS'.
        READ TABLE I_LIKP WITH KEY MARK = 'X'.
        SELECT VBELN
               POSNR
               WERKS
               LGORT
               FROM LIPS
               INTO TABLE I_LIPS
               WHERE VBELN = I_LIKP-VBELN.
        IF SY-SUBRC = 0.
         CALL SCREEN 200.
        ENDIF.
       WHEN 'BACK'.
        SET SCREEN 200.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    Save and Activate the program along with the screen in which you have included table control.
    Hope this will help you.
    Regards
    Haritha.

  • Need a POP-UP which can display internal table data in ALV format

    HI All,
    I need to display INTERNAL TABLE values through a POP-UP. Only condition is that the window with the internal table data should be in ALV format and not in TEXT only format.
    To clarify, I used FM 'POPUP_WITH_TABLE_DISPLAY_OK'   and  'POPUP_WITH_TABLE_DISPLAY', but both display the data in TEXT format and there is no provision to put the FIELD names there. Everthing needs to be put into internal table and it displays it in text format.
    So I want a FM where I can display internal tabel data in ALV format( same format that would appear if you creata search help for a filed and output window would have all the ALV features like SORT buttons etc.
    Hope there is some FM to achieve this ALV format data thing.
    Thanks in advance for all your help.
    Regards
    FX3

    check this
    REPORT y_demo_alv_3.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_outtab OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA:   w_chk TYPE c.                  "For multiple selection
    DATA: END OF i_outtab.
    *       I_OUTTAB TYPE SFLIGHT OCCURS 0,
    DATA: i_private TYPE slis_data_caller_exit,
          i_selfield TYPE slis_selfield,
          W_exit(1) TYPE c.
    PARAMETERS: p_title TYPE sy-title.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE i_outtab.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_title                 = p_title
                i_selection             = 'X'
                i_zebra                 = 'X'
    *           I_SCREEN_START_COLUMN   = 0
    *           I_SCREEN_START_LINE     = 0
    *           I_SCREEN_END_COLUMN     = 0
    *           I_SCREEN_END_LINE       = 0
                i_checkbox_fieldname    = 'W_CHK'
    *           I_LINEMARK_FIELDNAME    =
    *           I_SCROLL_TO_SEL_LINE    = 'X'
                i_tabname               = 'I_OUTTAB'
                i_structure_name        = 'SFLIGHT'
    *           IT_FIELDCAT             =
    *           IT_EXCLUDING            =
    *           I_CALLBACK_PROGRAM      =
    *           I_CALLBACK_USER_COMMAND =
    *            IS_PRIVATE             = I_PRIVATE
         IMPORTING
                es_selfield             = i_selfield
                e_exit                  = w_exit
           TABLES
                t_outtab                = i_outtab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000(0k) WITH sy-subrc.
      ENDIF.
    *****the internal table is modified with a cross sign for marking the
    ***rows selected
      LOOP AT i_outtab WHERE w_chk = 'X'.
        WRITE: /  i_outtab-carrid, i_outtab-price.
      ENDLOOP.

  • Internal table data download to XML format

    Hello All,
    I have devloped one OOPS ALV report in that our requirement is on "SAVE" button the data of the report has to be downloaded in given XML format.Please check the format provided in Finnish language.The word "Value" specified as value which are coming in the ALV report against fields mentioned.
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!u2014Aromi list -->
    <!-- Copyright -->
    <!-- Edited with Visual Basic 6 -->
    <!-- Versio 1.0 -->
        <Tiedot Lahettaja="Value" Yhteyshlo=" Value"    
                    Yhteystieto=" Value " Asiakasnumero="">
           <Raaka-aine Nimi="" Ryhma=" Value ">
              <Tuotemerkki Nimi=" Value " Ean=" Value "
                                  Ykspakkauskoko="1" Ykspakkaustyyppi="KPL" almistaja="Value">
                 <Toimittajatiedot Tuotekoodi="10" Sopimustuote="Y" Myyntierakoko="5"
                                    Myyntieratyyppi="ME" Myyntierahinta="3,035" Hintapvm="value"
                  />
          </Tuotemerkki>
      </Raaka-aine>
    </Tiedot>
    Could anybody help how to download the report data into above format.
    Regards,
    Sachin

    Hi Sachin,
    I see the sample XML has field values embedded as XML element attributes.ie <Raaka-aine Ryhma=" Value ">. For such specific requirements:
    1. Loop through the table and Use iXML library functions to build the complete XML, element by element. Help - http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    2. You can create an XSLT Transformation that match the specific XML format,  and use CALL TRANSFORMATION to convert internal table to that specific XML format.
    Few Standard Function modules and class CL_XML_DOCUMENT may help for generic SAP XML conversions, where XML element names will be same as internal table field names. Not, sure if these can be used to generate specific XML formats.
    Thanks,
    Varun
    Edited by: Varun VS on Oct 25, 2011 7:48 AM

  • New page in smart form when displaying internal table data in table

    Hi ,
    My requirement in smartform is like
    I'm using the tables to display the internal table data in main window .
    based on SORTF field in the internal table ,when SORTF field value changes all the related to that SORTF value should be displayind in the new page.
    Please anybody tell me that , how to do this?
    Thanks
    Naveen

    Hi Navi,
        Try this Logic.
    1) Go to Smartform,
    2) Declare a flag variable w_flag type c
    3)Go to Main Window
       a) Go to table
       b) Create one more Table Line
       c) Create a CODE Line in that.
           write inside CODE  as Below:-
                 CLEAR: w_flag.
                 ON CHANGE OF w_final-sortf.
                   w_flag  = 'X'.
                  ENDON.
       d) Create one COMMAND Under CODE line created above.
           click on check Box "Go to New Page"  ( Page1 or Page2 or give as reqd ).
           click on conditions tabe of COMMAND
           write: w_flag = 'X'.
    Hope this will work
    Reward Points if Useful
    regards
    Avi.............

  • How to display CRT table in SAP Listviewer /ALV for a range of Emp numbers?

    Hi,
    I tried to download CRT tables in using report RPCLGA00, but it does not have SAP List Viewer nor ALV display.
    Wage Type reporter doe snot read CRT table.
    Do yo know a report which reads CRT and displays in List Viewer/ALV?
    Regards,
    Somar

    Hi,
    I tried to download CRT tables in using report RPCLGA00, but it does not have SAP List Viewer nor ALV display.
    Wage Type reporter doe snot read CRT table.
    Do yo know a report which reads CRT and displays in List Viewer/ALV?
    Regards,
    Somar

  • Error when transferring table data to a CSV format file.

    Hi
    I am getting an error when I am passing the parameter value for the file name from the selection screen. If i hard code the path and name it works fine. can any one help me please. here is my code:
    PARAMETERS: OUTFILE LIKE dxfile-filename
                           DEFAULT 'C:\Apositivepay.txt',
          RUNDATE LIKE PAYR-LAUFD,
          Bank LIKE T012K-HBKID.     "List of Possible Banks
    type-pools:TRUXS.
    DATA: BEGIN OF OUTPUT_REC OCCURS 0,  "Output file for USBANK
          ACCT(12),           "bank account no
          Payee2(40) type c,         "payee 2
          END OF OUTPUT_REC.
    data:  itab1 type TRUXS_T_TEXT_DATA.
      CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
        EXPORTING
             I_FIELD_SEPERATOR          = ','
         TABLES
             I_TAB_SAP_DATA             = OUTPUT_REC
         CHANGING
             I_TAB_CONVERTED_DATA       =  itab1
         EXCEPTIONS
              CONVERSION_FAILED          = 1
              OTHERS                     = 2.
    IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
            filename = OUTFILE  "This doesn't work
            filename = 'C:\Apositivepay.txt' "This works
         TABLES
              DATA_TAB            = itab1
         EXCEPTIONS
              FILE_OPEN_ERROR     = 1
              FILE_WRITE_ERROR    = 2
              INVALID_FILESIZE    = 3
              INVALID_TABLE_WIDTH = 4
              INVALID_TYPE        = 5
              NO_BATCH            = 6
              UNKNOWN_ERROR       = 7
              OTHERS              = 8.
    Message was edited by: Anwarul Kabir

    hi,
    use this code and save that file in CSV format it will work
    OPEN DATASET P_IFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH 'Problem in opening Application Server file'.
      ELSE.
        DO.
          READ DATASET P_IFILE INTO IT_UPLOAD.
          IF SY-SUBRC NE 0.
            EXIT.
          ELSE.
            APPEND IT_UPLOAD.
            CLEAR IT_UPLOAD.
          ENDIF.
        ENDDO.
        CLOSE DATASET P_IFILE.
      ENDIF.
      IF IT_UPLOAD[] IS INITIAL.
        MESSAGE E000 WITH 'NO data in the file/upload problem'.
      ENDIF.
      LOOP AT IT_UPLOAD.
        SPLIT IT_UPLOAD AT ','
                         INTO
                         IT_FDATA-MATNR
                         IT_FDATA-WERKS.
                        IT_FDATA-SLGORT.
        APPEND IT_FDATA.
        CLEAR  IT_FDATA.
      ENDLOOP.
       IT_TOTAL1[] = IT_FDATA[].

  • How to Display the table data ?

    Dear All ,
    Hi,
    i have a requirement that , i develop a one report program that contain one header and item internal table  values . Those header and item table details append to the final internal table(which contain all the header and item) . when i display the values all the the ticket_no will repeated.
    But client wants to display all the ticket_no will not  repeated. He wants output like..
    Please give me steps how to do this issue ?

    Dear Gopi,
    1) In decleration part you decleare like...!
        DATA: LT_SORT TYPE SLIS_T_SORTINFO_ALV,
                   WA_SORT TYPE SLIS_SORTINFO_ALV.
    2) Before  using ' REUSE_ALV_GRID_DISPLAY' Function module
           WA_SORT-FIELDNAME = 'TICK_NO'.
          APPEND WA_SORT TO LT_SORT.
         CLEAR WA_SORT.
    3) use FM : REUSE_ALV_GRID_DISPLAY. Like...!
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = 'X'
          I_CALLBACK_PROGRAM               = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
          I_CALLBACK_TOP_OF_PAGE           = ''
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
          I_STRUCTURE_NAME                 = LT_STRUCT
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
          IT_FIELDCAT                      = LT_FLDCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
        IT_SORT                          = LT_SORT
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
          I_DEFAULT                        = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
           T_OUTTAB                         = LT_FINAL
       EXCEPTIONS
          PROGRAM_ERROR                    = 1
         OTHERS                           = 2 .
        May be it is solve your issue.
    Regards
    K. Chinna..

  • Display mysql table data in a jsf page? (10 duke dollars up for grabs)

    hi,
    im having some trouble on how to display data from a mysql table in a JSF page under the JSF architecture. i need some help on the best and correct way of doing this?
    if you could provide code on how this is done, would be much appreciated.
    many thanks.

    I'm going to assume that you have had experience with doing this in jsp. Watch for my comments by the **** asterisks *****. My skill level is best described as intermediate, so you'll probably want to heed replies from the more accomplished members of the community to improve upon this advice.
    The jsp page:
    <%@ page language="java" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    ***** All of your jsf content must be between the f:view tags ******
    <f:view>
    <html lang="en-US" xml:lang="en-US">
    <head>
    <title>Page Title</title>
    </head>
    <body>
    ***** Here is the h:form tag which constructs the appropriate html form tag.
    ***** You don't need to worry about get/post and all that.
    <h:form>
    ***** The h:panelGrid constructs a table that I'm using purely for layout purposes *****
    <h:panelGrid width="800" columnClasses="textColumns">
    ***** the h:dataTable is doing the heavy lifting here. the var attribute is the name you
                   want to give to the data you're returning. The value
                   attribute it bound to a managed bean named MemberList in my faces-config and all refers
                   to a method named getAll (in bean style) that returns a java.sql.Result.
              ***** You can see below how the columns are laid out with the h:column tags and how the header for
                             the columns are named.
              ***** The dataTable iterates over each value in the outputText tags contained in the column tags.
                             It's bound by the var_name.query_field_name. The field name is the one bundled in your result
              ***** Scroll down to see the MemberList bean code.
    <h:dataTable var="foo" value="#{MemberList.all}">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:outputText value="#{foo.name}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="bar Number"/>
    </f:facet>
    <h:outputText value="#{foo.ANET_NUM}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Group"/>
    </f:facet>
    <h:outputText value="#{foo.CUST_GROUP}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Classification"/>
    </f:facet>
    <h:outputText value="#{foo.CLASSIFICATION}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Sector"/>
    </f:facet>
    <h:outputText value="#{foo.SECTOR}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Address"/>
    </f:facet>
    <h:outputText value="#{foo.ADDRESS1}"/><f:verbatim><br></f:verbatim>
    <h:outputText escape="false" value="#{MemberList.ADDRESS2} <br>"
    rendered="#{MemberList.ADDRESS2 != null}"/>
    <h:outputText value="#{foo.CITY}"/><f:verbatim>, </f:verbatim>
    <h:outputText value="#{foo.STATE}"/><f:verbatim>, </f:verbatim>
    <h:outputText value="#{foo.ZIP}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Purchasing Contact"/>
    </f:facet>
    <h:outputText value="#{foo.CONTACT}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Purchasing Phone"/>
    </f:facet>
    <h:outputText value="#{foo.WORK}"/>
    </h:column>
    </h:dataTable>
    </h:panelGrid>
    </h:form>
    </body>
    </html>
    </f:view>
    *** MemberList bean code:
    package bar.vendor;
    import bar.dbConnectionInfo;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.naming.NamingException;
    import javax.servlet.http.HttpSession;
    import javax.servlet.jsp.jstl.sql.Result;
    import javax.servlet.jsp.jstl.sql.ResultSupport;
    import java.sql.*;
    public class MemberList extends dbConnectionInfo {
    private Connection conn;
    public void open() throws SQLException, NamingException {
    ******* Here is where I set up my connection info. I store it in a separate class.
    ******* You'll set yours up according to your MySQL settings.
    conn = DriverManager.getConnection(getUrl(), getUsername(), getPassword());
              ******* The rest of this is pretty standard. The only exceptions is where I use the FacesContext
              ******* to get the session and getting a parameter map (see below)
    public Result getAll() throws SQLException, NamingException {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext extContext = facesContext.getExternalContext();
    HttpSession session = (HttpSession) extContext.getSession(true);
    ResultSet rs = null;
    String schema = getOracleOwner();
    String sql = "select distinct c.name, c. ANet_Num, ug.cust_group, ug.classification, c.sector, " +
    " a.address1, a.address2, a.city, a.state, a.zip," +
    " trim(cc.fname) || ' ' || trim(cc.lname) as Purchasing_Contact, cc.work " +
    " from "+schema+".cust c, "+schema+".vw_unique_cust_address u, "+schema+".cust_address a, " +
    " "+schema+".cust_group cg, "+schema+".vw_purchasing_contact pc, "+schema+".cust_contact cc, " +
    " "+schema+".baruser nu, "+schema+".dist_contact dc, "+schema+".contract con, " +
    " "+schema+".contract_access ca, "+schema+".vw_unique_cust_groups ug " +
    " where nu.id = ? " +
    " and c.SECTOR = ? " +
    " and nu.fk_dist_contact_id = dc.id " +
    " and dc.fk_dist_id = con.fk_dist_id " +
    " and con.id = ca.fk_contract_id " +
    " and ca.fk_group_type_id = cg.fk_group_type_id " +
    " and cg.fk_cust_id = c.id " +
    " and c.id = u.id " +
    " and to_number(substr(u.desc_type,2)) = a.id(+) " +
    " and c.id = pc.id(+) " +
    " and pc.cc_id = cc.id(+) " +
    " and c.status = 'Active' " +
    " and c.id = ug.id " +
    " order by ug.cust_group, c.name";
    try {
    open();
    PreparedStatement ps = conn.prepareStatement(sql);
    ps.setString(1, (String) session.getAttribute("baruserID"));
    **** This is cool. Look at the f:param tag as it pertains to commandButtons and commandLinks *****
    ps.setString(2,(String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("sector"));
    rs = ps.executeQuery();
    } catch (SQLException sqle) {
    System.out.println(sqle.getMessage());
    } catch (Exception e){
    System.out.println(e.getMessage());
    //close();
    return ResultSupport.toResult(rs);
    public void close() throws SQLException {
    if (conn == null) return;
    conn.close();
    conn = null;
    }

  • Get data from view and displaying the table data into Excel  pivot table

    Hi All,
    I have a small reqirement inthat When i get the data from the View that would displayed as Excel Pivot table.
    For displaying gerneral data to Excel I have followed Binarcy cachey
    Please suggest me in this.
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

    Try this:
    http://download-west.oracle.com/docs/html/B25947_01/bcservices005.htm#sthref681
    Specifically code sample 8-10 for accessing the AM object.
    Then use the findView method to get a pointer to the VO.

  • Table to be displayed in ALV format in WD.

    Hi Experts,Gurus.
    I want to display data in the ALV format in my web dynpro component. Can any please tell the procedure to achieve this
    Regards,
    Yugesh

    hi Yugesh ,
    refer this article :
    SAP List Viewer (ALV) [original link is broken]
    Configuring ALV
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/db22242d-0701-0010-28a2-aeaa1fefd706;jsessionid=(J2EE3414800)ID0133346050DB00727847586176044227End?overridelayout=true&bcsi_scan_06B6B0A4B65849C2=0
    using ALV
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4;jsessionid=(J2EE3417400)ID0488867050DB10849380333905377829End
    hope these basic tutorials help u .
    regards,
    amit

  • Regarding Table data display

    Hi experts,
    I have one ztable having some fields, the end user will not have authorize for (SE11 and SE16) . I want to make program for display that table data. And also want put filter options( Select-options) for all fields, User wants select some fields based on that fields want display all data from that table.  How can i do this?
    Please help me? Any coding?
    Thanks and Regards,
    Linganathan.K
    Moderator message : Not enough re-search  before posting, discussion locked.
    Message was edited by: Vinod Kumar

    Dear Linganathan,
    It is purely based on your requirement.
    1. If the users are strictly restricted for SE11 and SE16 then  table generator would be a probable option
    2. However, when you restrict SE11 and Se16 I do not think so you will give SM30 also...
    3. Are you allow user to maintain/edit the table?
    3. Do you want to provide selection parameter...
    Based on this, probably you should go for a small report program that displays data in the ALV format accepting the input parameters as selection range.
    Regards,
    Venkat

  • How to display webdynpro view data in PDF format.

    Dear All,
    Greetings!!!
    scenario :
    i am having five tabstrips  in a table , first four for the different kinds of data
    and fifth one is for to display all tabstrips data in a PDF format.
    Kindly let me know how to acheive this .
    is it possible with out ADLC..?  any demo or article is available for similar requirement?
    Thanks in Advance.
    Best Regards,
    Kranthikumar Palle.

    It's better to use the Adobe form to display your WD data. But you can choose Smartform as a PDF doc to display the WD data.
    Check out the thread [Display a Smartform as PDF document in WD ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785] for more details.

  • Storing data in data bse using nested tables

    using nested tables data can be stored in data base or not.
    if yes i need simple example for taht and how to retireve the data from data base.

    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11822/adobjvew.htm#ADOBJ00511
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/composites.htm#LNPLS99981

Maybe you are looking for

  • Need help: Unable to tether, personal hotspot settings are ON

    Was hoping to see if I can get a solution here. Network service provider couldn't fix it. 1. tethering is enabled for the network I'm on. 2. My "Personal Hotspot" is on. 3. iPhone plugged in via USB 4. iTunes is running. Unfortunately, it doesn't tet

  • AE2220 no power, just black screen.

    I opened up my AE2220 to clean the fan. After I closed it up again it doesn't work anymore. It starts up, the blue led lights up, the fan runs, but the screen stays black and I have no power in my USB ports as well. Can anybody tell me what to do? Th

  • Different Audio Outputs Logic Studio 8

    Hello. I was wondering if apple was able to do this, because that would save a lot of plugging and unplugging of cables and such. Is it possible to select different audio outputs for different programs that you are using on the imac? I run logic stud

  • How to agree the term and condition for mobile application

    i would like to click agree with iphone new term and condition for mobile application, but couldn fint the button to click agree....

  • On switch doesn't work properly

    Whenever my Ipod is not used for more then 20 minutes, I need to reset (hold menu and center button) before it will work again. Any ideas on how to fix?