cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with table parameter

Former Member
0 Kudos

Hello all,

I am making changes to SAP ISA, and am calling a custom RFC that has a table parameter that takes in item information.

I am doing something similar to the sample below:

JCO.Table items = zRFC.getTableParameterList().getTable("TIN_ITEMS");

items.appendRow();

items.setValue('000010","POSNR");

... set other fields in table

RFC.execute()

The RFC checks if the items table is initial and if so, returns an error message and ceases processing.

For some reason the table is always deemed as initial when called from the application. I set up an external breakpoint, and there is data in the items table, but when the IS INITIAL line is executed, it fails.

What am I missing? Is there something special to trigger a table as no longer INITIAL?

Thanks,

Steven

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Steven,

do you really think that someone might be able to help you if you don't tell us at least the error message?

Would be best incl. the exception stack trace.

What is method RFC.execute() ? I don't know this.

So far I'm not sure whether this might be an issue with JCo or with the ABAP function module?

Former Member
0 Kudos

Stefan,

There is no exception or stack track specifically.

The RFC has an if statement: IF TIN_ITEMS IS INITIAL, which if true will create a entry in the TOUT_RETURN structure of Type E with a message declaring no Items were entered.

Sorry I meant connection.execute(zRFC).

JCO.Function zRFC = connection.getJCoFunction("ZRFC");

JCO.Table items = zRFC.getTableParameterList().getTable("TIN_ITEMS");

items.appendRow();

items.setValue('000010","POSNR");

... set other fields in table

connection.execute(zRFC);

JCO.Table ret = zRFC.getTableParameterList().getTable("TOUT_RETURN");

... check if there are messages of type E to display to user

Steven

Former Member
0 Kudos

Ahh, OK. So we're in ABAP and you are complaining that the "IS INITIAL" statement returns true although you transferred data within the table object.

Maybe just try "IF TIN_ITEMS[] IS INITIAL" for this empty table check.

I'm not an ABAP expert but I think without the [] this statement just checks for the header row which is indeed initial.

You might also try "DESCRIBE TABLE ITAB LINES SY-TFILL." for getting the number of rows into the SY-TFILL system field.

By the way, you will find the real experts for this in the ABAP programming forum.