Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCo Error importing a Table from ABAP

Hello,

I'm programming a Server using JCo.

1)

I call the function from ABAP:

      call function 'Z_ZZ_ETI_PRINT'
        destination p_rfc
        exporting
          i_lines = it_lines
        exceptions
          others  = 1.

2)

Here is the java part (the error should be here, because the other function works fine)

			if (function.getName().equals("Z_ZZ_ETI_PRINT")) {
				System.out.println("[CALL_PR01]");
				JCO.Table lines = tables.getTable("I_LINES");
				if (lines!=null) {
					System.out.println("[CALL_PR01b]");
					for (int i = 0; i < lines.getNumRows(); i++)   {
						lines.setRow(i);
						System.out.println(">"+lines.getString("TEXT") + "\n");
					}
				}				
				System.out.println("[CALL_PR02]");
			}

The variable lines is not null but the table is empty (in any case the loop has no steps).

Thank you for any hint!

Regards,

Tommaso

Former Member
Not what you were looking for? View more on this topic or Ask a question