on 01-16-2007 12:58 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.