Skip to Content
Author's profile photo Joffy John

Stacked Bar Chart with OLE

Many a time I had previously used OLE for excel based online reporting, but this time it was a graph.

The requirement was to have a Stacked Bar chart, to have a invoice status wise colour difference for same Account Manager.

First I said its not possible, but now I have the confidence to say, same output as in excel report could be achieved from ABAP OLE coding.

The best reference is excel macro recording codes.


From the available  help links and documents, I could understand that the type of report is 52

chart type.png

Then the real challenge was to have the legend dynamically with only available statuses from larger list.

So add dynamic coding to add column based on available statuses with value and then hide this status based invoice value column.


Hide column logic


To use the hidden columns’ data in graph we have to enable the following option in excel ,

finding the equivalent for that from ABAP was another difficulty, finally from an excel macro was able to trace that


Then Enabled legend based the Invoice Status ( Colour coding is based on this statuses)


Though there are many other reporting option, OLE is powerful.

The  report  exactly met our customer expectation. 🙂

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.