0

i had searched forum and got this below link

http://www.apentia-forum.de/viewtopic.php?t=1962

but here my problem is we have to pass two structures . because data i want create in sap fall under two structures .
can anybody suggest me how can we use two structures... or is there anything needs to be done in SAP side. here is my code snippet

  public void createEquipment() throws JCoException{

     JCoFunction function = destinations.getRepository().getFunction("ZBAPI_EQUI_CREATE");

    if (function == null) {
        throw new RuntimeException(" ZBAPI_EQUI_CREATE does not exist");
    }

    else{
        System.out.println("BAPI  CODE -- ZBAPI_EQUI_CREATE -- EXISTS");
    }

   //JCoTable eqptable=function.getTableParameterList().getTable("EUIP_EXTER_NUMBER");
    JCoParameterList importparams =function.getImportParameterList();
    JCoStructure eqptable1= importparams.getStructure("EUIP_EXTER_NUMBER");
    //JCoStructure eqptable2= importparams.getStructure("DATA_GENERAL");


   eqptable1.setValue("EQUIPMENT", 5600784);
    //eqptable2.setValue("EQIPDESCR", "Testing Interface Eqp");
    function.execute(destinations);

     }
bhat
  • 89
  • 1
  • 10
  • I don't get it - is the function module exposing two structures or isn't it? – vwegert Feb 05 '14 at 18:15
  • Hi I am new to JCO SAP . I want to create entries in a SAP table. – bhat Feb 06 '14 at 06:15
  • You said what you wanted to do, but not what was the problem. What did you try ? what is the problem with the filling of those structs... – PATRY Guillaume Feb 06 '14 at 08:59
  • @PATRY Hi patry, equip exter number comes from one structure and corresponding equip desc i need to pass in another strucuture. but how to create the mapping that this number belongs to this description was my question. But now the problem is solved as my developer created it under same structure. plz also look this and help me. http://stackoverflow.com/questions/21598989/sap-jco-creating-a-record-in-sap-using-java .. thank you – bhat Feb 06 '14 at 09:47
  • I also don't get it... If you want to use two structures, then just do it! What is the problem?? – Lanzelot Mar 05 '18 at 12:50

0 Answers0