ALV Table with Business Graphics

Hi All,
In one of my Scenarios, I have to display the Employee details in a table with the Business Graphics. I have to do this with alv.As I am new to alv so if any one is having any tutorials on this topic or any application according to it then tell it along with description.
Thanking you all in advance.

Hi,
This is very simple to get the ALV table with graph.
check the below code..
  l_value = l_ref_interfacecontroller->get_model(
call this method in your code you will get table with graph.
l_value->if_salv_wd_table_settings~set_display_as(  
     value = '02'
Thanks
Suman
Edited by: suman kumar chinnam on Sep 17, 2008 9:06 AM

Similar Messages

  • WD4A Dynamic ALV Table with dynamic tables

    Hi all,
    first I want give you the information what I try to do.
    I have an another WD4A application for administrative use in which I can assign certain tablefields to a certain user. You can say it's something like a customizing application.
    In the next application (with my issues) I will display the tables for the user, but these tables are not the complete table.
    I have a node in my context of the component controller which is bound to my ALV. I add during the runtime attributes to my node.
    * .... coding ....declaration
    * get the node
      lr_node = wd_context->get_child_node( 'M_TABLE' ).
      lr_node_info ?= lr_node->get_node_info( ).
    * remove the attributes, if exists
      lr_node_info->remove_dynamic_attributes( ).
    * .... coding ....
    *   add attributes
        LOOP AT l_t_m_table INTO l_s_m_table.
          CLEAR ls_attribute.
    *     name of the attribute
          MOVE l_s_m_table-NAME TO ls_attribute-NAME.
    *     DDIC type of the attribute
          MOVE l_s_m_table-TYPE_NAME TO ls_attribute-TYPE_NAME.
    *     If the DDIC has a gen namespace like /B135/ replace the / with _
          REPLACE ALL OCCURRENCES OF '/' IN ls_attribute-NAME WITH '_'.
    *     add the attribute
          lr_node_info->add_attribute( EXPORTING
                                         attribute_info = ls_attribute ).
        ENDLOOP.
    This coding works fine I get the columns in my ALV. Then I tried to fill my ALV table with data from a database table.
    I created dynamicly an internal table with the following coding:
    *   Create dynamic table
        CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
          EXPORTING
            IT_FIELDCATALOG = l_t_FLDCAT
          IMPORTING
            EP_TABLE = l_t_NEW_M_TABLE.
    *   assign the table
        ASSIGN l_t_NEW_M_TABLE->* TO <M_TABLE>.
    *   structure of table
        CREATE DATA l_s_NEW_M_TABLE LIKE LINE OF <M_TABLE>.
        ASSIGN l_s_NEW_M_TABLE->* TO <l_s_m_table>.
    * get data from database
    SELECT * FROM (l_m_table) INTO CORRESPONDING FIELDS OF TABLE <M_table> WHERE OBJVERS = 'A'.
    With this coding I get the data from the database and only the required fields that means I have e.g. an itab with columns1, columns3, columns4 from the database.
    I also added e.g. these columns  (columns1, columns3, columns4 from the database) to the node as attribute. Now it should be possible to bind the table to the structure with this coding:
    lr_comp_usage_m = wd_this->wd_cpuse_usage_alv_M_table( ).
    *   create component if not active
        IF lr_comp_usage_m->has_active_component( ) IS INITIAL.
          lr_comp_usage_m->create_component( ).
        else.
    * set data if node exists
          l_ref_interfacecontroller = wd_this->wd_cpifc_usage_alv_M_table( ).
          l_ref_interfacecontroller->set_data( lr_node ).
        endif.
    *   bind table
        lr_node->bind_table( <M_TABLE> ).
    Now, I get an error, which is caused by the table binding.
    In ST22 I get:
    Short text
        Line types of an internal table and a work area not compatible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_WDR_CONTEXT_NODE_VAL=======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        The statement
           "INSERT wa INTO TABLE itab"
        requires the lines of the internal table "TABLE" and the
        work area " wa" to be compatible. Compatibility means
        equivalence in the context of ABAP/4 type checking.
        In this case, the condition is not satisfied because the internal table
        "TABLE" has the line type "u" and the length 28, but the work area " wa"
        has the type "C" and the length 2.
        (If the work area " wa" is the header line of the internal
        table "TABLE", the above inconsistency can arise if an internal
        table t with the line type T1 is passed to a subroutine (FORM or
        FUNCTION) as an actual parameter and the corresponding formal
        parameter p is declared in the subroutine by "TABLES p STRUCTURE T2".
        If then T1 and T2 are incompatible, the header line p
        has the type T2 (specifed by STRUCTURE), but the internal
        table p has the line type T1 (passed from the actual parameter)).
    Source Code Extract
    Line  SourceCde
        1 method if_wd_context_node~get_static_attributes_table .
        2
        3   field-symbols:
        4     <element> like line of me->collection,
        5     <static_attributes> type data,
        6     <table> type index table.
        7
        8 * check whether elements are supllied or not
        9   if me->elements_supplied = abap_false.
       10     me->supply_elements( ).
       11   endif.
       12
       13   clear table.
       14
       15   if me->table_ref is not initial.
       16     assign me->table_ref->* to <table>.
       17     table = <table>.
       18   else.
       19     loop at me->collection assigning <element> from from to to.
       20       assign <element>->static_attributes->* to <static_attributes>.
    error in line 21       insert <static_attributes> into table table.
       22     endloop.
       23   endif.
       24
       25 endmethod.
    Any suggestions? Is it allowed to use bind_table() with a field symbol?
    Another strange thing is that if I try the same with static itab and attributes during runtime it works, but only if the fields of the itab has the same name as the attributes, which means that I can not use itabs with fieldnames like /BI0/S_CUSTOMER and if I can not use them it's difficult to read data from database with SELECT * FROM ... INTO CORRESPONDING FIELDS OF TABLE itab.
    Thanks in advance for your suggestions!
    Best Regards,
    Marcel

    Hi Francois,
    I solve it with the RTTI and the method    
    lr_node_info = lr_node_info->add_new_child_node(
                          name = 'Dynamic_TABLE'
                          IS_MANDATORY = ABAP_false
                          IS_MULTIPLE = ABAP_true
                          STATIC_ELEMENT_RTTI = lr_struct_descr
                          IS_STATIC = ABAP_false
    I don't know why it doesn't work with adding attributes and binding the table after adding the attributes.
    Anyway thanks for your help.
    Best Regards,
    Marcel

  • Reporting of recursive tables with Business Objects 6.1

    Post Author: pk7
    CA Forum: Publishing
    Can anyone tell us how to traverse recursive tables with Business Objects 6.1?  For example, let's say you have an Employee table with Emp_ID, Name, Manager_ID.  Like so:
    Emp_ID  Name   Manager_ID
    1           Jeff           4
    2          Grace        3
    3           Stacey      1
    4           Wayne      null
    The task is to report the hierarchy of employees starting with one employee (e.g. Grace) and showing who ALL of her superiors are.  Desired result would be:
    Grace
          Stacey
                Jeff
                       Wayne
    We have seen the expanation the seems to require the duplication of a table but we prefer not to have the same data stored in multiple tables.
    Thx!

    Hi Dan,
    Thanks for your response. However, what I meant by client installation is exactly as what you have said below.
    I start the BusinessObjects Enterprise XI 3.1 Setup, go to custom install, which shows up the following options-
    Client Components
    Web Tier Components
    Server Components
    Database Access
    etc. etc.
    Initially I unselected all, drilled down Client Components and just installed the Developer Components. But the code used to fail with an InvalidCast exception when we used to cast an InfoObject to a Report as following-
    Report report = (Report)infoObjects[1];
    This code used to work fine with earlier installations of business objects.
    This happened with all 3 of us who installed just the Dev components. To get over this we installed the whole Client Components and the above problem got resolved.
    And now we realize that even the whole Client Comp is not enough because it gives the casting problem while doing the destination stuff.

  • Click-enable Gantt chart with Business Graphic

    Hi all,
    I know that it's possible to create a gantt char with Business Graphic. But can you tell me if it's possible to add events to the elements of the graphic?
    Or maybe there are other types of object that allow this.
    In bsp there is the phtmlb:gantchart, is there a java package phtmlb?
    Thanks and Best Regards,
    Paulo Ruivo

    Hi Paulo,
    U have onAction event in view designer.Also refer this
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/ed/258841a79f1609e10000000a155106/frameset.htm">Business Graphics Events</a>
    Hope it helps,
    Regards,
    Nagarajan.

  • Problem with Business Graphic:

    Hi Everybody!
    I am working with a UI control Business Graphic in WebDynpro Java,
    I need to change the text of the legend, and is taking an automatic value, what is the property in the Chart Designer where I can adjust this?
    Thanks in advance for your help.
    Edited by: Briger Palacios on Jul 6, 2011 11:16 PM

    Hi Briger,
    For Changing ur own legend , just write the label property of "SimpleSeries" ,which comes under  your "BusinessGraphics" .
    As many simple series will be there, that much no of legend is require, so just write your label of each simple series.
    if any doubt , plz let me knw.
    Regards
    Brajesh Kumar

  • Problem with Business Graphics

    Hai,
    I am using Business graphics , I Used to display the simple series in a <b>coloumns</b> graph.
    I want to display the total amount of the graph in top of every coloumn..
    I want to display the value of the coloumn at the top of the coloumn.
    i need the above graph as
    3
    2
    1
       |----
    How to display the values in graph like this.....
    regards,
    Message was edited by: Naga Raju Meesala

    hai,
      my context structure is like this
        +ABC
           series2(double)
           series3(double)
           series4(double)
           series5(double)
           series6(double)
    My UIElement Structuer
         +BG1
            Category1
             SimpleSeries2
             SimpleSeries3
             SimpleSeries4
             SimpleSeries5
             SimpleSeries6
    code is like this..
    IPrivateFBGAppView.IAbcNode aNode = wdContext.nodeAbc();
         IPrivateBGAppView.IAbcElement elm;
    elm = wdContext.createAbcElement();
         elm.setCategoryText("Cat");
            elm.setSeries2(32);     
            elm.setSeries3(23);
            elm.setSeries4(45);
            elm.setSeries5(32);
         elm.setSeries6(18);
         al.add(elm);
    regards,
    Message was edited by: Naga Raju Meesala

  • Coloumn Graph with Business Graphics

    Hi
    1) I am using WebDynpro business graphics stacked column graph, in that i need to show Label values. I am getting my Label value but and on the top of the columns i am getting 0 number.
    I want to remove the 0 number.
    I set the Defaultseries format value is 0 and even i kept empty i am getting the 0 value on the top of the columns.
    Please can one suggest me what property i need to set
    2) I am using Lines graph. Is it possible to gives the hyperlinks on the points.If we click on the points based on the parameter it as to show other result.
    How can i give the links to the lines graph points.
    Please any one help on my problems.

    Hi Vani,
    IPrivateGanttTestView.ISeriesNode seriesNode = wdContext.nodeSeries();
        for (int seriesIndex = 0; seriesIndex < timeValues.length; ++seriesIndex)
          IPrivateGanttTestView.ISeriesElement
                  seriesElement = seriesNode.createSeriesElement();
          seriesNode.addElement(seriesElement);
          // set series attributes (...)
          IPrivateGanttTestView.IPointNode pointNode = seriesElement.nodePoint();
          // loop over points
          for (int pointIndex = 0; pointIndex < timeValues[seriesIndex].length;
               ++pointIndex)
            IPrivateGanttTestView.IPointElement
                    pointElement = pointNode.createPointElement();
            pointNode.addElement(pointElement); 
             pointElement.setStartValue(timeValues[seriesIndex][pointIndex][0]);
            pointElement.setEndValue(timeValues[seriesIndex][pointIndex][1]);
            pointElement.setCuId(pointCustomizing[seriesIndex][pointIndex]);
            pointElement.setLabel(pointLabels[seriesIndex][pointIndex]);   
            pointElement.setToolTip("<put your  the test here>");
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/84/d33481f0bd794ba9b9ef8f4b5fa73b/frameset.htm">Code Example for Displaying a Gantt Chart</a>
    Regards,
    Mithu

  • ALV table with two dimensions and a link in each cell to a document

    Hi,
    I want to create an ALV output for a 2-dimension table. The table should look like:
    ---  |  Col1  |  Col2  | ...
    L1 | Cell11 | Cell12 | ...
    L2 | Cell21 | Cell22 | ...
    Do you have any hints how I could implement such a two dimensional ALV with different links when clicking on Cell11, Cell12, Cell21, ....
    Thanks for your help!
    Caroline

    if u use OO ALV,
    1.on clicking CELL1, CELL2 etc, to get different links,
    u can put hotspot for the fields in fieldcat
    and u can handle method
    button_click event of cl_gui_alv_grid.
          CLASS LCL_EVENT_RECEIVER DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS HANDLE_CLICK_ROW_COL
        FOR EVENT CLICK_ROW_COL OF CL_GUI_ALV_GRID
        IMPORTING ROW_ID COL_ID.
    ENDCLASS.                    "cl_event_receiver DEFINITION
          CLASS CL_EVENT_RECEIVER IMPLEMENTATION
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_BUTTON_CLICK.
        perform button_click using ROW_ID COL_ID.
      ENDMETHOD .                    "handle_top_of_page
    ENDCLASS .                    "cl_event_receiver
    2.
    FOR GETTING TWO DIMENSIONS, HANDLE PRINT_TOP_OF_PAGE
    and using write statements, build a row at the top of grid.
    or else
    IN THE LAYOUT , U CAN PLACE BUTTONS JUST ABOVE THE CUSTOM CONTAINER

  • Dynamic Table with ALV

    Hello.
    My WD Application should offer a editable ALV Table View.
    The structure and content of the table is only known at runtime. How can I use the ALV dynamically, so that I also can detemine the cells properties (dropdown, data type, ...) at runtime.
    Does anybody know some examples using ALV?
    Thanks and kind regards.
    Carola
    P.S: what are the advantages to use ALV instead of a table UI element?

    Hi Carola,
    Try going through this [thread|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783] for info about using an ALV Table with Dynamic Context Nodes.
    The ALV provides many useful built in features without the need for any additional programming effort. These are:
    • Sorting
    • Filtering
    • Selecting rows
    • Scrolling up/down
    • Exporting to Microsoft Excel
    • Exporting to PDF
    The Settings link can be used to open a dialog box, which allows you to adapt
    additional settings:
    • Hiding columns
    • Defining sorting columns and sorting direction
    • Defining complex filters
    • Changing table display settings
    • Defining settings for PDF export
    These settings can be saved and used as the user's default display variant.If the Web Dynpro application is started in Customizing mode (adding sap-config-mode=X to the URL), the settings can be saved for all users. In addition, the settings can be added to a transport request using a Customizing task.
    Regards,
    Uday

  • On click event in ALV table

    Hai,
    I have an ALV table with 5 rows.In the column i have button for all the rows.Suppose if i click the button in 4 th row i want to get the index of the row choosed.Can anyone tell me how to do it ot if you have the code please help me.
    Regards,
    Ram Siv

    Hello,
    I am not too sure for your requirement, but what I could understood is "You have created an ALV table of buttons and have assigned with same onaction method, once cliked on any of the button, you want to figure out which button has been clicked?" If this is the casse then there is a very easy way to find out where the click has taken place, use the code below in the on action method of the button in  the alv table.
    data: lo_context_element type ref to IF_WD_CONTEXT_ELEMENT,
              lv_clicked_row       type int4.
    check wdevent is bound.
    lo_context_element =  wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
    check lo_context_element is bound.
    lv_clicked_row = lo_context_element->get_index( ).
    Once this is executed, lv_clicked_row would contain the index of the table row where the user have clicked, this value can be further used for business logic derivation purpose.
    Please let me know if this does not help!
    Thanks & Regards
    Abir Chakraborty

  • How to create a ALV table

    Hi experts,
    I have to show an ALV table with the list of errors at the end of an operation. I have two separated views for this: one view when I run the operation and, at the end of this operation, I show a button and when I click on this button I can to navigate in a second view where I show the table with the list of errors... How can I do for make this table as an ALV table?
    Tks a lot!

    You can get the changes made by user in the context. To achieve this follow the process:
    1) Enable the context change log in the init method of component controller:
    DATA: z_context TYPE REF TO if_wd_context.
    z_context = wd_context->get_context( ).
    z_context->enable_context_change_log( ).
    Then call following method in the component controller to get the context changes:
    DATA: lt_changes TYPE wdr_context_change_list.
    DATA: z_context TYPE REF TO if_wd_context.
    z_context = wd_context->get_context( ).
    lt_changes = z_context->get_context_change_log( ).
    You will get all context changes in the table lt_changes.
    Compare these values with the values before context change.
    2) You can also get the changed cells using event 'on_data_check' of ALV.
    Refer following link for more help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm
    I hope this will help.
    Regards,
    Saket.

  • ALV Table and dynamic new column

    Hi,
    I have a ALV table with tree in one column (reccuring context value).
    I would like dynamically to add new columns. I know the method of IF_WD_CONTEXT_NODE_INFO->ADD_NEW_CHILD_NODE, but this is used in another posts/blogs where whole table is generated dynamically. I have a table already and just want to add a new column.
    Is that possible?
    Thank you on advance, cheers.

    Under normal circumstances you could use the Context API method ADD_ATTRIBUTE to create a dynamic attirubte:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/af/cb744176cb127de10000000a155106/frameset.htm
    Unfortunately this is not compatible with the ALV. The ALV only supports static attributes.  Therefore you will need to build up an entire RTTI based structure in memory and then dynamically re-create the entire context. This is a similar example:
    data:
             rootnode_info type ref to if_wd_context_node_info,
             dyn_node type ref to if_wd_context_node,
             dyn_node_info type ref to if_wd_context_node_info,
             tabname_node type ref to if_wd_context_node,
             current_tablename type string,
             tablename type string,
             struct_type type ref to cl_abap_structdescr,
              table_type  type ref to cl_abap_tabledescr,
              comp_tab    type cl_abap_structdescr=>component_table,
              comp        like line of comp_tab,
              my_table    type ref to data,
              my_row      type ref to data.
        loop at field_details assigning <wa_detail>.
    * build a structure description from the list of single fields
              comp-name = <wa_detail>-field_code.
              comp-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ). "Replace with your dataType
            append comp to comp_tab.
          endloop.
    struct_type = cl_abap_structdescr=>create( comp_tab ).
          dyn_node_info = rootnode_info->add_new_child_node(
             name                   = 'MDM_DATA'
             is_mandatory           = abap_false
             is_mandatory_selection = abap_false
             static_element_rtti    = struct_type
             is_multiple            = abap_true
             is_static              = abap_false ).

  • How to filter standard ALV report with custom UI element?

    Hello Expert,
    I got a requirement to filter standard ALV report based on the custom UI element (which is created in the screen before displaying the ALV report). Upon entering the values in the Custom field, the ALV report is displayed accordingly.
    Any ideas how to approach it?
    Thanks,
    Mohammed

    Hi,
    Okay, let me explain the steps in detail
    Let us say you have alv table with 10 records and alv table is shown first time with all 10 records
    Create an internal table in component controller's attribute GT_ORIGINAL_DATA and save all 10 records into this table first time
    Now, user enters value in FILTER_MATNR field 123 and press apply_filter button or press enter key
    Read the value of field filter_matnr and get the only matching records from global internal table GT_ORIGINAL_DATA into local internal table as below
              data lv_matnr type matnr.
              data lt_data   like wd_comp_controller->gt_original_data.
                   " read the value from context attribute of filter_matnr
                        lv_matnr = ???
                   " copy all data into local table
                        lt_data[] = wd_comp_controller->gt_original_data.
                   "delete the records which does not match
                     delete lt_data where matnr NP lv_matnr.
    Now, bind the data lt_data to context node of alv table
    Hope this helps you.
    Regards,
    Rama

  • How to unhide the column in Alv table

    Hi Experts,
        Initially i have created webdynpro Alv table with 8 columns ,later i have added one more attribute/column to the node to display extra column
    but in the output ,alv table not displaying the 9th column,Instead the column is getting hidden which i came to know clicking on settings in alv table output.If i make changes in Alv table settings it getting displaying,can anyone tell me how to unhide this field.
    Regards
    Sandesh

    Hi Sandesh,
         It is possible that the user you are loggin in with, might have a layout saved.
    You can try logging in with different user and see if its still hidden.
    The explicit code to hide and unhide a column :
    lo_alv_column->set_visible( if_wdl_core=>visibility_none ).
    may be  you can use the above code and make column visibility true(cahnge parameter).
    Regards,
    Tashi

  • Business graphics ui element

    Hi,
    Please can you tell,
    How to work with Business Graphics UI Element with Brief steps
    Regards,
    Boots.

    Hi,
    Refer pdf at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3261cd90-0201-0010-268c-d8d72e358af6
    http://help.sap.com/saphelp_nw04/helpdata/en/e5/08b6eb35637a44830b9e6df22987aa/frameset.htm (SAP Library)
    Kind Regards,
    Nitin
    Edited by: Nitin Jain on Feb 18, 2009 12:09 PM

Maybe you are looking for

  • How to Enter Text in Report Painter

    Dear Sap Guru's I am new to Report Painter i want to add some text under the lead column and then i want to choose Characteristics which i had done but i am not getting any option to simply insert some text under the Lead column in between the Rows.E

  • How to find Function Module & Program Name Used by IDOC

    hii Experts, i want to find program name & function modules used in IDOC. I have Idoc type, Message type & extension type. Help me

  • After Gingerbread update, clock unreliable

    Seems to only synch at random times. I googled this, appears to a common problem with GB. Anyone else seeing this?

  • Ipad 2 won't connect to MY laptop - help

    My ipad 2 won't connect to my laptop properly. It used to work fine, I haven't done it in a while (5 months). It charges with usb charger. When i plug it in, Windows 7 plays the little tune indicating something is connected (tada!), but nothing show

  • Helix and Microsoft Dynamics - performance question

    Dear all, I'm testing Lenovo Helix to work with Microsoft Dynamics CRM. A strange issue has occured during test: when the tablet is working on WiFi, MSD performance can be a bit sluggish. In the airplane mode, MSD gets a boost performing way better t