Cancel
Showing results for 
Search instead for 
Did you mean: 

how to save find no after editing it by code , am using java in spring suite?

Creator
Creator

how to save find no after editing it by code , am using java in spring tool IDE? 

4 REPLIES 4

Re: how to save find no after editing it by code , am using java in spring suite?

Gears Phenom Gears Phenom
Gears Phenom

Hello, are you using Java RAC Customization? If, yes, here is an example:

 

TCComponentBOMWindowType bomWindowsType=session.getTypeComponent("BOMWindow");
    TCComponentBOMWindow   window=bomWindowsType.create(null);
    TCComponentBOMLine topBomLine=window.setWindowTopLine(null, itemRev, null, null);
    TCComponentBOMLine childBomLine=topBomLine.add(null,ChildItemRev,null,false);
    window.save()
    window.close();

Re: how to save find no after editing it by code , am using java in spring suite?

Creator
Creator
Sorry for replying late.... actually am using Java SOA Customization!!

Re: how to save find no after editing it by code , am using java in spring suite?

Gears Phenom Gears Phenom
Gears Phenom

Good afternoon, try this example: (see below the link to the source, there you will find many good examples)

 

SAVE BOMWINDOW //To save BOMWINDOW we need BOMWINDOW object

public void saveBOMWindow(Connection connection, BOMWindow bomWindow)
   {
      com.teamcenter.services.strong.cad.StructureManagementService cadSMService = 
      com.teamcenter.services.strong.cad.StructureManagementService.getService(connection);
      SaveBOMWindowsResponse saveResponse = 
      cadSMService.saveBOMWindows(new BOMWindow[]{bomWindow});

      if (saveResponse.serviceData.sizeOfPartialErrors() > 0)  
      {
       for (int i = 0; i < saveResponse.serviceData
      .sizeOfPartialErrors(); i++) 
      {
       System.out.println("Save BOMWindow Partial Error -- "+saveResponse.serviceData
      .getPartialError(i).getMessages()[0]);
       }

      }
   }

Source: https://teamcenter-open-gate.blogspot.com/2016/12/soa-service-client-creating-bom.html

Re: how to save find no after editing it by code , am using java in spring suite?

Creator
Creator
Thanks a ton Arthur!! :)