cancel
Showing results for 
Search instead for 
Did you mean: 

Graph in PDF

Former Member
0 Kudos

I have a excel spreadsheet, with table enter data and generating dynamic graph. Can this be done in pdf?

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Hello again,

which option did you use? Or how you solved your task? I would love to read what have you developed after all.

We do share the answers here. And closing the threads:))

regards Otto

OttoGold
Active Contributor
0 Kudos

Hello,

you have several options how to achieve this in PDF, please pick one that match the best:

1) you can create a simple graph using scripting. I have tried that and worked fine some months ago. But works only for graphs based on rectangles. You cannot draw a pie graph easily (I guess). You lack the components that would allow you to create pies. You would create it like this:

a) get your data in the table

b) loop on table, get the "unit" value, the max and min

c) for every value you need to put in the graph, multiply value and pre-counted unit and you get the rectangle height, you can change colours too. You start with a single rectangle hidden somewhere on the form layout and copy the rectangle every time you process a new line etc. etc.

2) you can get your graph from some SAP component

you draw a graph as an Image in backend and then pass it to the form as XSTRING which is displayed using Image field (not image) in the form. If you can draw a graph in the backend easily and do not need the graph to be dynamic, this is quite simple to prepare this scenario.

3) you can get your picture outside SAP

You can also try to work with the webservices to achieve the functionality. You have some data in your form. You call a webservice, pass your data there and in the response you get the graph. You bind it to the image field and your graph is displayed. You can have the graph changed dynamically but you need the network access to make this work and everything is not really trivial.

4) simply use URL

If you check the Image field in Designer, you´ll notice you can put url of the picture in there. So you can work with graphs outside the form and pass only URL into the form. ou can combine it with the WS scenario or the others.

I have no more options left, but maybe somebody who has more experience than I have can add some more options for you to work with. Regards, Otto

0 Kudos

Dear Otto!

Usefull tips, thanks a lot!

Tell me about option 2:

2) you can get your graph from some SAP component

you draw a graph as an Image in backend

How "draw in backend"? Are there some abap opetators to drawing figure as a rectangle, line, cirle, etc?