cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying smart form on portal

Former Member
0 Kudos

Dear Guys

I have RFC which on execution shows smart form(attendance Query) which i need to display in portal using java code.

In this code i am facing issue with line

wdContext.currentInternalElement().setUrl(convertXStringToUrl(wdContext.currentOutputElement().getPdf_Data()

I am getting dump on this line while deploying my code

Sid

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This message was moderated.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi gopal,

Please check the value you are getting for pdf_data...you might be getting null value..

The same can be checked by using the code as suggested above by levy..checking the null value and displaying message if condition becomes true..

check the code you r using to execute your RFC....

please revert back for any further assistance...

Regards

Sid

Former Member
0 Kudos
    • if this thread is answered please mark as answered **

Former Member
0 Kudos

Thanksa ton levy.....and others for there prompt answers...

My application is working fine......

Thanks:

Sid

Former Member
0 Kudos

Hi siddhartha,

I am working on the same application and am facing the same problem. Could you please let me know, how you resolved your problem. I would appreciate your help.

Regards,

Gopal.

Former Member
0 Kudos

Dear friends,

Thanks for your prompt answers ......

FYI..

I have defined bin_file as export parametre.....when i execute RFC i am getting values in that export parametre....

Levy-> I am getting dump while running the application(java-lang null pointer exception)...on the same line as mentioned above..

I have taken Iframe UI element and set URL(string type) as source for this UI element.

Then in code as mentioned in sap technical tutorial i set URL value to what i am getting from RFC export parametre ie bin_file.

Former Member
0 Kudos

in order to avoid nullpointer first change the following from


wdContext.currentInternalElement().setUrl(convertXStringToUrl(wdContext.currentOutputElement().getPDF_Data ())); 

to


if (wdContext.currentOutputElement() != null) {
      if (wdContext.currentOutputElement().getPDF_Data () != null ){
         wdContext.currentInternalElement().setUrl(convertXStringToUrl(wdContext.currentOutputElement().getPDF_Data ())); 
      }
      else {
        messge here -> PDF_DATA is null
      }
 }
 else {
     messge here ->  element is null
 }

and another thing-

Did you invalidate the output node?

copy paste your execute bapi method.

Former Member
0 Kudos

Hi Sharma

Did you define bin_file as export parameter in FM?

From where you are gettiing this method getpdf_data() ?

Former Member
0 Kudos

To make thing more clear - When are you getting a dump? while building? while deploying? while running?

PDF_DATA is not null?

the convert method works ok?

Former Member
0 Kudos

Hi Ruturaj,

i took the help of same link as you refernced ie SAP technical-> smart forms. If you go by that code written in that ....i am getting the dump.....anewaz there is no issue with brackets i only copied it like that in the above query.

i checked applying external debugger RFC is also executing well ..Is there is any other way or if anything i can do in my code only....