-1

I Have Applied Logic on all the row which i get in the list in eclipse console i got the correct result everything is fine ,but now i just want to set the value again here my code in openbravo callout

for (ShipmentType st_op : cp.getOCAShipmentTypeList()) {

    String val = st_op.getName().substring(0, 3);

    System.out.println(val);
    Exist = val.concat(String.valueOf(CountTot));

    System.out.println("Existing Value Change : " + Exist);
    st_op.setName(Exist);
    OBDal.getInstance().save(st_op);
  }

here is a result cosole after adding 3 rd record :

2011
2
4022
3
201
Existing Value Change : 2013
402
Existing Value Change : 4023
3
4H
3
3
4H33

I just can'nt set and save with OBDal

OBDal.getInstance().save(st_op);
Aziz Shaikh
  • 33
  • 1
  • 6

1 Answers1

-2

I Got my Work Done By Statement as:

    ShipmentType st = OBProvider.getInstance().get(ShipmentType.class);
    for (ShipmentType st_op : cp.getOCAShipmentTypeList()) {

    String val = st_op.getName().substring(0, 3);

    System.out.println(val);
    Exist = val.concat(String.valueOf(CountTot));

    System.out.println("Existing Value Change : " + Exist);
    st_op.setName(Exist);

  }


    OBDal.getInstance().save(st);
Gopinagh.R
  • 4,826
  • 4
  • 44
  • 60
Aziz Shaikh
  • 33
  • 1
  • 6