on 03-04-2009 1:22 PM
Dear All,
What is the purpose of onAction in Business graphics when it will trigger.
Regrads,
Suman.
I am using VC for creating business graphics.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
onAction (String id)
This event is triggered when the user selects a certain area of the business graphic. The parameter is the id of the selected UI element
For example if u want to display the % .
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Event will be triggered.
But if the case is like taking the specific value(%,or series) which is further input of the rfc will work or not.
Second most important - Under BusinessGraphics UI element Action is not meant for that - It simply gives the sense to end user about data and its position according to defined dimensions .
Best Regards
Satish Kumar
Hi
Follow the solution steps
1.Since description is only one per category so It would be better set it at OnAction of BusiGrap .
1. Create on context attribute say CateDescription and bind it to category description field of Category UI.
2. Either on action of Busingess Graphics or WdDoInit mehtod write
wdContext.currentContextElement().setCateDescription(wdContext.currentContextElement().get<your data where it is coming >)
3.Now this CateDescription filled with description data u can take where u want to to call the rfc.
Best Regards
Satish Kumar
When i do the same in onaction event of the button. The null pointer exception is appearing. please suggest on this.
java.lang.NullPointerException
at com.gmr.app.FI_DAILYFUND_BALANCE_AppView.onActionGetdata(FI_DAILYFUND_BALANCE_AppView.java:150)
at com.gmr.app.wdp.InternalFI_DAILYFUND_BALANCE_AppView.wdInvokeEventHandler(InternalFI_DAILYFUND_BALANCE_AppView.java:187)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:215)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Regards,
Suman
Dear Sathish,
Null pointer issue is resolved. I hav ewritten the below code. in Onclcik event of button.
Date dt=wdContext.currentContextElement().getDate_Val_Attr();
String dt_Str=dt+"";
wdContext.currentZfi_Dailyfund_Balance_InputElement().setDate(dt_Str);
for(int i=0;i<wdContext.nodeI_Bal().size();i++)
{
wdContext.currentVal_NodeElement().setCatDesc(wdContext.currentI_BalElement().getDescription());
wdContext.currentVal_NodeElement().setSerVal(wdContext.currentI_BalElement().getBalance());
}
wdThis.wdGetFI_DAILYFUND_BALANCE_AppController().executeZfi_Dailyfund_Balance_Input();
Because of the above only one category is getting displayed but not all.
Regards,
Suman
Hi Suman
Because of the above only one category is getting displayed but not all -
because it takes the last category and return the result.
Category In BusinessGraphic UI Element : The Category describes the categories of a graphical representation. Categories of a chart are a discrete value range or an unsorted set of objects - such as January, February, March, and so on.
So if u want for each category rfc need to execute and gives result say
1. First execution for January then February then March ... so in this case i want all data form rfc for January........February (or say 1....12 it require that rfc should called 12 number of time).
2. If your Rfc have provision to accept Arraylist so pass all the category at once , .
3. If wdContext.nodeI_Bal().size() is equal to number of category
so put that execution statement inside loop with every category
4.For example
IPrivateGenCompView.IRegionElement resEle = wdContext.createAndAddRegionElement();
resEle.setRegionName("India");
{
//India has this many location each will respresented as category
// in Business graph
IPrivateGenCompView.ILocationElement location_ele1 = resEle.nodeLocation().createAndAddLocationElement();
location_ele1.setLocationName("Mumbai");
IPrivateGenCompView.ILocationElement location_ele2 = resEle.nodeLocation().createAndAddLocationElement();
location_ele2.setLocationName("Delhi");
IPrivateGenCompView.ILocationElement location_ele3 = resEle.nodeLocation().createAndAddLocationElement();
location_ele3.setLocationName("Calcutta");
}
So once the user will click on particular category(say Mumbai) immediately u have to pass that description of category and fetch the data from rfc .
Best Regards
Satish Kumar
Hi Suman
one category is getting displayed but not all because it takes the last category and provide the output
Look
The Category describes the categories of a graphical representation. Categories of a chart are a discrete value range or an unsorted set of objects - such as January, February, March, and so on
So if u want data for each category so u have pass it one by one because It seems to me that RFC is designed in this way ? It doesn't take ArayList of Category.
So for each Category you have to call rfc .
understand from this example
IPrivateGenCompView.IRegionElement resEle = wdContext.createAndAddRegionElement();
resEle.setRegionName("India");
{
// India has this many location each will respresented as category
// in Business graph and to retrieve each category u have to call your rfc
IPrivateGenCompView.ILocationElement location_ele1 = resEle.nodeLocation().createAndAddLocationElement();
location_ele1.setLocationName("Mumbai");
IPrivateGenCompView.ILocationElement location_ele2 = resEle.nodeLocation().createAndAddLocationElement();
location_ele2.setLocationName("Delhi");
IPrivateGenCompView.ILocationElement location_ele3 = resEle.nodeLocation().createAndAddLocationElement();
location_ele3.setLocationName("Calcutta");
}
Best Regards
Satish Kumar
Hi,
Check this link :
[http://help.sap.com/saphelp_nwce711/helpdata/en/3e/c450c4cf2f6d418204afeea17655d3/content.htm]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.