Baanboard.com

Go Back   Baanboard.com > Blogs > Remco_Smeets's blog

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
15%
200 - 500 GB
30%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
11%
1500 - 2000 GB
15%
> 2000 GB
22%
Total votes: 27

Baanboard at LinkedIn


Reference Content

 
stpapi.put.field("tppdm7840m000", "spool.device", "D66") device unknown
By Remco_Smeets at 10 Mar 2015 - 08:45

Hello guys,

 

I'm kinda stuck in the following script:

 

     error = ""

    | Projekt über AFS kopieren
    stpapi.put.field("tppdm7840m000", "cprj", VORLAGE)
    stpapi.put.field("tppdm7840m000", "cprj.copy", new.cprj)
    stpapi.put.field("tppdm7840m000", "cprj.c.desc", new.dsca)

    if teilprojekt = tcyesno.yes then
        stpapi.put.field("tppdm7840m000", "sub.proj", str$(etol(tppdm.yeno.yes)))
        stpapi.put.field("tppdm7840m000", "main.proj", hpt.cprj)
    else
        stpapi.put.field("tppdm7840m000", "sub.proj", str$(etol(tppdm.yeno.no)))
    endif
    
    stpapi.put.field("tppdm7840m000", "gen.data.yeno", str$(etol(tppdm.yeno.yes)))
    
    stpapi.put.field("tppdm7840m000", "cost.unit.yeno", str$(etol(tppdm.yeno.yes)))
    
    stpapi.put.field("tppdm7840m000", "scope.def.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "baseline.yeno", str$(etol(tppdm.yeno.yes)))
    
    stpapi.put.field("tppdm7840m000", "buttom.up.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "top.down.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "bca.code.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "tpb.code.yeno", str$(etol(tppdm.yeno.yes)))
    
    stpapi.put.field("tppdm7840m000", "budget.surch.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "cost.surch.yeno", str$(etol(tppdm.yeno.yes)))
    stpapi.put.field("tppdm7840m000", "rev.surch.yeno", str$(etol(tppdm.yeno.yes)))
     stpapi.put.field("tppdm7840m000", "spool.device", "D66")
     stpapi.put.field("tppdm7840m000", "spool.fileout","C:\infor\erpln\log\prj_copy.log")   
    stpapi.form.command("tppdm7840m000", 5, "exec.cont.process", error)
    if not isspace(error) then    
        stpapi.end.session("tppdm7840m000")
        return(0)
    endif    

    stpapi.end.session("tppdm7840m000")

    return(1)

 

the problem is:

- it works under fp7

- it doesnt work under fp9

error that it gives is: device not available.

tried the following devices as well:

- "D"

-"ASCIF"

tried to insert the value's like this skript would insert them, which leads to a success.

tried "devc"  instead of spooldevice as well, eventhough its called devc in fp7 as well.

 

Printer ASCIF is the same in both systems.

however when running the script it goes to error there, can anyone help here?

Might be something really simple...

0
No votes yet

by mark_h on March 10, 2015 - 1:46pm
mark_h's picture
Best bet is to post in the AFS forum. As it stands in 4c4 I never put the device the way you do. Basically I use the stpapi.set.report function.
Code:
	stpapi.put.field( "tdilc4201m000", "prnt.error.report", str$(tcyesno.yes) )		|20060804
	stpapi.put.field( "tdilc4201m000", "prnt.shortage", str$(tcyesno.no) )
	stpapi.put.field( "tdilc4201m000", "pr.peg.shortage", str$(tcyesno.no) )
	stpapi.set.report( "tdilc4201m000","rtdilc420101000",spool.device, msg )
	|Shortage Report
	|stpapi.set.report( "tdilc4201m000","rtdilc420102000","D66", msg )
	
	stpapi.continue.process("tdilc4201m000",msg)
	stpapi.end.session("tdilc4201m000")


All times are GMT +2. The time now is 05:48.


©2001-2018 - Baanboard.com - Baanforums.com