cancel
Showing results for 
Search instead for 
Did you mean: 

Onaction in Business Graphics

Former Member
0 Kudos

Dear All,

What is the purpose of onAction in Business graphics when it will trigger.

Regrads,

Suman.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I am using VC for creating business graphics.

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi All,

I have to implement a scenario in which whne i click on a series line that have to trigger a RFC is it posible in Business graphs or not. I am finding only one action i.e. onAction with that the above scenario is posible or not kindly suggest us.

Regards,

Suman

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you Satish,

Can you suggest any other solution for this when i click on series lines that should call an RFC by which the output of that rfc will be displayed in some other chart like pie chart. Please suggest us on this.

Regards,

Suman

former_member185086
Active Contributor
0 Kudos

Hi Suman

So, first chart's data is nowhere related to calling rfc ? But based on this first chart some other chart will come under same view right ?

If this is the case then u can put one Button near to that chart and perform rfc call .

Best Regards

Satish Kumar

Former Member
0 Kudos

Hi Satish,

The first chart data is related to the second rfc.That is the issue here. Any idea suggest on this.

Regards,

Suman

former_member185086
Active Contributor
0 Kudos

Hi

Tell me what is the input for that rfc(Which is required form first chart).Because same data series we can represent in table also. and Is this the conditional input for that rfc ?

Best Regards

Satish Kumar

Former Member
0 Kudos

Dear Sathish ,

We have to pass the description of the category to 2nd RFC as import parameter. For Eg if i click on mutual fund series line that should be displayed in a pie chart by calling the 2nd RFC.

Regards,

Suman.

former_member185086
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Dear Sathish,

When the onaction event will be fired?.

Regards,

Suman

Former Member
0 Kudos

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

former_member185086
Active Contributor
0 Kudos

Hi

as per my understanding some input for rfc is missing .FI_DAILYFUND_BALANCE how u process this field

What r the input for that rfc and how you process the Category description field.

Best Regards

Satish Kumar

Former Member
0 Kudos

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

former_member185086
Active Contributor
0 Kudos

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

former_member185086
Active Contributor
0 Kudos

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

former_member201361
Active Contributor
0 Kudos

Hi,

Check this link :

[http://help.sap.com/saphelp_nwce711/helpdata/en/3e/c450c4cf2f6d418204afeea17655d3/content.htm]