cancel
Showing results for 
Search instead for 
Did you mean: 

Fill an structure

Former Member
0 Kudos

Hi, i have an order with header and positions.

I want create it in the application such as:


	public void addRowInDB(String syBName, String[] newValues)
		throws SmartSyncException, PersistenceException {
		String syncBoName = syBName;
		SyncBoDescriptor sbd = descriptorFacade.getSyncBoDescriptor(syncBoName);
		SmartSyncTransactionManager transactionManager;
	
		//First get the Field Descriptors
		RowDescriptor sbdRowDesc = sbd.getTopRowDescriptor();
		
		//Create new syncbo
		SyncBo newsyncBo = dataFacade.createEmptySyncBo(sbd);
		Row worker = newsyncBo.getTopRow();
		
worker.setFieldValue(sbdRowDesc.getFieldDescriptor("NUMBER_HEADER"),newValues[0]);
worker.setFieldValue(sbdRowDesc.getFieldDescriptor("DATA_HEADER"),newValues[1]);
worker.setFieldValue(sbdRowDesc.getFieldDescriptor("POSITION"),newValues[2]);
		
dataFacade.insertSyncBo(newsyncBo);
	}

If i want create more than one position, how can do it? With this method, only can create a position linked with the header... If i want create more than one position linked with the header, i don´t know..

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved