Gerrit
22nd November 2004, 14:57
Hello,
Maybe some of you can help me.
I programmed some functionality using the AFS. For a range of customerspecific items tipcs2232m000 (Copy Customized Product Structure to Standard) has to be run. I did this by making a query with easy-sql on tipcs021 and programming the functionality in the reportscript. THe code is put below this :
declaration:
extern domain tcmcs.str50 err.mesg
extern domain tcmcs.long print.regel
long ret
#pragma used dll ottstpapihand
detail.1:
before.layout:
err.mesg = ""
stpapi.put.field("tipcs2232m000","orig.cprj",tipcs021.cprj)
stpapi.put.field("tipcs2232m000","orig.item",tipcs021.item)
stpapi.put.field("tipcs2232m000","copy.item",tipcs021.item)
stpapi.put.field("tipcs2232m000","cust.rc","")
stpapi.put.field("tipcs2232m000","cust.code.dsca","")
stpapi.put.field("tipcs2232m000","copy.structure","1")
stpapi.put.field("tipcs2232m000","copy.erela",str$(etol(tcyesno.no)))
stpapi.continue.process("tipcs2232m000",err.mesg)
stpapi.end.session("tipcs2232m000")
What happens. It looks like that it works. Only the variable err.mesg is filled with the message "Mainitem not allowed". And I don't know why.
Does anyone of you knows.
Regards,
Gerrit
Maybe some of you can help me.
I programmed some functionality using the AFS. For a range of customerspecific items tipcs2232m000 (Copy Customized Product Structure to Standard) has to be run. I did this by making a query with easy-sql on tipcs021 and programming the functionality in the reportscript. THe code is put below this :
declaration:
extern domain tcmcs.str50 err.mesg
extern domain tcmcs.long print.regel
long ret
#pragma used dll ottstpapihand
detail.1:
before.layout:
err.mesg = ""
stpapi.put.field("tipcs2232m000","orig.cprj",tipcs021.cprj)
stpapi.put.field("tipcs2232m000","orig.item",tipcs021.item)
stpapi.put.field("tipcs2232m000","copy.item",tipcs021.item)
stpapi.put.field("tipcs2232m000","cust.rc","")
stpapi.put.field("tipcs2232m000","cust.code.dsca","")
stpapi.put.field("tipcs2232m000","copy.structure","1")
stpapi.put.field("tipcs2232m000","copy.erela",str$(etol(tcyesno.no)))
stpapi.continue.process("tipcs2232m000",err.mesg)
stpapi.end.session("tipcs2232m000")
What happens. It looks like that it works. Only the variable err.mesg is filled with the message "Mainitem not allowed". And I don't know why.
Does anyone of you knows.
Regards,
Gerrit