[Business Graphics] Translation of captions

Hi,
I have some Business Graphics elements in my Web Dynpro component.
I used the Chart Designer to customize the appearance and add some titles (chart, X-axis, ...) but - to my opinion - this result in an XML file located in the MIME repository: SAP/BC/WebDynpro/SAP/Zxxx/4OQN7xxxxxx.xml
Now, I have to make available in 5 languages.
Does anyone know how should I proceed to translate the texts that are embedded within this XML file... ?
Should I keep the XML file and implement another layer for the translation trough METHODHANDLER attribute (reference variable of type IF_WD_BUSIN_GRAPHICS_MTD_HNDL) of the Business Graphics control in the WDDOMODIFYVIEW( )?
I guess this should be possible to load the initial XML file, use regular expressions to change the various captions, and inject the modified XML??
--> this looks very much like what is done in report GRAPHICS_IGS_CE_TEST...
Thanks in advance.
Best regards,
Guillaume
Edited by: Guillaume Garcia on Feb 7, 2012 6:32 PM / Report GRAPHICS_IGS_CE_TEST

Download your initial XML, translate, upload with name business_graphic_customization_<LANG(1)>.xml
method WDDOMODIFYVIEW .
  data:
      lr_bg_control type ref to cl_wd_business_graphics,
      lr_bg_method_handler type ref to IF_WD_BUSIN_GRAPHICS_MTD_HNDL.
  check first_time = abap_true.
  lr_bg_control ?= view->get_element( 'CHART' ).
  lr_bg_method_handler ?= lr_bg_control->_method_handler.
  DATA pict_wa   TYPE xstring.
  DATA mime_api TYPE REF TO if_mr_api.
DATA: mr      TYPE REF TO if_mr_api,
      lurl    TYPE        string.
* get name of component
data: l_component type ref to if_wd_component,
      l_component_info type ref to if_wd_rr_component,
      l_name type string.
l_component = wd_comp_controller->wd_get_api( ).
l_component_info = l_component->get_component_info( ).
l_name = l_component_info->get_name( ).
* get mime object
  mr = cl_mime_repository_api=>get_api( ).
  CL_WD_UTILITIES=>CONSTRUCT_WD_URL( exporting APPLICATION_NAME = l_name
                                               importing OUT_LOCAL_URL    = lurl ).
  mime_api = cl_mime_repository_api=>get_api( ).
  concatenate lurl '/business_graphic_customization_' sy-langu '.xml' into lurl.
  mime_api->get( EXPORTING i_url = lurl
                 IMPORTING e_content = pict_wa
                 EXCEPTIONS OTHERS = 4 ).
  data : DOCUMENT TYPE REF TO CL_xml_document.
  CREATE OBJECT DOCUMENT.
  DOCUMENT->PARSE_XSTRING( pict_wa ).
  lr_bg_method_handler->SET_DIRECT_CUSTOMIZING_MODE( abap_true ).
  lr_bg_method_handler->ADD_DIRECT_CUSTOMIZING( exporting I_CUSTOMIZING = DOCUMENT->M_DOCUMENT ).
endmethod.

Similar Messages

  • Dynamic title in Business Graphics

    Hi to all!
    I'm working with a Business Graphics and I'd like a title in the final rendered graphic. The problem is that the text I want to show is not static, it's the name of the person who is using the application.
    The question is: Can I bind the title of the graphic to a context attribute? or is it possible to pass parameters to the graphic?
    Thanks a lot.

    Hi,
    We have achieved this thru....
    1. If you navigate to src folder of your project... src\<package structure>...
    in that there will be a file <viewname>.wdview file. Where <viewname> referes to the name of the view in which business graphics UI element is used.
    2. Open that file with notepad, and you can see the structure of BusinessGrpahics UI element specified in xml format. In that copy what ever between <BusinessGraphics.CustomizingXML>...</BusinessGraphics.CustomizingXML> including these tags also.
    3. In the wdModifyView method of view name obtain the Business Graphics UI element and set the Direct Customizing to the above copied xml(as a string)
    String customXML = "<BusinessGraphics.CustomizingXML>....</BusinessGraphics.CustomizingXML>";
    IWDBusinessGraphics bg = (IWDBusinessGraphics)view.getElement("<business graphics UI element ID>");
    bg.setDirectCustomizing(customXML);
    4. In that xml string, the value under <Elements> .. <ChartElements> .. <Title> .. <caption> points to the title. you can replace that with your dynamic value.
    -Aarthi

  • Business Graphics : Display values for simple series ?

    Hi ,
    I have a some 5 simple series per category.. I am using a column chart . I would like to display the numerical values on top of each of the columns, ? How can i do it ?
    And is there any proper documentation on Business Graphics UI element other than the help.sap and weblogs on the sametopic ?
    Thanks and Regards
    Bharathwaj

    Hi ,
    Thanks for the answer.. By trial and error I had figured out the values.. but am stuck in another problem..
    I have two points created in the chart designer.. each one has its own color.. Now am using this to change the color of a single series .. depending on some value.. point 1 or point 2 will be selected..
    In this scenario ,my legend still shows me the old ones i.e just an yellow icon..
    If i add more info and captions.. for points.. I get .. the proper legend.. But the default legend set also exists. Any ideas on how to remove this .. or
    to display the proper legend in some other way..
    Thanks and Regards
    Bharathwaj..

  • Business graphics: customize x axes

    Hi all,
      I have a special requirement from a customes and I don't know how to satisfy this.
    I have successfully implemented a Business graphic with series (not simpleseries) and now I need to customize the x axes which contains the hours of 1 month.
    The customer requirement is to have a label and the corresponding grid line only each sunday at 12:00:00.
    I'm trying with Chart Designer with no luck.
    How can I achieve this?
    Thanks
    Stefano

    >
    Kai Gutenkunst wrote:
    > Hi,
    > you use a TimeAxis in your chart; is that correct?
    > Then you can use a value range for displaying such a line (and a caption).
    > In the chart designer right-click on TimeAxis-GridLine and create a new value range. Set the Start and End properties to the desired date/time and fill the property Caption.
    > Regards, Kai
    Hi Kay,
      currently I don't use a time axis because reading the documentation I was convinced that it is only for graphics like gannt and similar.
      In my case I need 2 axes, the x axes is for time (quarter hour) and the y axes is for values. The table rapresenting the values is like this:
    Time   Value
    00:15   287
    00:30   290
    00:45   302
    01:00   299
    01:15   306
    Should I use time TimeAxis?
    Thank you
    Stefano

  • Reg : Customizing Business Graphics.

    Hi All,
    I am trying to customize Business Graphics, (i.e) changing the font, background and etc.., I modified the design by using "Edit Customizing" option of the Business Graphics UI. But whatever the modification i did in the design time was not replicated in the run time. Is anything more to do...?
    Thanks,
    Mugu

    Hi,
    Apart from making cutomizing settings in Chart Designer, you can also write the following code
    in domodifyview method to bind the settings at run time.
    ** Build the XML string to set the GRAPH title*
      *DATA: l_ixml            TYPE REF TO if_ixml,*
             *l_document        TYPE REF TO if_ixml_document.*
      *DATA: l_element_SAPChartCustomizing TYPE REF TO if_ixml_element,*
            *l_element_Elements TYPE REF TO if_ixml_element,*
            *l_element_ChartElements  TYPE REF TO if_ixml_element,*
            *l_element_Title    TYPE REF TO if_ixml_element,*
            *l_element_Caption      TYPE REF TO if_ixml_element,*
            *l_element_ChartAxes   TYPE REF TO if_ixml_element,*
            *l_element_CategoryAxis   TYPE REF TO if_ixml_element,*
            *l_element_ValueAxis   TYPE REF TO if_ixml_element,*
            *l_value           TYPE string.*
    **       Creating a ixml factory*
      *l_ixml = cl_ixml=>create( ).*
    **       Creating the dom object model*
      *l_document = l_ixml->create_document( ).*
    **       Fill root node with value SAPChartCustomizing*
      *l_element_SAPChartCustomizing  = l_document->create_simple_element(*
                  *name = 'SAPChartCustomizing'*
                  *parent = l_document ).*
    **       Create element 'Elements' as child of 'flights'*
      *l_element_Elements  = l_document->create_simple_element(*
                  *name = 'Elements'*
                  *parent = l_element_SAPChartCustomizing  ).*
    **       Create element 'ChartElements' as child of 'flights'*
      *l_element_ChartElements  = l_document->create_simple_element(*
                  *name = 'ChartElements'*
                  *parent = l_element_Elements  ).*
    **       Create element 'Title' as child of 'flights'*
      *l_element_Title  = l_document->create_simple_element(*
                  *name = 'Title'*
                  *parent = l_element_ChartElements  ).*
    **       Create element 'Caption' as child of 'flights'*
      *l_value = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '052' ).*
      *l_element_Caption  = l_document->create_simple_element(*
                  *name = 'Caption'*
                  *value = l_value*
                  *parent = l_element_Title  ).*
    **       Create element 'ChartAxes' as child of 'flights'*
      *l_element_ChartAxes  = l_document->create_simple_element(*
                  *name = 'ChartAxes'*
                  *parent = l_element_Elements  ).*
    **       Create element 'CategoryAxis' as child of 'flights'*
      *l_element_CategoryAxis  = l_document->create_simple_element(*
                  *name = 'CategoryAxis'*
                  *parent = l_element_ChartAxes  ).*
    **       Create element 'Title' as child of 'flights'*
      *l_element_Title  = l_document->create_simple_element(*
                  *name = 'Title'*
                  *parent = l_element_CategoryAxis  ).*
    **       Create element 'Caption' as child of 'flights'*
      *l_value = WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '015' ).*
      *l_element_Caption  = l_document->create_simple_element(*
                  *name = 'Caption'*
                  *value = l_value*
                  *parent = l_element_Title  ).*
    **       Create element 'ValueAxis' as child of 'flights'*
      *l_element_ValueAxis  = l_document->create_simple_element(*
                  *name = 'ValueAxis'*
                  *parent = l_element_ChartAxes  ).*
    **       Create attribute 'id' for elsement 'ValueAxis'*
      *l_element_ValueAxis->set_attribute( name = 'id' value = 'ValueAxis1' ).*
    **       Create element 'Title' as child of 'flights'*
      *l_element_Title  = l_document->create_simple_element(*
                  *name = 'Title'*
                  *parent = l_element_ValueAxis  ).*
    **       Create element 'Caption' as child of 'flights'*
      *l_value = lv_con_curr.*
      *l_element_Caption  = l_document->create_simple_element(*
                  *name = 'Caption'*
                  *value = l_value*
                  *parent = l_element_Title  ).*
      *DATA : lr_container TYPE REF to cl_wd_uielement_container,*
             *lr_bg TYPE REF to cl_wd_Business_Graphics,*
             *lr_bg_method_handler type ref to IF_WD_BUSIN_GRAPHICS_MTD_HNDL .*
    **Get the Valuation type container*
      *lr_bg ?= view->get_element( id = 'BGR_REMINQ' ).*
      *lr_bg_method_handler ?= lr_bg->_method_handler.*
    *CALL METHOD LR_BG_METHOD_HANDLER->CLEAR_DIRECT_CUSTOMIZING.*
    *CALL METHOD LR_BG_METHOD_HANDLER->ADD_DIRECT_CUSTOMIZING*
        *EXPORTING*
          *I_CUSTOMIZING = l_document.*

  • How to Internatilonaliza Business Graphics axis title

    Hello everyone,
    I have a view with an UI Business Objects of chartype "columns" and dimension 2. After starting ChartDesigner, i realize that the Y axis has a caption that says "% Performance". I'm translating all the application to spanish, so, as we do with xlf files for labels, views and enumeration types, i would like to translate this caption. Where can i do this ? Does anyone knows ?
                              Thank you in advance for any help.
                                        Santi

    Have u been successful in saving this graph to the local pc ...
    If yes could u tell me how to do this

  • Refresh the Business Graphics Data on click of next page event of a table

    Hi Experts,
    We are using Business Graphics UI element in Web dynpro Java to display a table data.
    We are limiting the graphics data to 12 table entries at a time.
    Now, I just want to know how can we refresh the Business Graphics data when the user clicks on the Next Page option at the bottom of the table.
    This is applicable if we have more than 12 table entries and we've restricted the visible row count to 12.
    So, for more than 12 entries; when the user selects the next page, I want the next set of data to be displayed in the Business Graphics UI element.
    But I am not able to get the action for the Next Page event.
    Please note that we are on Netweaver 7.01.
    Kindly suggest as how can we achieve this functionality.
    Kind Regards,
    Anurag

    check this
    Web Dynpro Java Table Paging Unleashed: Optimizing Heavy Table Performance

  • Business Graphics - Bar Chart - How to make the height extendable

    Hi Experts,
    I have created Business Graphics UI element for my WD application which fetches data from R/3. I am displaying
    1) Cost Element in Y-axis and Cost in X-axis.
    2) I have set ChartType = Bar, height = 300, width = 830
    When the no of cost elements is upto 7-8, the graph is getting displayed correctly.
    However when the no of cost elements increases to more than 12, the graph becomes un readable. The system displays lot of texts in Y-axis.
    I want to make sure that if no of cost elements increases, the Y-axis of graph should extend.
    How we can do so?
    Regards,
    Gary

    I could not got any solution of this issue. Finally I convinced the customer to display only top 10 records. Any way higher level managers won't have time to see the graphs of all data.
    One way of resolving the issue is like this - create say 3 Business Graphic UI element. The height of Business Graphic UI element can be set as 300, 600, 900 etc.
    For 10 records use Business Graphic UI element  of height 300.
    For 20 records use Business Graphic UI element  of height 600.
    For 30 records use Business Graphic UI element  of height 900.
    Use the 'Visibility' data type to hide / unhide the Business Graphic UI of different height.

  • Edit customisation in Business graphics is not working

    Hi Experts,
    I created business graphic UI element of chart type "Speedo meter" . I am trying to chnage the colors of the chart by using
    'EDIT CUSTOMISATION' .When i change the clors in preview colors are chnaging but when i test my application it is nit showing the whatever i did in edit customisation ( ni color change ) . Please tell me do i need to configure anything ?
    Thanks in advance,
    Setu

    Hi,
    please refer below link .
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/ca932ebc-0901-0010-68a0-b4dd81a4bf81&overridelayout=true]
    Regards,
    Priya

  • How to use series in business graphic ui element

    Hi All,
    How to use the series in business graphic ui element? my requirement is i have to display the sales in selected months in graph(these values dont know at design time).
    Regards
    Srikanth

    Hi,
    Use the dynamic node  and bind this node to the BG source node and series nodes.
    Create a node and bind this node to the BG source and the value that you want to shown in series has to be bound to that attribute of the node and similarly with the category.
    Check out for the dynamic node creation and bind this node to the BG.
    Regards,
    Lekha.

  • Business Graphics API in WEBAS J2EE

    Hi,
    i have a business graphic integrated into my webdynpro application. I checked the api documentation for business graphics and found out, how to change the type of the business graphic and the number of dimensions programmatically.
    On the API, i cannot find out any further possibilities of modifing the chart programmatically. I wonder about this, because the business graphic UI - element in NetWeaver Developer studio provides much more configuration possibilities on charts.
    For example, i would like to use the averagre functions or adapt the number of labels on the chart axis. But all dynamically.
    Has anyone experience, with such advanced business graphics features and nows if it is somehow possible to get to theses features by using the NetWeaver API?
    Thank you very much in advance.
    Regards
    Christoph

    As I understand, your user management is through database, so when a user is created in your application, the parameters pass through the Action Handler -> service class-> DAO. So a better way would be write an additional class with the user management implementation of BO with a constructor or a method which would take the required user creation parameters and call it in the service class just under the user creation method of your DAO.
    As the user in your system passes some information from the front end, the same can be used to create user in BO.

  • Business Graphics and WebEnterprise

    I have a two part question.
    First, what is the best way to create business graphics such as line, bar,
    and point graphs? OLE to Excel, OCX, some third party commercial graphics
    library such as Brahma Software's Beacon?
    Second, once I have a business graphic what is the best way to display these
    graphics on a web page? A number of Forte field widgets such as ellipse,
    polyline, and point do not have a corresponding HTML element and therefore
    the Forte WebEnterprise WindowConverter class cannot convert these windows.
    Is there a way to save Forte images as BMP/JPG images?
    Thanks,
    Douglas Wheeler (mailto:[email protected])
    BORN Information Services, Inc. (http://www.born.com)
    Tel: 612.404.4379 Fax: 621.404.4441
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    exactly!
    many ways to do this
    1.U can use WDCopyService(Source ,Target)  here Source : return node of model data
                                                                               Target : Your temporary value node which bound to BG.
    Note : Each time when ever model data get updated(CRUD) u have to call this node.
    2. Use Mapping type node and bind it to BG ui element  exe : when we create any node It has 4 options one of them is Mapping select this and provide the model node
      (mapping of node with model node is replica of the content there in model node, here u don't have to worry about updated content since its replica and get changed eveytime when model operations is performed)
    Best Regards
    Satish Kumar

  • Problem with Business Graphics

    Hai,
    I am using Business graphics , I Used to display the simple series in a <b>coloumns</b> graph.
    I want to display the total amount of the graph in top of every coloumn..
    I want to display the value of the coloumn at the top of the coloumn.
    i need the above graph as
    3
    2
    1
       |----
    How to display the values in graph like this.....
    regards,
    Message was edited by: Naga Raju Meesala

    hai,
      my context structure is like this
        +ABC
           series2(double)
           series3(double)
           series4(double)
           series5(double)
           series6(double)
    My UIElement Structuer
         +BG1
            Category1
             SimpleSeries2
             SimpleSeries3
             SimpleSeries4
             SimpleSeries5
             SimpleSeries6
    code is like this..
    IPrivateFBGAppView.IAbcNode aNode = wdContext.nodeAbc();
         IPrivateBGAppView.IAbcElement elm;
    elm = wdContext.createAbcElement();
         elm.setCategoryText("Cat");
            elm.setSeries2(32);     
            elm.setSeries3(23);
            elm.setSeries4(45);
            elm.setSeries5(32);
         elm.setSeries6(18);
         al.add(elm);
    regards,
    Message was edited by: Naga Raju Meesala

  • Problem with Business Graphic:

    Hi Everybody!
    I am working with a UI control Business Graphic in WebDynpro Java,
    I need to change the text of the legend, and is taking an automatic value, what is the property in the Chart Designer where I can adjust this?
    Thanks in advance for your help.
    Edited by: Briger Palacios on Jul 6, 2011 11:16 PM

    Hi Briger,
    For Changing ur own legend , just write the label property of "SimpleSeries" ,which comes under  your "BusinessGraphics" .
    As many simple series will be there, that much no of legend is require, so just write your label of each simple series.
    if any doubt , plz let me knw.
    Regards
    Brajesh Kumar

  • Problem with Stacked Columns in Business Graphics

    Hi,
    Has anyone used the stacked columns chart type in business graphics?  Am facing a problem with this.
    I am using the SimpleGraphics example demo with 2 dataseries, the values ranging from 0-10.  It works fine if the chart type is Columns (this is default).  When I change the chart type to stacked_columns, the graph goes for a toss.  The y-axis range automatically changes to 0-1 (values as 0, 0.2, 0.4 ... 1.0) and it does not display stacked columns as expected.
    Is there any specific property(s) that need to be set for this chart type?
    Appreciate any quick response.
    cheers,
    Vittal

    Hi friend,
    See the link below it is having the solution of hiding the columns in smart forms
    Hide table columns in smart form?
    Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
    I think this will solve your issue if you still have queries please revert back to me i will help you.
    Thanks,
    Sri Hari

Maybe you are looking for

  • Reset .asp form on page load

    I produced an .asp fillable form in DWCS5 using ASP Form 2 Email extension. Worked very well. Problem -- ONLY with IE. When I "submit" the form, I get the "success" page. If I hit the back button on the browser, all the form info is still there. I in

  • Please help on uploading a CSV file on APEX through file browse

    Hi All, I need to upload a csv file in the table through file browse button.For that i have created the below process and function.This method is working perfectly fine when the file size is small.But i need to upload the file of 16 MB size and when

  • Query on SC?

    Hi Friends Please let  me know the ways to view SC GUI Screen I was unable to access using Tcode BBPSC01, BBPSC02 and BBPSC03 Regards Simha Edited by: simha.n on Apr 21, 2009 2:56 PM

  • Business area wrongly posted for invoice

    Hi All, Business area wrongly posted for invoice. The user was posted the invoice with two line items one with posting key 40 for debit and one is 31 for credit vendor, these two line items are posted with different business areas.  and the the invoi

  • Pagination and visited links issue

    I am creating reports on two tables which are structurally same but hold different set of data. I created one report page using SQL Query using PL/SQL function body returning SQL Query. The trick is to set a request value based on the link clicked by