cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get the data in the webdynpro

Former Member
0 Kudos

Hi everyone,

I made the example given in the tutorial provided by the SAP Developer Studio to create a web dynpro accessing ABAP Functions. I followed all the steps, however when I run my web application with data that should bring results, nothing is displayed. I made a debug and the BAPI filled the table with data, so I don't understand why it's not showing any information. Any help?

Thanks in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Yelimar Rebolledo,

Can you please elaborate your problem in terms what is the input for RFC and what is the output from RFC? And to which node you bind the RFC response?

Let us suppose the RFC is giving a response of one string saying "Success" or "Failure". Did you bind that model attribute to any UI element on the view? Also please check the following?

1. Did you execute the model?

2. Did you get any exception while executing the model? Print error message in the catch block.

Regards,

Jaya.

Former Member
0 Kudos

Hi Yelimar,

From what you mentioned I think the RFC might not being executed.

After the execution of the RFC, check the size of the output node in the model.

You can use the messagemanger api:


wdComponentAPI.getMessageManger.reportSuccess(wdContext.node<Output>().size());

Also, share details about which server are you using NW 7.0 or 7.1? are the JCos working etc

Regards,

kartikaye

birojpatro
Contributor
0 Kudos

Did you successfully bind the table UI with the context node or the model node?

Check your UI binding.

Thanks

Biroj Patro.

Former Member
0 Kudos

Hi Kartikaye,

What is the import that I have to use that make the code works?

Thanks!

Former Member
0 Kudos

Hi Yelimar,

The wdComponentAPI is a class level variable in the controllers. You dont have to import any class for it to work.

This will print messages in the message area element in the view. In case you have not placed messageArea then by default it will appear at the bottom of the page on the left. It will have a green icon at the start to signify a success.

If you dont see the message being printed, then this code is not being executed.

Please check the logic of the controller to see if the method where you are executing the RFC is being called.

Use the wdComponentAPI.getMessageManager().reportSuccess(string Message) to track the logic. Print message before and after the method to ensure the method is being called.

Regards,

Kartikaye

Former Member
0 Kudos

Hi Kartikaye,

The method is being called because the BAPI is returning a result of one of the export parameters, but it's not filling the table with the data. I debug the code in ABAP and the table is filled successfully. So, I don't understand what it is happening.

Thanks in advance!

Former Member
0 Kudos

Hello,

Did you configure your Jco destinations properly ...test and ping them to see if they work....

Regards,

Shikhil

Former Member
0 Kudos

Hi Shikhil,

Yes, The connections are succesfull!

Thanks!

Former Member
0 Kudos

Hi Yelimar,

From what you are saying the BAPI is successfully being executed in backend. Which says the BAPI is working.

I have a few questions as I am not able to understand what is happening:

1) Are you able to being successfully executed the BAPI from Web Dynpro? (Proof the size of the output node of the BAPI will be greater than 0)

2) How do you know export parameter is being returned in Web Dynpro? (Proof did you print the export parameter)

If the BAPI is being executed from Web Dynpro and you are able to see the export parameter. Then, I would suggest you create another table and bind it to the output node of the BAPI.

Regards,

kartikaye

Former Member
0 Kudos

So if the BAPI is not executed properly.....try to print the Exception in the catch block using IWDMessageManager or try to debug and see the exact exception being caused....

Shikhil

Former Member
0 Kudos

Hi,

The bapi is executed successfully because I debuged the BAPI function (in ABAP) when the application is running after the deploy and I saw the import parameters take the value correctly.

Yes I bind an input field with the export parameter of the BAPI, so When I run the application, it's displaying the value of the export parameters properly but the value of the table are not displayed..

When I debuged the function BAPI the table brings the values properly, although the data of the table is lost and isnt appearing and data value from export parameter is fine.

Former Member
0 Kudos

Hi Yelimar,

Please elaborate on what is expected from the BAPI and what is returned.

If you are expecting multiple values in the export parameters, I would suggest you bind the export parameter node to a table and see if all the data is retrieved.

Regards,

kartikaye

Former Member
0 Kudos

Try to debug in webdynpro in NWDS rather than the BAPI in R/3 and see.....

Shikhil