‎2007 Jul 28 6:57 AM
Hello all
I havea bapi ,which i m calling from my java application using JCO ,
The function module : 'ZBAPINEW1'
Import parameter : IN1 type ZBAPI_NEW1 ( ZBAPI_NEW1 is a structure having 'CARRID' as the only field inside )
now the code inside the java pgm is as follows
IFunctionTemplate ft = repository.getFunctionTemplate("ZBAPINEW1");
.
.
JCO.Function func = ft.getFunction();
JCO.ParameterList input = func.getImportParameterList();
<u><i> <b>input.setValue("AA","IN1");</b></i></u>
it is here that it is giving me error that the value string"AA" cant be assigned to a structure "IN1" , which is understandable ..but now my qn is how to assign import values to the fields of the BAPI function module whic are of type structure.
PLz help !!
Thank in advance
Nilesh
‎2007 Jul 28 7:46 AM
Hi Nilesh,
Check my thread
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/05/sapApplicationHierarchyusingJAVA&
Reward if useful!
‎2007 Jul 28 7:46 AM
Hi Nilesh,
Check my thread
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/05/sapApplicationHierarchyusingJAVA&
Reward if useful!
‎2007 Jul 28 8:31 AM
hi
i went through ur link
but i didn understand 1 thing
input.setValue("INFO_TABLT", "QUERY_TABLE");
here the QUERY_table is an import parameter in ur function module , so is it of type DDIC structure which contaisn some fileds or directly some DDIC field .IF this is aDDIC structure (as in my case) how can we assign the value to the structure , rather iw ant ot assign that value to one field in that structure ( IN1-carrid in my case) .
thank
nilesh