cherokee
15th February 2005, 18:47
Hello everyone,

I am in BaaN IVc3. Want to copy an Item in to different Item codes like "myitem" to "myitem2", "myitem3".....
by using the FS for tppdm0110m000 where it opens a subsession tiitm0202s00 when I click on the copy botton copy. when using the
stpapi.application.option("tppdm0110m000",1,16,err.mesg) I get an BW error.."Fatal error : Recursion not yet implemented"

How can I do this with stpapi's

stpapi.handle.subproc( "tppdm0110m000", "tiitm0202s000", "add" )
stpapi.put.field("tppdm0110m000","tiitm001.item","myitem")
stpapi.find("tppdm0110m000")
stpapi.application.option("tppdm0110m000",1,16,err.mesg)
stpapi.put.field("tiitm0202s000","copy.item","myitem3")
stpapi.put.field("tiitm0202s000","copy.alt.items","no")
stpapi.put.field("tiitm0202s000","copy.alt.suppl","no")
stpapi.put.field("tiitm0202s000","copy.erela","no")
stpapi.continue.process("tiitm0202s000", err.mesg)
stpapi.handle.subproc( "tppdm0110m000", "tiitm0202s000", "kill" )
stpapi.end.session("tppdm0110m000")

Thanks in advance

Carlos Gonzalez :confused:

mark_h
15th February 2005, 20:37
In this post (http://www.baanboard.com/baanboard/showthread.php?t=8281&highlight=Copy+items) I asked if the user had tried just finding the part they wanted, putting the new item number and then just doing a save. Looks like there was no response, so maybe you could try it and let us know if it worked. This may not be exactly what you want, but it could be a starting point.

Mark

cherokee
16th February 2005, 15:22
Mark,

I changed a bit this. I created a Item Default Data(tppdm0109m000) by Item Group and I inserted new items based in this default data with new Item code, description and some other fields. It worked well.

Thanks again,

Carlos