Calling smartform and displaying ALV grid in ABAP WEBDYNPRO

Hi all,
I am new to ABAP web dynpro.I ahve few custom reports which are simple ALV list reports which I now need to convert to ABAP web dynpro application .
For one particular report,based on the selection screen input,I need to display the ALV list and when I select the records from the ALV list,I need to call a smartform on clik of a push button.
My questions:
1. Im using 'REUSE_ALV_GRID_DISPLAY' FM  to display the o/p in my report.Is there any similar FM in webdynpro ABAP which will display my list in ALV GRID in my web dynpro application??/
2. How to call a smartfrm in ALV grid in web dynpro??
Edited by: abap_1000 on Jan 9, 2011 6:09 PM

Hi,
You can search SDN, there are several posts available. Just to get some idea, you can check --
[Beginneru00B4s questions on WDA ALV;
[Reg ALV Display;
For clicking event on ALV --
[Reg Row Data fetching on click in ALV;
For ALV display on WDA --
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true]
Thanks.
Kumar Saurav.

Similar Messages

  • List header for alv grid using abap objects

    Hai all,
          I have displayed alv grid in container control using abap objects i.e. using method set_table_for_first_display.
    now i need to display list header for this alv grid.
    please help me how to create with a sample coding.
    Thanks and regards,
    Prabu S.

    Create a splitter using CL_GUI_EASY_SPLITTER_CONTAINER with a top and bottom half.  Put the alv grid in the bottom half.  Use cl_dd_document (documented in help.sap.com )  to build the header in the top half.  Use events on CL_GUI_ALV_GRID to handle the top-of-list printing.
    Or, if available, use CL_SALV_TABLE, and read the documentation on that.  When I needed a header for my report, that's what I did.  There's plenty of good documentation about if you'll search for it.
    matt

  • Hide some cells while displaying ALV GRID !

    Hi guyz!
        Back with lill query,
        While displaying ALV GRID using REUSE_ALV_GRID... FMs ,i need to hide
        some cells by default, when the lists is generated.But those cells should
        be  availble to be displayed by the user from ALV layout settings.
        Please advise
    Thanks
    jahan

    Hi, Check for fm documentation.
    Only relevant if layout parameter
    LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set.
    Complex type for modifying information displayed on the selection dialog box:
    mode:              'R' = Only entries passed in internal table
                              IS_SEL_HIDE-T_ENTRIES are output on
                              the dialog box. Selection information
                              obtained by the list tool by reading the
                              selection screen again (only if the report
                              is called with selection screen) are
                              replaced by the entries passed.
                       'S' = The selection information obtained by the
                              list tool by reading the selection screen
                              of the calling report again, are modified
                              by the entries of table
                              IS_SEL_HIDE-T_ENTRIES.
    t_entries:         Table with selection information
    t_entries-mode:   'A' = Display selection information of the current
                             table row on the information dialog box.
                      'D' = Do not display selection information of the
                             the Select option or of parameter SELNAME
                             on the dialog box.
    t_entries-selname: (required only if t_entries-mode = 'D')
                       name of Select option or parameter
    The following table fields are only required if t_entries-mode = 'A'. They contain the selection information to be added.
    t_entries-field:  DDIC field name of the field for which selection
                       information is to be displayed
    t_entries-table:  DDIC table name of t_entries-field.
    t_entries-stext:  Field description on the information dialog box.
                      If t_entries-field and t_entries-table were
                      filled, this text is taken from the DDIC.
    t_entries-valuf:  Selection condition from-value (external format)
    t_entries-valut:  Selection condition to-value (external format)
    t_entries-sign0:  (I)nclusive (E)xclusive
    t_entries-optio:  All values of the option field of the Select
                      option are allowed.
    The remaining fields are used internally and are irrelevant to the caller.
    aRs

  • Display ALV GRID Using Dynamic Internal Table

    Hi all,
    I try to display ALV Grid using Dynamic Internal Table, but when i activate my program, i get an error message "DYN_TABLE" is not type-compatible with formal parameter "IT_OUTTAB". ( DYN_TABLE is my Dynamic Itab).
    Anybody can help me how to passing Dynamic Itab into ALV Grid ?? Of ALV Grid only accept static Itab ??
    Thanks,

    Hi Vijay,
    It's doesn't work, and make new error "Formal parameter "IT_OUTTAB[]" does not exist. However, the parameter "IT_OUTTAB" has a similar name."
    Because the method is:
    CALL METHOD <ref. var. to CL_GUI_ALV_GRID>->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE = <any type (ANY)>
    I_STRUCTURE_NAME = <string of type DD02L-TABNAME>
    IS_VARIANT = <structure of type DISVARIANT>
    I_SAVE = <var. of type CHAR01>
    I_DEFAULT = <var. of type CHAR01>
    IS_LAYOUT = <structure of type LVC_S_LAYO>
    IS_PRINT = <structure of type LVC_S_PRNT>
    IT_SPECIAL_GROUPS = <internal table of type LVC_T_SGRP>
    IT_TOOLBAR_EXCLUDING = <internal table of type UI_FUNCTIONS>
    IT_HYPERLINK = <internal table of type LVC_T_HYPE>
    IT_ALV_GRAPHICS = <internal table of type DTC_T_TC>
    CHANGING
    IT_OUTTAB = <internal table>
    IT_FIELDCATALOG = <internal table of type LVC_T_FCAT>
    IT_SORT = <internal table of type LVC_T_SORT>
    IT_FILTER = <internal table of type LVC_T_FILT>
    Thanks,

  • How to Generate and Display SVG Graphics in ABAP

    Hi everybody,
    I tried to complete the Tutorial "How to Generate and Display SVG Graphics in ABAP, Part 1" by Siarhei Ulasenka (https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ad83a990-0201-0010-d680-a189f8bc20fa).
    Unfortunately when I tried the example to display an SVG Drawing in an ABAP Report I get the error message "Es ist ein Laufzeitfehler aufgetreten, ungültiges Zeichen" (english should be something like "Runtime Error, unkown character"). But it works when I open the svgfile in a new IE Window (parameter in_place from cl_gui_html_viewer->show_url). Also when I open a svg file from the local disc it works fine.
    The code:
        CALL METHOD html_control->load_data
          EXPORTING
            url            = 'chart.svg'
            type         = 'image'
            subtype    = 'svg+xml'
          CHANGING
            data_table = lt_svg
          EXCEPTIONS
            OTHERS     = 1.
        CALL METHOD html_control->show_url
          EXPORTING
            url        = 'chart.svg'
            in_place   = 'X'
          EXCEPTIONS
            cntl_error = 1.
    Has anyone a solution? Thanks in advance for your help!
    Regards
    Kathrin

    Hello Alex,
    The Corel SVG viewer has problems loading and displaying the examples (see the list of limitations at their site). Try to use the Adobe viewer instead.
    Regards,
    Sergei Ulasenka

  • Problem in displaying Alv grid output  using oops........

    hi,
    i have two problems in displaying ALV grid output Using Oops.
    1) How to modify the fieldcatalog after we getting a field catalog using general FM.
    2) initialy it is displaying 13 fields but there are 63 fields .
       eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count  of displayed fileds are same . how can display 63 fields at a time .

    Hi,
    You can chnage using below code:
    loop at gt_fieldcat.
    if <gt_fieldcat-field_name> = 'FIELDNAME'.
    endif.
    modify gt_fieldcat.
    clear gt_fieldcat.
    endloop.
    Make sure that all the field should not have no_out = 'X' and tech = 'X'.
    Thanks,
    Sriram Ponna.

  • Reg. can we display alv grid using field groups (extracts)

    Hi,
    can we display alv grid using field groups (extracts). is this possible. i have to develop a blocked alv.
    tnks
    Yerukala Setty

    No, you will need the data in an internal table to use ALV.
    Cheers
    Allan

  • How to retrieve Task Lists from All Subsites to the Parent Site and display in Grid view using CAML Query

    How to retrieve Task Lists from All Subsites to the Parent Site and display in  Grid view using CAML Query + object model

    do u just want task list or items under task list for all subsites
    for items use spsitedataquery ref
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx use recursive to get it from alll subsite under site collection
    for tasklist only u can a simply use a for loop to find in all subsite
    Manish Sati

  • Display Word Document in ABAP WebDynpro

    Hi All,
    We have a number of word documents stored in the Business Document Navigator (Transaction OAOR) that we would like to display within a simple ABAP WebDynpro.  Demo program SAPRDEMO_FORM_INTERFACE shows how to retrieve a document from BDS via class cl_bds_document_set.  However, I am not seeing a similiar program for ABAP Web Dynpro.
    I was hoping that WebDynpro test application IOS_TEST_SIMPLE_MS would do the trick; however that appears to only work for a MIME repository object.  Is there a way to display these documents through ABAP WebDynpro?  Can anyone point me to a sample program?  Thanks.
    John

    Hi John
    Have a look at this thread [     Approach content repository other way then URL approach  |Re: Approach content repository other way then URL approach;.
    Thomas Jung delivers some (as always) excellent answers to a very similar problem. If the document is in DMS or BDS really doesn't matter so if I were you I would follow the "cached response" path.
    Also, do a google-search for --  abap "cached response" -- and you will find some additional links here (Thomas has even more to offer...).
    If you do follow this path please share some details as a follow up in this thread for the benefit of the community at large.
    Regards, Johan

  • Generic function displaying alv grid for undefined structure

    Hi experts,
    I'm doing my first steps on abap development (Totally noob).
    I'm writing some little reports based on simple selections (1 or 2 tables).
    In every report, I've defined a structure (internal table) that i'm displaying with an ALV Grid.
    In every report, I need to create a catalog for my structure in order to make the alv grid working.
    What I would like to do is :
    Create a function that receives a undefined structure (for all my reports) as a parameter.
    This function sould create the catalog for the coresponding structure and call the alv grid function to display the data's contained in this structure.
    The goal is : In every report, I would like to use this function to show the selected data's without taking care of catalogs, alv grid, etc...
    Is it possible ?
    I really don't see how I can do that... Does anybody already tried something like that ?
    Thank you for your help
    Regards
    Quentin

    Hi,
    In this method Pass the structure name-
    CALL METHOD gh_grid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = "<- here pass the structure
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT = "<-Layout variable if using layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    it_outtab = gt_line[]
    it_fieldcatalog = gt_fieldcat
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4

  • How to set variant for ALV grid from ABAP

    Hello,
    I have a program which displays some data with ALV grid. Then after some operation I would like to set different layout for the grid, but not by choosing it manually but by the program. I thought that it would be enough to use the method SET_VARIANT, so I'm setting DISVARIANT structure properly, using SET_VARIANT method and after that I'm calling REFRESH_TABLE_DISPLAY but layout is not changed. What else should I do? Is that possible?
    Best regards,
    Marcin

    Hi,
    Check this
    * While declaring select-options
    parameters: p_vari        like ltdx-variant.  " Layout
    * then add the following code in
    at selection-screen on value-request for p_vari.
      perform f_variant_f4 using p_vari.
    * Code for f_variant_f4
    form f_variant_f4 using  p_vari.
    * private variables
      data : v_exit    type c.
      clear gs_variantt.
      v_variant_save = 'U'.
      call function 'LVC_VARIANT_F4'
        exporting
          is_variant    = gs_variant
          i_save        = v_variant_save
        importing
          e_exit        = v_exit
          es_variant    = gs_variantt
        exceptions
          not_found     = 1
          program_error = 2
          others        = 3.
      if sy-subrc ne c_0.
        message i999(yscc) with text-064.    " No Layout Available for F4
      endif.
      if v_exit is initial.
        gs_variant-variant = gs_variantt-variant.
        p_vari             = gs_variantt-variant.
      endif.
    endform.                                 " F_variant_f4
    * In PBO
        call method grid1->set_table_for_first_display
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant
            i_save                        = 'A'
            it_toolbar_excluding          = i_exclude[]
          changing
            it_outtab                     = i_output[]
            it_fieldcatalog               = i_fieldcat[]
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4.

  • Re-Displaying ALV Grid

    This is a follow-up to a question I posed earlier regarding my inability to get the ALV grid to display with a new table name.
    Can anyone tell me what I need to do to get it to re-display with the new table name?
    To use it, you enter a table name in the editor screen.  Screens 100 and 200 are just custom containers with no other attributes.
    Thanks (and points) for any help!
    PROGRAM zz_temp.
    TYPES: BEGIN OF type_text_lines,
      line(2048) TYPE c,
    END OF type_text_lines.
    DATA: g_editor             TYPE REF TO cl_gui_textedit,
          g_r_editor_container TYPE REF TO cl_gui_custom_container,
          g_r_alv_grid         TYPE REF TO cl_gui_alv_grid ,
          g_r_alv_container TYPE REF TO cl_gui_custom_container ,
          g_container          TYPE scrfname VALUE 'ALV_CUSTOM_CONTROL_0200' ,
          g_t_text_lines       TYPE TABLE OF type_text_lines,
          g_t_fcat             TYPE lvc_t_fcat,
          g_ok_code            TYPE sy-ucomm,
          g_save_ok            TYPE sy-ucomm,
          g_repid              TYPE sy-repid,
          l_tab(20)            TYPE c.
    FIELD-SYMBOLS <struc>  TYPE ANY.
    FIELD-SYMBOLS <tab>    TYPE table.
    DATA s_ref             TYPE REF TO data.
    DATA t_ref             TYPE REF TO data.
    START-OF-SELECTION.
      CALL SCREEN 100.
    FORM runsql.
      CONCATENATE LINES OF g_t_text_lines INTO l_tab.
      CREATE DATA s_ref      TYPE (l_tab).
      CREATE DATA t_ref      TYPE TABLE OF (l_tab).
      ASSIGN t_ref->*    TO <tab>.
      SELECT * FROM (l_tab) INTO TABLE <tab>.
      CALL SCREEN 200.
    ENDFORM."
    MODULE pbo OUTPUT.
      CASE sy-dynnr.
        WHEN '0100'.
          IF g_editor IS INITIAL.
            SET PF-STATUS 'MAIN100'.
            g_repid = sy-repid.
            CREATE OBJECT g_r_editor_container
            EXPORTING
              container_name = 'TEXTEDITOR1'
            EXCEPTIONS
              cntl_error = 1
              cntl_system_error = 2
              create_error = 3
              lifetime_error = 4
              lifetime_dynpro_dynpro_link = 5.
            CREATE OBJECT g_editor
            EXPORTING
              parent = g_r_editor_container
              wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
            EXCEPTIONS
              OTHERS = 1.
          ENDIF.
        WHEN '0200'.
          PERFORM create_alv_grid.
      ENDCASE.
    ENDMODULE."
    MODULE pai INPUT.
      g_save_ok = g_ok_code.
      CASE g_save_ok.
        WHEN 'BACK'.
        WHEN 'EXIT'.
        WHEN 'CANCEL'.
          PERFORM exit_program.
        WHEN 'RUNSQL'.
          CALL METHOD g_editor->get_text_as_r3table
            IMPORTING
              table  = g_t_text_lines
            EXCEPTIONS
              OTHERS = 1.
          PERFORM runsql.
      ENDCASE.
    ENDMODULE."
    FORM create_field_catalog.
      DATA: l_structure_name LIKE  dd02l-tabname.
      CLEAR g_t_fcat.
      l_structure_name = l_tab.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = l_structure_name
          i_bypassing_buffer     = 'X'
        CHANGING
          ct_fieldcat            = g_t_fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM."
    FORM create_alv_grid.
      DATA:        l_s_layout      TYPE lvc_s_layo.
      CLEAR: g_r_alv_container,
             g_r_alv_grid.
      PERFORM create_field_catalog.
      CREATE OBJECT g_r_alv_container
             EXPORTING container_name = g_container.
      CREATE OBJECT g_r_alv_grid
             EXPORTING i_parent = g_r_alv_container.
      CALL METHOD g_r_alv_grid->set_table_for_first_display
        EXPORTING
          is_layout          = l_s_layout
          i_bypassing_buffer = 'X'
        CHANGING
          it_outtab          = <tab>
          it_fieldcatalog    = g_t_fcat.
      CALL METHOD g_r_alv_grid->refresh_table_display.
    ENDFORM."
    FORM exit_program.
      CALL METHOD cl_gui_cfw=>flush
        EXCEPTIONS
          OTHERS = 1.
      LEAVE PROGRAM.
    ENDFORM."

    Hello Bjorn
    I would recommend a few changes:
    (1) Create the container and ALV grid instance for screen '200' only once (in a PBO module of screen '200' using a switch:
    CHECK ( g_r_alv_container IS INITIAL ).
    (2) Call method SET_TABLE_FOR_FIRST_DISPLAY in a PBO module of screen '200'. Perhaps add a "flush" to this PBO module, too.
    Regards
       Uwe

  • Calling a Transaction from ALV Grid Using OO method

    Hi,
    My requirement is as follows....
    I have an ALV grid with columns such as PO no., GR no., Invoice no., etc...
    When I double click on any of these cells it should take me to the respective Transaction (say ME23n for PO no.) with the cell content as input in the transaction.
    Thanks and Regards,
    Navaneeth

    Hi,
      then u can write the code in HANDLE_DOUBLE_CLICK method
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *method used for double click
        HANDLE_DOUBLE_CLICK
            FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                IMPORTING E_ROW E_COLUMN,
    ENDCLASS.                    "LCL_EVENT_RECEIVER DEFINITION
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
    *implementation of the method double click
    *when document no is double clicked in ALV GRID , its value is sent to
    *transaction FPE3 and the corresponding values of the document are
    *displayed
      METHOD HANDLE_DOUBLE_CLICK.
        CLEAR WA_WRT_OFF_FLDS.
        IF E_COLUMN = 'OPBEL'.
          READ TABLE ITAB INTO WA_IAB INDEX E_ROW-INDEX.
               set parameter....
               call transaction...
          endif.
           ENDMETHOD.                    "handle_double_click
    *method to remove unwanted icons from toolbar
    endclass.

  • Calling a transaction in alv grid

    hi friends,
                 can anyone tell me how i could call a transaction se11 in an alv grid display.i want both in double clicking and by using a button.

    Hi,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = v_repid
    i_callback_user_command = 'USER_COMMAND1' <-------
    is_layout = wa_layout
    it_fieldcat = i_fcat
    i_default = c_chk
    i_save = c_save
    is_variant = wa_variant
    it_events = i_events
    is_print = wa_print
    TABLES
    t_outtab = i_table
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    LEAVE LIST-PROCESSING.
    ENDIF.
    Form user_command1 using rs_selfield type slis_selfield
    u_comm like sy-ucomm.
    case '%IC1'.
    When '...'.
    endcase.
    Hope this solves your purpose.
    Award points if it helps.
    -Gaurang

  • ALV grid to ABAP list

    Hi ,
    I am displaying data in ALV grid, using a button I am updating Production orders, if the order is successfully updated, i need to write the text" Order updated" to list.
    I am using statement leave to list processing .
    the text is dislayed in list but i am not able to go BACK to ALV grid or selection screen.
    How to navigate to list from ALV and from list to ALV.

    My gut tells me you won't be going for BAL_DSP_LOG_DISPLAY and stick to list.
    In which case check if you also use
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
      LEAVE SCREEN.
    and to get back to your screen:
    LEAVE LIST-PROCESSING
    edit.
    And do you have a PF-status when you're in the list? One with a back button?

Maybe you are looking for

  • Exchange Server 2013 // MFCMAPI could connect with errors

    While connecting with Exchange Server 2013 I have started facing problem with my application. My application fails to connect to Exchange with below parameters, then i have tried using MFCMAPI to if everything is okay. MFCMAPI could connect with abov

  • Problem copying large groups of files

    In attempting to send a backup of my aunt's music, I began dragging her songs out of iTunes and into a folder on my desktop. The first group of 736 songs completed without a problem. But then I tried dragging over another group of ~500 songs and the

  • Change default layout in 0ANALYSIS_PATTERN

    Hi, I'm using the 0ANALYSIS_PATTERN as a template for my reports. When I run the report it opens up the "table" view by default. Now I would like to change this so that the report will start by showing the Chart instead. How can I do this? There is a

  • Problems with establishing daisy chain, FW800

    Hi there! I am experiencing some weird problems when trying to daisy chain two or more drives with FW800. It was working fine until yesterday, when suddenly the second drive in the chain wouldn't show up in finder. Also, connecting/disconnecting the

  • View constraints in 10g

    In 10g what is the use of primary key constraint on view . Data will come from base table. So constraints of base table will affect data.