IMPORTSIL a Purchase Order and getting No product-site Error.

Hello All!

I have some code that imports a text file to generate an inter-site purchase order. I am getting an error for every line that is "Inter-site: No product-site found, for the possible receipt sites!". When I import the file through the Usage>Imports (GIMPOBJ) function the file imports without any errors and creates the purchase order perfectly because I do have the Product-Site records setup. We are using version 9.0.3. I was wondering if the problem is in my code or if there is a difference between the IMPORTSIL subprogram and the GIMPOBJ function that would cause this error?

If !GSERVEUR
Call OUVRE_TRACE("Import file") From LECFIC
Endif
Link [ITM] With [ITF]ITF0 ~= [ITM]ITMREF;[M:ZPT0]STOFCY, [ITV]ITV0 ~= [ITM]ITMREF;[M:ZPT0]STOFCY As [ZITMS]
Local Char CRITERE(250)
Local Char AMOUNT(30)
Local Char SEQCODE(30)
Local Char MESSAGE(250)
Local Integer STAT
Local Integer COUNT
Local Integer ZOK
ZOK = 0
COUNT = 0
Openo filpath("TMP","PACKAGINGREORDER","txt"),-1 Using [ABBR]
Iomode adxifs ";" Using [ABBR]
Iomode adxirs chr$(13)+chr$(10) Using [ABBR]

Call NUMERO("NAPOH",[M:ZPT0]STOFCY,date$,"null",SEQCODE,STAT) From SUBANM
Wrseq "E", [M:ZPT0]STOFCY, SEQCODE, date$, "S003","","USD","","","","" Using [ABBR]

CRITERE = "1=1"

If [M:ZPT0]STOFCY <> ""
CRITERE += " & [F:ITF]STOFCY = [M:ZPT0]STOFCY"
CRITERE += " & [F:ITV]STOFCY = [M:ZPT0]STOFCY"
Endif

Filter [ZITMS] Where evalue(CRITERE)
For [ZITMS]
If [F:ITV]PHYSTO+[F:ITV]CTLSTO+[F:ITV]REJSTO < [F:ITF]REOTSD
AMOUNT = num$([F:ITF]MAXSTO - [F:ITF]REOTSD)
Wrseq "L", [F:ITF]ITMREF, [F:ITM]ITMDES1, [M:ZPT0]STOFCY, [F:ITM]STU, AMOUNT, date$, [F:ITM]PURBASPRI,"0","0","0","","","" Using [ABBR]
COUNT += 1
Endif
Next
Filter [ZITMS]
Openo Using [ABBR]

If COUNT > 0
If clalev([M:IMP2])=0 : Local Mask IMPOBJ2 [IMP2] : Endif
Raz [M:IMP2]
[M:IMP2]MODIMP = "ZPOH"
[M:IMP2]NOMIMP = filpath("TMP","PACKAGINGREORDER","txt")
[M:IMP2]TYPEXP = 2
Call IMPORTSIL([M:IMP2]MODIMP, [M:IMP2]NOMIMP) From GIMPOBJ
Call ERR_IMPORT([M:IMP2]STAT,MESSAGE) From GIMPOBJ
If [M:IMP2]STAT or GOK<1
ZOK = 1
Else
ZOK = 0
Endif
If clalev([M:IMP2])=1 : Close Local Mask [IMP2] : Endif
Endif

If !GSERVEUR
Call FERME_TRACE From LECFIC
If ZOK=1
Call LEC_TRACE From LECFIC
Endif
Endif

Thanks for any responses!