We are writing code for Import data from excel to tally. All the data import successfully. but Each batch number taken 1 line for import for each item for Ex: Item 1 has 10 Batch number this is imported in 10 lines each qty one. i need the item name is need to import 1 line and the Batch details are required to import in batch allocation screen repeatedly each one qty/ any one having solution solve the issue. See below the code: 48 : NEW OBJECT : Voucher 49 : Set Value : Date : $$String:$ExcelVchDate ;;;;;;$$Date($$StringPart:$ExcelVchDate:8:2 +"/"+ $$StringPart:$ExcelVchDate:5:2 + "/"+$$StringPart:$ExcelVchDate:0:4)) ;;"1-Apr-2012" ;;$Date 50 : SET VALUE : VoucherTypeName : "Purchase" ;;$$VchTypeRcptNote 51 : SET VALUE : IsInvoice : YES 52 : SET : SVViewName : $$SysName:InvVchView 53 : SET VALUE : PERSISTEDVIEW : ##SVViewName 59 : Set Value : Vouchernumber : $ExcelVchNumber 60 : SET VALUE : Reference : $SupInvno 61 : SET VALUE : ReferenceDate : $$String:$SupInvDate ;;;$$Date($$StringPart:$SupInvDate:8:2 +"/"+ $$StringPart:$SupInvDate:5:2 + "/"+$$StringPart:$SupInvDate:0:4)) 70 : WALK COLLECTION : EDPurCollDetailsExtract 71 : INSERT COLLECTION OBJECT : ALLINVENTORYENTRIES 72 : Set Target : ALLINVENTORYENTRIES[$$LoopIndex] 73 : SET VALUE : StockItemName : $Item ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 81 : IF : $$IsEmpty:$Name:StockItem:$Item 82 : Call: PurStockImport 83 : End If ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 131 : SET : QtyVar : $$String:$ExQty ;; $ItemQty ;;;; ;; 101 : Set : DiscVar : $$String:$ExDisc 132 : SET : RateVar : $$String:$ExRate 134 : SET : AmtVar : $$String:$ExAmt 140 : SET VALUE : ActualQty : $$TgtObject:$$AsQty:##QtyVar * -1 150 : SET VALUE : BilledQty : $$TgtObject:$$AsQty:##QtyVar * -1 151 : SET VALUE : Rate : $$TgtObject:$$AsRate:$$Number:##RateVar 156 : SET VALUE : Amount : $$TgtObject:$$AsAmount:##AmtVar ;;;; * -1 158 : SET VALUE : ISDEEMEDPOSITIVE : yes 159 : SET : TT AMt : $$AsAmount:##TTAMt + $$AsAmount:##AmtVar 157 : Log:$$string:##AmtVar + $$String:$Item 160 : INSERT COLLECTION OBJECT : BATCHALLOCATIONS ;; 161 : Set Target : BatchAllocations[$$LoopIndex] 162 : SET VALUE : GodownName : "Main Location" 163 : Set Value : batchname : $Batch 173 : SET VALUE : StockItemName : $Item 174 : SET VALUE : ActualQty : $$TgtObject:$$AsQty:##QtyVar *- 1 175 : SET VALUE : BilledQty : $$TgtObject:$$AsQty:##QtyVar *- 1 176 : SET VALUE : Rate : $$TgtObject:$$AsRate:$$Number:##RateVar 177 : SET VALUE : Amount : $$TgtObject:$$AsAmount:##AmtVar ;;;* -1 178 : SET VALUE : IsDeemedPositive : Yes 179 : SET TARGET : .. 200 : INSERT COLLECTION OBJECT : ACCOUNTINGALLOCATIONS 210 : SET VALUE : LEDGERNAME : "PURCHASE" ;;; @@SalesAc ;;; $AcName 211 : SET VALUE : LedgerFromItem : Yes 220 : SET VALUE : ISDEEMEDPOSITIVE : Yes 230 : SET VALUE : AMOUNT : $$TgtObject:$$AsAmount:##AmtVar *-1 ;;;##AmtVar * -1 ;; 230a: Log: $$String:##AmtVar + $$STring:"Purchae" 231 : Set Value : GSTClass: "Purchase Taxable" 240 : SET TARGET : .. 250 : END WALK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I suppse you need to add one more set target after 179 i.e. 179 : SET TARGET : .. 180 : SET TARGET : ..
walk two difference collection walk first collection for inventoryentries by stock Item Wise and walk second collection for batchallcocation add filter in second collection for same item