hii,
i import the data using xmldom variable from xml file
my xml file file have one payment and one one payment have multiple invoice and booking.
i get the properly get all the value. but when i insert the data in customized table i lost line no. valueout of the loop
this is my code
in this code my invoice loop is end and data is inserted in table.
then i fetch the booking data by setrange with LineNo_gint variable and modify the table.
but issue is that after my loop is end after invoice tag.for multiple line i have found last value for that line. i can’t fetch all the line after exiting the invoice loop.
can any one give me the suggetion regrading this issue?
FOR f := 0 TO items2.Count - 1 DO
title3 := items2.Item(f);
items3 := title3.SelectNodes(‘Invoice’);
FOR g := 0 TO items3.Count -1 DO BEGIN
title4 := items3.Item(g);
attributesList2 := title4.Attributes;
FOR h := 0 TO attributesList2.Count - 1 DO
PaymentCreationDate_inv_gtxt := attributesList2.GetNamedItem(‘PaymentCreationDate’).Value;
CustomerPayment_hdr1.RESET;
IF CustomerPayment_hdr1.FINDLAST THEN
LineNo_gint := CustomerPayment_hdr1.LineNo + 10000
ELSE
LineNo_gint := 10000;
CustomerPayment_hdr.INIT;
EVALUATE(CustomerPayment_hdr.Id , Payment_idgxtx);
CustomerPayment_hdr.LineNo := LineNo_gint;
CustomerPayment_hdr.INSERT;
end;
items4 := title.SelectNodes(‘Bookings’);
FOR i := 0 TO items4.Count - 1 DO
title5 := items4.Item(i);
items5 := title5.SelectNodes(‘Booking’);
FOR j := 0 TO items5.Count -1 DO BEGIN
title6 := items5.Item(j);
attributesList3 := title6.Attributes;
FOR k := 0 TO attributesList3.Count - 1 DO
Booking_PaymentLineId_gtxt := attributesList3.GetNamedItem(‘PaymentLineId’).Value;
CustomerPayment_hdr2.RESET;
CustomerPayment_hdr2.SETRANGE(LineNo,LineNo_gint);
IF CustomerPayment_hdr2.FINDSET THEN
REPEAT
CustomerPayment_hdr2.“Booking PaymentLineId” := Booking_PaymentLineId_gtxt;
CustomerPayment_hdr2.MODIFY;
UNTIL CustomerPayment_hdr2.NEXT = 0;
END;