cancel
Showing results for 
Search instead for 
Did you mean: 

Table dosn't load R/3 data

Former Member
0 Kudos

Hallo,

I'm evaluating WAS 6.30 Sneak Preview,and I'm asking myself why my custom project, EXACTLY modelled on the "Flights" tutorial, doesn't load data obtained from a RFC call (BAPI_SALESORDER_GETLIST).

In the "Search" view two input fields pass SALES_ORGANIZATION and CUSTOMER_NUMBER import parameters.

The "SalesorderList" table of the "Results" view, bound to the "Output" Controller Context attribute shold display some Bapiorders data, but it doesn't work! (the table columns remain blank..)

This is the code which should be manually written (according to the tutorial), I don't know if it's allright!! (something missing? wrong?):

  public void wdDoInit()

  {

    //@@begin wdDoInit()

Bapi_Salesorder_Getlist_Input input = new Bapi_Salesorder_Getlist_Input();

wdContext.nodeBapi_Salesorder_Getlist_Input().bind(input);

input.setCustomer_Number("1172");

input.setSales_Organization("1000");

// (data obviously hidden..)

client = JCO.createClient("800", "username", "pwd", "en", "sapsrv00", "00");

model = (SalesorderGetlistModel) WDModelFactory.getModelInstance(

  SalesorderGetlistModel.class, WDModelScopeType.APPLICATION_SCOPE);

model.setJcoClient(client);

  }

  public void getList( ) {

  //@@begin getList()

// Connects to remote SAP System

client.connect();

try {

  // Calls remote Function Module BAPI_SFLIGHT_GETLIST

  wdContext.currentBapi_Salesorder_Getlist_InputElement().modelObject().execute();

} catch (Exception ex) {

  ex.printStackTrace();

} finally {

  client.disconnect();

}

// Invalidates the output context node

wdContext.nodeOutput().invalidate();

  //@@end

  }

Can someone tell me why it doen't load data??

Thanks in advance

Gianluca

Accepted Solutions (0)

Answers (1)

Answers (1)

joerg_singler
Explorer
0 Kudos

Hi Gianluca,

first tip of mine is that you should change your exception handling code:

instead of:

try {

// Calls remote Function Module BAPI_SFLIGHT_GETLIST

wdContext.currentBapi_Salesorder_Getlist_InputElement().modelObject().execute();

} catch (Exception ex) {

ex.printStackTrace();

} finally {

client.disconnect();

}

you should change it to:

try {

// Calls remote Function Module BAPI_SFLIGHT_GETLIST

wdContext.currentBapi_Salesorder_Getlist_InputElement().modelObject().execute();

} catch (Exception ex) {

//change

wdThis.wdGetAPI().getComponent().getMessageManager().reportException(ex.getMessage(), true);

ex.printStackTrace();

} finally {

client.disconnect();

}

The addional statement informs you about an exception, which might be occured. If the message, which is shown in the browser, doesn't help, you will have to look in a specific log-file. The statement "ex.printStackTrace();" logs directly in the console-log-File of your server-installation directory (\usr\sap\<your instance e.g. C11>\JC00\j2ee\cluster\server0\log\console_logs\). There you will find an output.log-File, in which the complete trace of the exception is written. Please add the trace to the next sdn-message, if it does not help you to solve the problem.

Note: Please check for correct connection-data (system, user, password etc.) and system- and rfc-availability.

Regards

Joerg

Former Member
0 Kudos

Hi,

I have exactly the same problem. Just wonder whether you guys have found a fix yet?

Thanks

Zhang

Former Member
0 Kudos

Hi Joerg!

As you suggested, I changed the exception data.

Java VM returns no error! (the "error.log" file of the "console_logs" directory is not updated)

I noticed, in the "output.log" the following lines (I don't know if concerning the problem..):

...

  Timeout services :

  service tc.monitoring.logviewer.

  service webdynpro.

  service tcsecsaml~service.

  service dbpool.

  service adminadapter.

  service servlet_jsp.

  service ejb.

  service monitor.

  service rfcengine.

Also the "output.log" is not updated after the "deploy and run" operation.

I think that some code in the getFlights() method of the "Flights.pdf" tutorial is missing, isn't it?

(The "Go" button seems doing nothing)

NB:

JCO connection starts correctly (username, pwd, hostname..)

Any other suggestion?

Really desperate!!

Thank you

Gianluca

Former Member
0 Kudos

Hallo Zhang,

did you find an answer to the problem? I didn't..

Gianluca