Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
jogeswararao_kavala
Active Contributor

ALV Graphs: An Accidental Discovery

Foreword

This feature discussed here is applicable to ALVs of custom programs developed through SAP Queries or ABAP codes using fm like 'REUSE_ALV_GRID_DISPLAY'.


The Story

The author has been exploring the ALV graphs since some-time and the graph pictures were used in presentations. One issue was always haunting was about Saving the Graph settings after configuring.  A graph configured for several features like Custom Titles, Show Values, Grid Lines, Modified Chart Types etc. I wasn’t able to save.the settings, except for taking a screen-capture. The next attempt, when I again clicked on ALV Graph icon, I had to start from scratch to have all my desired features listed above.

Years ago I’d posted this issue for help in SCN with title ‘Saving Graph Settings in ALV'’ . But I could not receive any replies having solutions and this issue remained unresolved for us. I had been reluctant to accept that SAP did not address this aspect of ALV Graphs.

Few days ago, we received specifications for a new report on Equipment performance, the ALV of which should be suitable for Graphical representation. We made it and were testing to show it to the customers (End-user). In fact our End-users too accustomed to configure graphs everytime and then take picture to use it in the presentations. (Due to the issue discussed above).

Then one day an invention sort of thing happened (atleast for me)

That was the time we were showing the new report to the customers. I had put the values in Selection screen, clicked on Execute button and waiting for the display of ALV report, and thinking about the next step of Configuring the Graph.  I almost shouted with word 'Wow'  to see the thing system presented instead ALV grid values..... The previously Configured Graph was in front of me instead of ALV grid display. The immediate reaction was 'What is happening?'  I had executed the report again and got the graph as output. It is confirmed that the Graph settings made previously are saved. A feeling of Great Discovery...But the question was How this happened? ,, The thing waited for years is appearing all of a sudden in front.

During that meeting itself I could understand what happened and could reproduce this effect.  The customers too were immediately made aware of this and told that now on they need not configure the graph everytime..in other words they can save the configured graphs. I’m sure members want to know what was that simple but highly significant Knowledge Piece, the knowing about which took years for me.

Before coming to that, I’d like to tell about the reason I believe about why this simple thing has a great probability of remaining unexplored.

  • When we click on Graph icon in the Application toolbar, the Graph appears as a pop-up window on the ALV screen,
  • Our thorough experience about pop-ups in SAP and likely mindset developed out of this, is such that we never try to click the icons behind the pop-up, i.e., the icons of the ALV screen here,...Why? ......because, we know that they will not be accessible until the pop-up is closed. This is the usual experience about pop-ups, Isn’t it?

But, here it isn’t like this...

Without closing the Graph pop-up window, you can access the ALV application toolbar icons. What happened was unconsciously I had clicked on 'Save Lay-out' icon on the ALV screen and saved the Layout (into Default Layout) while the Graph window was open.

So that was the secret. If the icon is behind the Graph, move the Graph window below, so that Application toolbar is visible to you, click on Save Layout icon, Give a name and Save.

After this, I configured several Graphs in the same ALV screen into Layouts with different chart types . I had restored my Default Layout not to display Graph.

Now, when I execute my program with Default layout, ALV grid report appears. If I want to show this information in pre-configured Graphical format, I select layout from above list whereby my fully configured graph appears instantly. I need not tell the readers that, If we want direct Graphs upon execute, then Selection screen variants can be created using these Layouts.

It is very likely that few members across different spaces knew about this, but for me unable to reach this information for quite sometime, this is a great relief and not a small discovery. Now we are able to show the graphs directly from the system itself.

Hope this post serves its intended purpose of scatter knowledge across SCN.

Useful Related document: Explore ALV Graphs

Thank you

Jogeswara Rao K

5 Comments