cancel
Showing results for 
Search instead for 
Did you mean: 

Store BusinessGraphics Picture

Former Member
0 Kudos

Hello all,

I want to place dynamic generated diagram in my PDF Form. Therefor I try to use BusinessGrahics.

How could I store GIF-Image generated from BusinessGrphics to binary context value attribute?

I can get URL of this images. It looks like

../..webdynpro/dispatcher/local/WS_IF/WebService_InteractiveForms/~wd_key2280_1211200432421/.gif?sap-wd-download=1&sap-wd-cltwndid=d618cc02259f11ddbb6a001a4baf5068&sap-wd-appwndid=d618cc03259f11ddb401001a4baf5068&sap-wd-norefresh=X

or

http://<servername>:<portname>/webdynpro/dispatcher/local/WS_IF/WebService_InteractiveForms/~wd_key2...

sadly ...


File file = new File(pictureURL); 
FileInputStream in = new FileInputStream(file);
ByteArrayOutputStream out = new ByteArrayOutputStream();
//read file in loop
wdContext.nodeSomeNode().currentSomeNodeElement().setDiagram(out.toByteArray());

... doesn't work for pictureURL.

Is there some other possibilities ?

Thank you in advance,

Ivan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you must b using LinkToAction..create an action for link with parameter ResouceElement..


 public void onActionimageUplaod(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.imageuplaod.wdp.IPrivateUploadCompView.IResourceElement resourceElement )
  {
    //@@begin onActionimageUplaod(ServerEvent)
if (wdContext.currentResourceElement().getImgResource() != null) {

	wdContext.currentResourceElement().setImgURL(
		  wdContext.currentResourceElement().getImgResource().getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()));
		}
    //@@end
  }

u can map image UI elemnt wid a attribute to display image..

hope it hlps u....

Regards

Khushboo

Former Member
0 Kudos

Hi Ivan,

Did you solve this problem?

Thanks in advance,

Andre