khadarBaaNBoard
30th March 2006, 13:17
We have developed AFS for Production Order Processing. We are successfull in following steps:

Maintain production Order,
Release Pr.Order
Report Operations Complete,
Report Production Orders Complete
Maintain and Release Inbound
Maintain Material Issue for Pr. Orders.

However, We have following problem in case of Order Quantity Dependent Routings:

For some items we use different routings for the same order quantity. For example upto 1000 tons, we have 3 routings. In the AFS for this item,
the first routing by item is saved even when the routing code is supplied.


Please see the code
stpapi.put.field("tisfc0101m000","sfc.grno",edit$(ddc.sfc.grno,"99"))
stpapi.put.field("tisfc0101m000","tisfc001.pdno",edit$(ddc.sfc.grno,"99"))
stpapi.put.field("tisfc0101m000","tisfc001.cprj",ddc.tisfc001.cprj)
stpapi.put.field("tisfc0101m000","tisfc001.mitm",ddc.tisfc001.mitm)
stpapi.put.field("tisfc0101m000","tisfc001.cwar",ddc.tisfc001.cwar)
stpapi.put.field("tisfc0101m000","tisfc001.qrdr",edit$(ddc.tisfc001.qrdr,"ZZZZZZZ9VD999"))
stpapi.put.field("tisfc0101m000","tisfc001.opro",ddc.tisfc001.opro)
stpapi.put.field("tisfc0101m000","tisfc001.cpla",str$(etol(tcplcd.forward)))
stpapi.put.field("tisfc0101m000","tisfc001.prdt",str$(ddc.tisfc001.prdt))
stpapi.put.field("tisfc0101m000","tisfc001.prdp",edit$(ddc.tisfc001.prdp,"9"))
stpapi.put.field("tisfc0101m000","tisfc001.dldt",str$(ddc.tisfc001.dldt))
stpapi.put.field("tisfc0101m000","tisfc001.dldp",edit$(ddc.tisfc001.dldp,"99"))
stpapi.put.field("tisfc0101m000","tisfc001.efdt",str$(ddc.tisfc001.efdt))
stpapi.put.field("tisfc0101m000","tisfc001.revi",ddc.tisfc001.revi)
stpapi.put.field("tisfc0101m000","tisfc001.rpsd",str$(etol(tcyesno.no)))
stpapi.put.field("tisfc0101m000","tisfc001.prcd",edit$(ddc.tisfc001.prcd,"999"))
stpapi.put.field("tisfc0101m000","tisfc001.rwko",str$(etol(tcyesno.no)))
stpapi.put.field("tisfc0101m000","tisfc001.mmpo",str$(etol(tisfc.mmop.not)))
stpapi.put.field("tisfc0101m000","tisfc001.mmno",str$(etol(tisfc.mmop.not)))
stpapi.put.field("tisfc0101m000","tisfc001.ncmp",edit$(ddc.tisfc001.ncmp,"999"))
stpapi.put.field("tisfc0101m000","tisfc001.bfep",str$(etol(tcyesno.no)))
stpapi.put.field("tisfc0101m000","tisfc001.bfhr",str$(etol(tcyesno.yes)))
stpapi.put.field("tisfc0101m000","tisfc001.nnts",edit$(ddc.tisfc001.nnts,"9"))
stpapi.insert("tisfc0101m000",true,error.txt)

In the above code
ddc.tisfc001.opro is the Routing Code supplied. But in the production order
first routing code by item is saved

Please can any one suggest why this is happening.

Thanks in advance:

Shaik Abdul Khadar

mark_h
30th March 2006, 18:09
Do you own source code so you can debug what is happening?

I have a feeling when you do the insert there is a section of code that runs that resets this field. Usually when I run into this I do the insert, then find and update the field. I do not think you can do this with this field. Is there anyway you change which routing has the default routing code?