cancel
Showing results for 
Search instead for 
Did you mean: 

BGR - Delete simple series

Former Member
0 Kudos

Hello,

I have an static BGR with one static category (binded to the context node) and three simple series (binded to the context node).

To fill the contex attibutes I use information from two internal tables. One table with category info (weeks records) and one table with series info (z id's).

I need to know if it is possible to delete one static simple series at runtime. How can I do it? Could you give me an example of logic?

I tried to crate the BGR dinamically but I failed.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

You can fetch the BGR UI element in the wddomodify view or some other method ( by making view instance available through

attributes ). and then remove the series.;

here is the sample code for removeing a static sample series.



data BGR type ref to cl_wd_BUSINESS_GRAPHICS.
bgr ?= v->get_element( 'BGR' ).          " BGR is the id of my BGR UI element
BGR->REMOVE_SERIES( ID =  'SR2' ).   "SR2 is the id of the static series.


thanks

sarbjeet singh

Former Member
0 Kudos

Excellent!

You have solved my problem.

Just one more question, Do you have an example code to delete an static attribute from node at runtime?

Best regards,

gill367
Active Contributor
0 Kudos

you cannot do so

not possible

only dynamic attributes can be deleted with remove method of node_info.

so i will suggest create the attribute dynamically then delete based on the condition

http://help.sap.com/saphelp_nw04s/helpdata/en/7e/a23742c4f5b16be10000000a155106/content.htm

here it is clearly mentioned that you cannot delete attributes that have been defined as static.

thanks

sarbjeet singh

Former Member
0 Kudos

Ok,

In a static simple serie, how can I change the label value and tooltip value dinamically?

I am sorry for so many question, but I am a begginer in all this about WD and BGR.

Kind regards,

gill367
Active Contributor
0 Kudos

HI

try like this

data BGR type ref to cl_wd_BUSINESS_GRAPHICS.
bgr ?= v->get_element( 'BGR' ).          " BGR is the id of my BGR UI element
data sr type ref to cl_wd_simple_series.
sr ?= BGR->GET_SERIES( ID =  'SR2' )

sr->set_tooltip( ' SR1 ').
sr->set_label( 'LABEL' ).

thanks

sarbjeet singh

Former Member
0 Kudos

You are awesome!

Kind regards!

Answers (0)