create product

Dear All,

I tried to create multiple records for product creation using job. But i able to create first record only because of these lines:
Translation = ProdMast.createTranslation().addNew();
Identifier = ProdMast.createIdentifier().addNew();
ProdDimGroup = ProdMast.createProductDimGroup().addNew();

How to solve this?

static void ProductCreate(Args _args)
{

EcoResProductService erProdSvc;
EcoResEcoResProduct EcoResProd;
EcoResEcoResProduct_Product_Master ProdMast;
EcoResEcoResProduct_Translation Translation;
EcoResEcoResProduct_Identifier Identifier;
EcoResEcoResProduct_ProductDimGroup ProdDimGroup;
TmpCode_005 tmpCode_005;

Tmp_KMN tmp_KMNtbl;
str 20 code;
counter icount,inserted;

//Initialize the service object
erProdSvc = EcoResProductService::construct();
EcoResProd = new EcoResEcoResProduct();
ProdMast = new EcoResEcoResProduct_Product_Master();

while SELECT * FROM tmp_KMNtbl
{

ProdMast.parmDisplayProductNumber(tmp_KMNtbl.Code);
ProdMast.parmProductType(EcoResProductType::Item);
ProdMast.parmSearchName(tmp_KMNtbl.Description);

//Create a new translation object:
Translation = ProdMast.createTranslation().addNew();

Translation.parmDescription(tmp_KMNtbl.Detail);
Translation.parmLanguageId(“en-us”);
Translation.parmName(tmp_KMNtbl.Description);
Identifier = ProdMast.createIdentifier().addNew();

Identifier.parmProductNumber(tmp_KMNtbl.Code);
ProdDimGroup = ProdMast.createProductDimGroup().addNew();
ProdDimGroup.parmProduct(tmp_KMNtbl.Code);
ProdDimGroup.parmProductDimensionGroup(“Test1”);

ProdMast.parmVariantConfigurationTechnology(EcoResVariantConfigurationTechnologyType::PredefinedVariants);
EcoResProd.createProduct().add(ProdMast);

erProdSvc.create(EcoResProd);

info(strfmt("%1 records inserted out of %2",inserted,icount));
}
}