Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
Webdynpro ABAP

Business Graphics

 

 

Scenario :  Let us create a table with some records in it. Based on the selected record, The datas in the selected row should be displayed in a Graphical format. The graphical format by default will be Column type which we can change later.

 

 

Step 1: Create a webdynpro component as shown below.

 

clip_image002

 

 

Step 2:  Create a Context node EKPO with some attributes.

clip_image004

 

 

 

 

Step 3: Insert a table UI element and bind the context node to the table.

 

clip_image006

 

Step 4 : Populate the context node in the WDDOINIT method.

 

clip_image008

 

 

Step 5: Save and activate the whole component and test the application.

 

Output:

clip_image010

 

 

 

 

 

Step 6: Create a context node similar to that of the node EKPO to bind the values to the Graphics UI element.

 

clip_image012

 

 

Copy the context node from the view.

 

clip_image014

 

 

 

 

 

 

Select the node which you want to copy.

clip_image016

Rename the context node and save it.

 

clip_image018

 

clip_image020

 

 

 

clip_image022

 

  

Step 7 : In the layout tab of the view controller insert the Business graphics UI element.

 

clip_image024

 

 

 

clip_image026

 

 

clip_image028

 

For the X axis, Insert the category UI element in the Business graphics.

 

clip_image030

 

For Y axis, Insert Simple series UI element.

 

clip_image032

 

clip_image034

 

Similiarly create series for all the Context attributes.

 

clip_image036

 

 

clip_image038

 

clip_image040

 

 

Similarly bind the series1 and series2.

 

clip_image042

 

 

clip_image044

 

Map the properties of the Business UI element to the series source property.

clip_image046 

 

 

 

 

Select the UI element table and create an action for onlead.

 

clip_image048

 

In the action onlead, read the row which is selected and set it back to the context node business which is mapped to the business graphics UI element.

 

method ONACTIONONLEAD .
   
DATA LO_ND_EKPO TYPE REF TO
IF_WD_CONTEXT_NODE.

   
DATA LO_EL_EKPO TYPE REF TO
IF_WD_CONTEXT_ELEMENT.
   
DATA LS_EKPO TYPE
WD_THIS->ELEMENT_EKPO.

*   navigate from <CONTEXT> to <EKPO> via lead selection

    LO_ND_EKPO = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_EKPO ).

*   get element via lead selection
    LO_EL_EKPO = LO_ND_EKPO->GET_ELEMENT( ).

*   get all declared attributes
    LO_EL_EKPO->GET_STATIC_ATTRIBUTES(
     
IMPORTING
        STATIC_ATTRIBUTES = LS_EKPO ).


 
DATA LO_ND_BUSINESS TYPE REF TO IF_WD_CONTEXT_NODE.

 
DATA LT_BUSINESS TYPE
WD_THIS->ELEMENTS_BUSINESS.

* navigate from <CONTEXT> to <BUSINESS> via lead selection

  LO_ND_BUSINESS = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_BUSINESS ).

 
append ls_ekpo to lt_business.
*

  LO_ND_BUSINESS->BIND_TABLE( NEW_ITEMS = LT_BUSINESS SET_INITIAL_ELEMENTS = ABAP_TRUE ).

endmethod.

 

 

 

 

 

 

 

 

 

 

Step 8: Save and activate the whole application. Test the output.

 

clip_image050

 

clip_image052

 

 

 

 

About Arun

20 Comments:

  1. What is ZCSK_BUSINESS_GRAPH component. I think we need to create it manually. But I am not able to find information about that

    ReplyDelete
  2. Jordanian specialists became serious competitors against other Arab countries which had previously monopolised the fields of design and printing. https://medijo.lt/vizitines-korteles/

    ReplyDelete
  3. Some portion of beginning another bookkeeping business is choosing for logo bookkeeping that would make you particular among other bookkeeping firms. By having a viable logo structure, you are really making a focused on spotlight on the promoting endeavors and this will empower you to achieve accomplishment in your line of business. logo design service

    ReplyDelete
  4. Thanks for your insight for your fantastic posting. I’m exhilarated I have taken the time to see this. It is not enough; I will visit your site every day. Image background removal service

    ReplyDelete
  5. Your article provide me huge knowledge related to Cliping path services.
    Thanks for sharing this post.nettoyage résidentiel

    ReplyDelete
  6. In the event that your advanced camera bolsters a more slow shade speed, it is as yet workable for you to shoot some brilliant activity shots. Background removal service

    ReplyDelete
  7. Good post but I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit further. Appreciate it..! Corporate Headshots

    ReplyDelete
  8. The exceptional business and enterprising aptitudes exhibited by Ghanaian business ladies should be hailed and recognized even as the world praises moms this week. payroll singapore

    ReplyDelete
  9. one thing that i like about the blog could be that the information is very helpful and keeps one informed on issues related to politics.  affiliate marketing

    ReplyDelete
  10. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Bitcoin Trader App

    ReplyDelete
  11. I have been impressed after read this because of some quality work and informative thoughts. I just want to say thanks for the writer and wish you all the best for coming! Your exuberance is refreshing. Unlimited websites

    ReplyDelete
  12. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading. Worldwide free classifieds site

    ReplyDelete
  13. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Paul Heule

    ReplyDelete
  14. It is my first visit to your blog, and I am very impressed with the articles that you serve. Give adequate knowledge for me. Thank you for sharing useful material. I will be back for the more great post. Online payday loans Arizona

    ReplyDelete
  15. It is included in my habit that I often visit blogs in my free time, so after landing on your blog. I have thoroughly impressed with it and decided to take out some precious time to visit it again and again. Thanks. business coach

    ReplyDelete
  16. I am glad you take pride in what you write. This makes you stand way out from many other writers that push poorly written content. Microsoft Dynamics 365 Business Central Credit Card Processing

    ReplyDelete
  17. É essencial que você faça uma boa pesquisa, e solicite o maior número de cotações possível, para escolher de maneira correta a melhor opção para seus funcionários e para sua empresa. plano de saude empresarial preços

    ReplyDelete
  18. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Blogging the boys

    ReplyDelete
  19. Is business name avaiable Hey, i enjoy your work and devotion.  I was in fact just chatting with a business owner the other day, and shared with him how to carry out what you are describing in a comparable way for business naming. In your question, is business name available in US? Well, that question can be simply replied with the tool i linked.

    ReplyDelete
  20. Every healthcare facility, whether big or small, has to maintain proper and consistent medical transcription. task list templates

    ReplyDelete

Powered by Blogger.