on 01-31-2009 6:16 AM
Hi Guys,
I have the following requirement :
Description:
1.I need to plot a graph based on valuation types.
2.The number valuation types will be chosen by the user.
3.The graph will be plotted on the following bases:
Say 2 valuation types are being chosen:
Time Amount for val typ 1 Amount for val typ 2
Jan 2009 400 200
July 2009 0 500
Oct 2009 100 700
Now say 3 valuation types are being chosen:
Time Amount for val typ 1 Amount for val typ 2 Amount for val typ 3
Jan 2009 400 250 200
July 2009 0 0 500
Oct 2009 100 0 700
This way if n valuation types are being chosen then this table of the graph will have 'n' columns along with the time column.
I need a graph whose:
x axis: time
y axis: Amount for each valuation time
Ie the valuation types amount for each time period(jan , july etc) must be captured.
Thus i have :
1.Created a node graph , with attribute time , this is static
2.I now add the attributes VAL_AMT1 to VAL_AMTn for as many valuation types chosen dynamically
3.I can get a reference of this node with all the attribute values set.
4.I am now unable to find a way to bind my values to this node Graph , so that the table for the graph is bound and hence the graph displayed.
I am using Category : for time
and Simple series.
Classes: CL_WD_CATEGORY, CL_WD_SIMPLE_SERIES.
Please help!
Thanks in Advance!
Best Regards,
Gayathri
Edited by: Gayathri R on Jan 31, 2009 7:25 AM
Solution is like this:
Create a node dynamically with as many fields as needed.
Create a busin graph dynamically.
At every action , delete the old instance of the graph and create a new one.
Thus the graph is right everytime.
For filling the node dynamically created with data have a method or altenatively use a Supply function.
Use the stmt: lo_node->invalidate( );
before the graph is called.
This way the supply function will be triggered and the main node for graph is filled.
Next dynamicaly create a simple series and in the bind value give the path of the attribute from the dynamically created node.
Next dynamically create a category , this can be an attribute from the dynamically created node or from any other node.
Thanks!
Gayathri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try the following Abap webdynpro components you will get some ideas on the same.
DEMO_BG_GANTT
WDR_TEST_BG_BLEND
WDT_BG_SCATTER
Thanks,
Rajkumar.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Gayathiri,
Please refer the below link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per your requirement, you have one value on X axis and need to show 2 different sets of values as Y axis.
Please check out this example that I implemented in my requirement- this is a static one-
When we look into the standard examples in the Business graphics the BG->Series node is bound to the table from which it is takking values and the subnodes of it category and series are bound to the Values .
I have two tables where i have to set the SERIES1 to the 1st table value and SERIES2 to the 2nd table value and the Category to any of them as the Catorgory values are same in both. I took another node where I got the serires values into a single node based on the category. I have combined both the table entires into a one table. Then in the BG I have bound the Catergory and series to this resultant node and BG->category and series1 and serires2 are bound to that repsective values of this resultant node.
Like this I achieved. Now I was able to view the two different series for the given Category in a single graph.
For the dyamic graph creation,
Have a context attribute for the number of valuation types.
Create a node to hold the values.
In the WDDOMODIFY view, create a BG UI element and create a series node as per the input entered in the initial screen and a single catoegory node.
Bind the respective attributes and node to the BG UI element, series, category.
Initially refer to the dynmaic UI element creation documents and then proceed with respect to BG.
Regards
Lekha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.