cancel
Showing results for 
Search instead for 
Did you mean: 

Execute smart form from webdynpro java

Former Member
0 Kudos

Hai

i am trying to display the smartform from webdynpro java.I need your help in this issue.Please provide step by step procedure to achieve this scenario

Regards

Dhinakaran J

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

In RFC Export add a field of type Binary and populate smart form into that binary field.

In Webdynpro view

Insert UI of element IFrame and bind the Source property to pdfUrl value attribute of type string.

byte[] pdfContent = wdContext.Current<ouputnode>().get<Binary Element>;

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);

try

{

wdContext.currentContextElement().setPdfUrl(pdfResource.getURL());

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);

}

The above code will display the smartform in the Iframe element.

Regards,

Sunitha Hari

Former Member
0 Kudos

Hai

how to add a field of type binary in the export tab of function module and link with smart forms

whether to call the smartform name or the function module name generated when executing the smart form from dynpro java.

its very urgent

points will be rewarded

Dhinakaran J

Former Member
0 Kudos

Hi ,

Check this blog..

/people/community.user/blog/2006/11/08/calling-smartforms-dynamically-using-dynamic-function-parameters

Regards,

Sunitha Hari

Former Member
0 Kudos

Hai

forget about above blog.

i am calling smartform from webdynpro java.

just i have written the following syntax what you said in your previous mail...

inpsmart.setEmpno("00636364");

inpsmart.setMonth("03");

inpsmart.setYear("2008");

wdContext.node<name>().bind(inpsmart);

execute

*********

wdContext.current<node name>().modelObject().execute();

String pdfContent =wdContext.current<node>Element().getTdformat();

byte[] data= pdfContent.getBytes();

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(data,WDWebResourceType.PDF);

try

{

wdContext.currentContextElement().setPdfUrl(pdfResource.getURL());

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);

}

i dont see anything in the iframe.

i.e that smart form will not display in the iframe

kindly guide me

Dhina

Former Member
0 Kudos

Hi ,

Did u bind the Source property of the Iframe to PdfUrl Attribute.

what is the type of the Tdformat Export parameter in R/3.

Regards,

Sunitha.

Edited by: Sunitha Hari on Apr 17, 2008 2:53 PM

Former Member
0 Kudos

Hai

output comes from r/3 as a table which refers a structure called Tline,

the Tline structure has two fields (TDFORMAT,TDLINE) of type char.

Regards

Dhina

Answers (0)