Creating a chart using ABAP OLE

Hi all,
I have a requirement to
1) Output data from an internal table into excel, and
2) Create a chart from the data in excel
The ABAP program is driving the creation of the chart in excel.
So far I have been able to export the data using OLE calls, created a chart object,.
My question:
1. How to put Data Lables
2. How to put Data Table under the Chart
3. How to rename the series names
Below is the recorded Macro. I don't know how to convert it to ABAP.
Sub Macro1()
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
Application.CutCopyMode = False
ActiveChart.SetSourceData Source:=Range("B1:E4")
ActiveChart.SeriesCollection(1).Name = "=Sheet2!$A$2"
ActiveChart.SeriesCollection(2).Name = "=Sheet2!$A$3"
ActeChart.SeriesCollection(3).Name = "=Sheet2!$A$4"
ActiveChart.SetElement (msoElementDataLabelOutSideEnd)
ActiveChart.SetElement (msoElementDataTableWithLegendKeys)
End Sub
I have attached the current output and expected output.
I have searched about this in google but i could not find any solution for this.
Your help is greatly appreciated.
Thanks,
Lakshmi.

To my knowledge, charts are only available for work item queries in TFS web access. If you want to generate test result charts, you can do that using the TFS reporting data in the data warehouse (if your administrator configured it when setting up TFS).
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • HOW TO creat  BAR CHART using ABAP Programming

    DEAR ALL,
    I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
    Regards,
    VJ

    On earlier versions, you can do something like this.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • Error in using ABAP OLE wrong cell value

    Dear All..
    I'm facing a problem while using ABAP OLE..
    the problem is the ABAP OLE writes the wrong value in Excel file
    the value is 121.000 but it written in Excel file : 121
    the weird thing is .. other value of  9.000.000 written correctly in Excel File .. and also lots of other values..
    i've trace the value until it goes to the method of :
    CALL METHOD OF h_excel 'Cells' = h_zl
         EXPORTING
           #1 = i_row
           #2 = i_col.
       SET PROPERTY OF h_zl 'Value' = i_value.
       GET PROPERTY OF h_zl 'Font' = h_f.
       IF i_bold = 'X'.
         SET PROPERTY OF h_f 'Bold' = 1.
       ENDIF.
       and the values of variable i_value is still correct which is : 121.000 but after writing in excel it becomes 121
       i believe it will become faulty at the specific amount with format of XXX.000  because if I changed the value to 121.001 it displays correctly in Excel file..
    i_value is a pass value from variable ld_val with data type of is --> ld_val(20) type n.
    is this are originally bugs from the OLE ? how to solved it ?
    please advice ..

    yes it is clear, but how excel manage the passed data is unclear.
    However, to solve you can try this:
    DATA : ld_val(20).
    WRITE value1 TO ld_val CURRENCY CURR.
    REPLACE ALL OCCURRENCES OF '.' IN ld_val WITH space.
    CALL METHOD OF h_excel 'Cells' = h_zl
         EXPORTING
         #1 = i_row
         #2 = i_col.
       SET PROPERTY OF h_zl 'Value' = ld_val.
       GET PROPERTY OF h_zl 'Font' = h_f.
       IF i_bold = 'X'.
         SET PROPERTY OF h_f 'Bold' = 1.
       ENDIF.
    Regards,
    Angelo.

  • How can I create a chart using data (from formulas) in my header columns?

    Hello,
    I'm wanting to create a chart using formula totals in my header column. When I attempt to click on the chart icon after selecting my header column, the chart button doesn't appear. Any help would be greatly appreciated. Thanks!

    Move your formulas in a non header column.
    In the cell A2 of the table "aux", the formula is :
    =IF(ISBLANK(main :: A2),"",main :: A2)
    then I applied Fill Down.
    Yvan KOENIG (VALLAURIS, France) mardi 2 août 2011 15:07:54
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Create organizational charts using application express

    I would like to create organizational charts using the application express(HTMLDB). How do I go about it?
    I also tried the Aria sample application for HTMLDB 2.0, but when I try to run the scripts it asks for some bind variable parameters ' :NEW ' and ' :OLD ' which I could not identify. Can anybody help with understanding the standard inputs to this?

    A perfectly reasonable question, phrased in
    a perfectly reasonable way (in my opinion).
    On this, I believe, we'll have to agree to disagree. I point you to the following document,
    particularly the section "Questions Not To Ask":
    I'm not sure why you feel the need to point me at a
    document entitled "Questions Not To Ask",
    particularly when I wasn't the one asking the
    question....I pointed you to the section "Questions Not To Ask" in the document entitled "How To Ask Questions The Smart Way" not because I believe you need help asking questions, but because the advice given in that document directly contradicts your opinions:
    "Q: How can I use X to do Y?
    A: If what you want is to do Y, you should ask that question without pre-supposing the use of a method that may not be appropriate. Questions of this form often indicate a person who is not merely ignorant about X, but confused about what problem Y they are solving and too fixated on the details of their particular situation. It is generally best to ignore such people until they define their problem better."
    I admit, I failed to follow the advice of ignoring the person when I first replied, but the issue is whether it was an appropriate question, which I think this quote clearly indicates it is not.
    Robert

  • Creating Gantt charts using Business Graphics that can be downloaded

    The short version is I need the format for XML data to create a Gantt chart in a Business Graphics UI Element in order to be able to automatically email it.  The long version is...
    I currently have a Web Dynpro ABAP component that displays a Gantt chart using a Business Graphics UI Element based off data in various other UI elements in the view.
    This works fine and the graph displays nicely, but I cannot find a way to download that straight from the Business Graphics UI Element.  Having read around the forum there appears to be two options:
    - Code it up myself by calling methods on the IGS API directly
    - Bind the image data attribute on the element and get the data that way
    Unfortunatly, we are not currently running a recent enough version (702/720) to be able to do the latter and so, unless there is another way, I need to code up the API calls myself.
    So far I have got a business graphic in to an Adobe PDF form, loaded in my config data so it appears as a Gantt chart but I cannot figure out the format for the actual data that needs to be sent through in XML.  Does anyone have example XML data or code to generate it that can be sent in to the call:
    l_igs_ce->set_data( EXPORTING data_doc = p_ixml_doc ).
    I have used the example in GRAPHICS_IGS_CE_TEST and the page http://liualex.com/archives/185 to generate the image and load the config data in but this only explains the XML format of the chart data for bar graphs.
    Many thanks

    Found my answer,
    This download: http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/e0a9ba90-0201-0010-d3a2-9cb376b5e181
    This is the SAP Chart Designer, it contains a PDF which explains the XML format used, you can use it to manually create your own XML streams.

  • How to Create an XML using Abap Objects

    Hi there,
    who has an example how to create an XML Document from an internal table using abap objects
    e.g. Class CL_XML_DOCUMENT_BASE ?
    any feedback is welcome.
    thanks
    Johann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • How to create the chart using java

    Hi Friends,
    I have one urgent requirement.I need to create the chart by using the table value.The value is stored in database like as follow..
    Attribute     IG
    Home     0.05
    Married     0.72
    Gender     0.05
    Employed     0.05
    Rate      0.05
    I need to get the highest value and create the parent node and lowest value is child node llike that i need create ...
    plz any body help me....

    You don't do that using Java.
    Consult the documentation of the application server in question how to configure it. If you're using for example Tomcat 6.0, then you should be consulting this document: [http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html].

  • Create ODF document using ABAP ?

    There any way to create ODF documents (Text/Spreadsheet) using ABAP + http://opendocument.xml.org standards ?
    Tks,
    Cleber

    There any way to create ODF documents (Text/Spreadsheet) using ABAP + http://opendocument.xml.org standards ?
    Tks,
    Cleber

  • Create an event using abap class (transaction swetypv)

    Hi,
    I’m trying to create an event by using an abap class.
    The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order. The exit is called on saving a sales order MV45AFZZ.
    In MV45AFZZ the method cl_swf_evt_event is called and the object type, event, objkey and obj cat is exported.
    Object Type = ZBUS203200
    Event = Z_TRAD_ORDER_CHANGE_OO
    I created my class ZCL_UPDATE_PUR_REQ (by copying CL_SWF_RUN_WIM_HANDLER
    And using interface name BI_EVENT_HANDLER_STATIC )
    In /nswetypv I assigned Class ZCL_UPDATE_PUR_REQ
    to Object Type ZBUS203200
    And Event Z_TRAD_ORDER_CHANGE_OO.
    All that works fine except for passing in the objectkey.
    In Class ZCL_UPDATE_PUR_REQ
    Method BI_EVENT_HANDLER_STATIC~ON_EVENT
    When I go to create a parameter for object key, I get the message
    ‘Parameters/exceptions of inherited methods or events cannot be changed’.
    Has anyone any suggestions for how I can get the object key into the method call BI_EVENT_HANDLER_STATIC~ON_EVENT?
    Thanks
    Ann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • Creating Bar Charts using Java and Display in jsp

    Hi..Is it possible to create a servlet that processes data from database and display the values as Bar Charts in jsp pages. If its possible, is there any examples on how to achieve that?

    I don't get it. You already know what needs to be done to solve your problem, the only thing you are missing is the HOW. That's the easy part, if only you break down what you have to know:
    1) how do I show an image on a website (this is a basic HTML question actually, not actually related to servlets/JSPs directly)
    2) how do I fetch the path from a database (JDBC question) so that I can use this path to link to my image on disc
    So what is preventing you from figuring out how to do these two simple tasks? Some clever google searches should give you all the information you need in no time.
    by the way: are you sure that you need to store these paths in the database? Is this part of some file upload component?

  • Create an event using abap class

    Hi,
    I’m trying to create an event by using an abap class.
    The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order.  The exit is called on saving a sales order MV45AFZZ.
    In  MV45AFZZ the method cl_swf_evt_event is called and the object type, event, objkey and obj cat is exported.
    Object Type    = ZBUS203200              
    Event          = Z_TRAD_ORDER_CHANGE_OO  
    I created my class ZCL_UPDATE_PUR_REQ (by copying CL_SWF_RUN_WIM_HANDLER    
    And using interface name BI_EVENT_HANDLER_STATIC   )
    In /nswetypv I assigned Class  ZCL_UPDATE_PUR_REQ
    to     Object Type     ZBUS203200                 
    And   Event              Z_TRAD_ORDER_CHANGE_OO.
    All that works fine except for passing in the objectkey.
    In Class ZCL_UPDATE_PUR_REQ 
    Method  BI_EVENT_HANDLER_STATIC~ON_EVENT
    When I go to create a parameter for object key, I get the message
    ‘Parameters/exceptions of inherited methods or events cannot be changed’.
    Has anyone any suggestions for how I can get the object key into the method call BI_EVENT_HANDLER_STATIC~ON_EVENT?
    Thanks
    Ann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • How to create numeric attribute using ABAP API

    Hi experts
    I'm trying to create a numeric attribute for a taxonomy table. In the how-to-examples there are only ways to create text attributes.
    Those who have tried, please let me know the steps.
    I have given below the code snippet which i tried to create numeric attribute. Please let me knw the missing link.
    ls_num_attr_val-rating = 500.
        APPEND ls_num_attr_val TO ls_ext_attr_info-characteristics.
      ls_ext_attr_info-attr_info-attr_id-id = lv_attribute_id.
           APPEND ls_ext_attr_info TO lt_ext_attr_info.
        GET REFERENCE OF lt_ext_attr_info INTO lv_data.
        ls_namevalue-value = lv_data.
        ls_namevalue-code = 'ACCT'.
        APPEND ls_namevalue TO ls_parameter-name_value_pairs.
        lv_string = 'Customer 12'.
        GET REFERENCE OF lv_string INTO lv_data.
        ls_namevalue-value = lv_data.
        ls_namevalue-code = 'CUST_NAME'.
        APPEND ls_namevalue TO ls_parameter-name_value_pairs.
        CALL METHOD lr_api->mo_core_service->create
          EXPORTING
            iv_object_type_code = 'ACCT_TYPE'
            is_parameter        = ls_parameter
            iv_parent_id        = 0
          IMPORTING
            ev_new_internal_id  = lv_key.
    Thanks
    SwarnaDeepika
    Edited by: SwarnaDeepika on Dec 19, 2009 4:38 PM

    Hello Ashok,
    [here|https://help.sap.com/javadocs/MDM/current/com/sap/mdm/examples/CreateField.html] is the Java API of the needed command.
    There is also an example of how to create a field. You can use the class by replacing the strings for the server, repository, table, etc. to your needs.
    If you want to create more than one field, simply use a loop, like the for-loop, while-loop, etc.
    Hope this helps.
    Best regards
    Dominik

  • How to create a chart using x-y correlation line plotting and trendline?

    Hi everyone,
    I am a college student and I opted to use iWork instead Microsoft Office, which has been wonderful software until this semester (iWork '08). Currently, I am taking some science classes, which requires me to graph simple function using "excel"; since I have Numbers, I attempted to graph my homework using such software. However, it was a little disappointing because I could not find x-y correlation line plotting, trendline, or simple curve fitting in Numbers.
    Is Numbers able to graph in such way? If yes, what is the best approach to find such tools?
    Any help will be truly appreciated.
    M
    Message was edited by: MacBook it works

    Plotting a function, eg y = 2x^2 + 3x + 2 or similar, in numbers or excel / appleworks / open office is not directly possible. The indirect way to do it is to build a spreadsheet put the values of x in one column and the formula to calculate the values of y in another and use these two columns to produce a chart. As you are plotting the function via calculated data (rather than trying to find a relationship by plotting observed data) trend line or curve fitting seems unnecessary.
    You can plot observed data and produce a scatter chart in Numbers, but it will not produce a trendline for you. You could calculate the parameters of the trendline, there are a number of shareware products that will do this. See http://www.apple.com/downloads/macosx/mathscience/indexabc.html. Once you calculate the trendline you could use the technique described above to plot it.
    You can plot a function directly using Grapher which lives in the Utilities folder. It can also be used to plot data sets and do simple curve fitting.
    Hope this helps, but as always to solve a problem you have to clearly define it first.

  • Creating PIE Chart in ABAP for all Purchase Orders in a particular week

    Hi All ,
    I want to create a pie chart based on the value of purchase orders in one week .
    Kindly guide me as to how to create a pie chart.
    Warm Regards
    Anirban Basu
    + 919836477442

    Hi Vivek ,
    Thanks for your response . However I am not able to identify which parameter you want to set as PI .
    can you kindly attach an example.
    Regards
    Anirban

Maybe you are looking for