2007 Oct 17 8:31 AM
Hi,
I am using sapjco 2.1.8 in my Java code to call a BAPI function (rsz_x_component_get).
When executing this bapi function in SAP GUI, I can see one field is empty, and it's defined as as 70 characters. However, in Java code what I received is "000000000", while I should receive an empty string, "".
Does anyone know why the empty string is transferred into a string containing many zero?
Thanks,
Ray
Hi,
I am using sapjco 2.1.8 in my Java code to call a BAPI function (rsz_x_component_get).
When executing this bapi function in SAP GUI, I can see one field is empty, and it's defined as as 70 characters. However, in Java code what I received is "000000000", while I should receive an empty string, "".
Does anyone know why the empty string is transferred into a string containing many zero?
Thanks,
Ray
2007 Oct 17 8:35 AM
Hi Ray,
if the field defined is of type NUMC then its initial value is the no. of zeros equal to the size of the field.
Regards,
Atish
2007 Oct 17 8:39 AM
Hi Atish,
Thanks for reply.
The field is defined as CHARACTER and its length is 70. In Java code I use super.getTable().getString(20);
Thanks,
Ray
2008 Jul 17 9:33 AM
Problem solved. The cause is that the offsets and lengths of the input/output/table are inconsistent between function definition and java class.