cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CRM WEBUI Table View: Display Pie Chart directly without table data?

SimonGemkow
Explorer
0 Kudos

Hi experts,

I included a table view into an overview page and it holds some data. In order to Display the Pie Chart I have to use the "Chart Button", select "pie chart" , select a "column" and then the pie Chart will be displayed (percentage).
My customer is interested in the pie chart, i.e. showing the number of open activities by process type for the user.

Is it possible that the pie Chart is displayed directly and the table itself is not displayed?

Is it possible that the pie Chart Displays the number and not the percentage?

Thanks for your help,
Simon

Former Member
0 Kudos

Hi Simon,

I have also same requirement like above.Could you please tell me how did you manage fields [ gv_graphics_state protected -> "OPEN" (open the graphic area)- gv_selected_col_state -> 'PROCESS_TYPE_TXT ' (selected column) ]to display piechart. Or did you use any other way.

Thank you in advance.

SimonGemkow
Explorer
0 Kudos

Hi JAI,

Sorry, I did not solve the requirement, yet.

It was postponed.

Best,

Simon

Accepted Solutions (0)

Answers (3)

Answers (3)

j_r1
Explorer
0 Kudos

Hi,

Adjust DO_PREPARE_OUTPUT as follow taking into account that there are results after a search:

* Set graphics state for displaying the graph directly
CONCATENATE me->component_id '_ResTable_' 'graphicsState' INTO lv_name. "ResTable see .htm
IF typed_context->btqrslsquot->collection_wrapper->size( ) <> 0.
IF me->request->get_form_field( name = lv_name ) IS INITIAL.
me->request->set_form_field( name = lv_name value = 'open' ).
ENDIF.
ELSE.
IF me->request->get_form_field( name = lv_name ) IS NOT INITIAL.
me->request->set_form_field( name = lv_name value = '' ).
ENDIF.
ENDIF.

* Set graphics dropdown listbox for field (default is empty), default chart is Pie, default zoom is 100 %
CONCATENATE me->component_id '_ResTable_' 'dataColumnDDLB' INTO lv_name. "ResTable see .htm
IF me->request->get_form_field( name = lv_name ) IS INITIAL.
me->request->set_form_field( name = lv_name value = 'CURR_PHASE' ).
ENDIF.

Kind regards,

JREV

krishnendu_laha
Active Contributor
0 Kudos

Hello Simon,

These Parameters are controlled through BSP Element Attribute values.

Please go to the .HTM page of the WebUI View, you would find THTMLB Celerator Table element -> double click on the Element you can see all relevant attributes allowed for this element.

For your requirement, I habe checked there are two Attribute available :

  1. enableTableGraphics should be set to 'TRUE'
  2. selectionColumn should be set to column Name

Please try to set these values and Test.

Thanks,

Krish

SimonGemkow
Explorer
0 Kudos

Hi Krishnendu,

thanks for your answer.

In the ApptSR.htm (Component: BT126S_APPT View: ApptSR ) I double-clicked on "chtmlb:configTable" and I cannot find selectionColumn under attributes. There are some attributes with " select*row* ". If I use columnSelection I get an error when checking the code.

I also think that somehow I need both attributes gv_graphics_state = 'OPEN' and gv_selected_col_state = 'COLUMNNAME'.

Any other ideas?

Thanks,

Simon

SimonGemkow
Explorer
0 Kudos

Hi Experts,

one addition:

I can trigger the desired behaviour (open pie chart directly without clicking the chart button) in the debugger.

The class CL_THTMLB_CELLERATOR has three interesting attributes, which I manipulate in the debugger in the following way.

- gv_enable_table_graphics public -> 'X'

- gv_graphics_state protected -> "OPEN" (open the graphic area)

- gv_selected_col_state -> 'PROCESS_TYPE_TXT ' (selected column)

Example:

I click search in the activity search. When the debugger reaches CL_THTMLB_CELLERATOR I set above values in corresponding methods

- IF_BSP_ELEMENT~RUNTIME_IS_VALID for gv_enable_table_graphics public

- GET_REQUEST_PARAMETERS for gv_graphics_state protected and gv_selected_col_state

Below the search result the pie chart will be displayed directly.

I think my abap skills are not sufficient enough to find a way to set these variables programatically. I think I have to create Z-Cellerator Class etc. and use them somewhere:-) But currently I have no idea how and where.

Any ideas?

Thanks,

Simon