cancel
Showing results for 
Search instead for 
Did you mean: 

Problem accessing item in RFC from Portal

Former Member
0 Kudos

Hello,

I developed a portal component using JSPDynpage.

In this component I hand over data to a RFC in R/3 using JCO for the connection.

The input of the data to the RFC works fine, but I've got some problems with the data I receive as result.

The data has the following structure:

Under the Export-Tab in R/3 you can find the table "EX_PDF_TAB".

This table has the following structure

-- Field EBELN (of Datatype CHAR)

-- Field NUMBYTES (of Datatype INT4) and

-- PDF_TABELLE which contains a table

-- This again contains 2 colums TD and TDLINE.

It works fine to access EBELN and NUMBYTES but with the table I don't know how it works.

A piece of the code:

Object messages = output.get(Constants.MESSAGE_EX_PDF_TAB);

if (messages == null) {

return null;

}

else if (messages instanceof IRecordSet) {

Vector resultMessages = new Vector();

while (((IRecordSet)messages).next()) {

resultMessages.add(((IRecordSet)messages).getString("EBELN"));

resultMessages.add(((IRecordSet)messages).getString("NUMBYTES"));

???????Object pdf_Tabelle =(((IRecordSet)messages).getObject("PDF_TABELLE"));

}

...

}

...

Any ideas?

Best regards,

Birgit

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Birgit,

Does <i>Object pdf_Tabelle =(((IRecordSet)messages).getObject("PDF_TABELLE"));</i> return anything, or does it fail? In the latter case, what happens - and in the first case, check the return type just by debugging and looking at the class type of <i>pdf_Tabelle</i> (or log <i>pdf_Tabelle.getClass().getName()</i>).

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

it now works.

To access the table in the table I used the standard way:

Object pdfTabelle =(((IRecordSet)messages).getObject("PDF_TABELLE"));

if (pdfTabelle instanceof IRecordSet) {

while (((IRecordSet)pdfTabelle).next()) {

String tdFormat = ((IRecordSet)pdfTabelle).getString("TDFORMAT");

}

}

I was just somehow confused because I got back the class RecordSetWrapper and I did not know how to handle this

Best regards,

Birgit

Answers (0)