I'm curious to know if anyone has been successful creating new purchase invoices via web services. The process works as expected as a file import via the PIHFL import/export template.
I made a new web service based on the PIH object, and it works in the system, but the error I get when trying to create a new invoice is "The same function cannot be called twice!".
I found that message in APLSTD, and then found what I presume to be the line in SUBPIHA.src
(81) If GTUNCPT(10)=1 GMESSAGE=mess(247,199,1) : OK=0 : Return Else GTUNCPT(10)=1 : Endif
If I comment that line out entirely as an experiment, I get this error from SUBPIHD:
@X3.TRT/SUBPIHD$adx, message:GPIH_TRTLIG : Variable Non-existent, line :2788
2788 in SUBPIHD.src starts here:
If GPIH_TRTLIG="M" & [M:PIH3]NUMORI(nolign-1)=[F:PTD]PTHNUM &[M:PIH3]LINORI(nolign-1)=[F:PTD]PTDLIN &
& [M:PIH3]QTYPUU(nolign-1) = [M:PIH3]WOLDQTYPUU(nolign-1) & [M:PIH3]WOLDQTYPUU(nolign-1) <> 0
Raz QUANTITE
Raz WQTEUOM
Else
I tried validating the global variables, but I'm not sure what GPIH_TRTLIG is. I don't know if I'm missing something in the XML I'm submitting, but it seems like I have all of the fields represented on the file I can successful import with PIHFL.
At this point I'm on version 11 patch 9 in this test environment.
Thanks,
- Jim