Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th August 2004, 14:34
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Call a customized session form Standard Session

Hi,

we are trying to call a session (Customized) from a standard session, we have BaaNIV

My requirement is like this.

After executing the session tipcs5210m000 (Confirm Planned PRP production Order), it update the Order Status based on Project & production order on table tipcs510. when we again execute session tipcs5250m00 (Transfer Planned PRP production order) and after transfer it update the table tipcs510 (previous record) with new status. Therefore in table tipcs510, there is no history, when the PRP production order confirmed and transferred. We want keep track of the confirmation and transfer. To do so, we have created a customized table as replica of tipcs510 with a key of project, production order & order status and we have developed a session for updating based on project & production order. We want to run the this customized session, when ever user run this two session (tipcs5210m000 & tipcs5250m000), after press continue button the system will activate the customized session and update the customized table with respect to project no and production order.

Looking for help.

Regards,
__________________
Tushar
Reply With Quote
  #2  
Old 11th August 2004, 15:28
mark_h's Avatar
mark_h mark_h is online now
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Do you have source code for the sessions? If so just use that to update any tables you want or to zoom.to or activate other sub-sessions.

If you do not have source then you could use one of the wrapper programs - RMCgen, qkey, extend source code(in code and utilities forum). Then you can activate or update your other table as needed. It is a little more difficult with this method but it is doable.

Mark
Reply With Quote
  #3  
Old 12th August 2004, 05:55
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Thanks Mark, We donot have source Code, we want to do the other work around. could you please provide me some light in that area, how to write or send me some sample, so that we can try to solve our problem.

Best Regards,
__________________
Tushar
Reply With Quote
  #4  
Old 12th August 2004, 07:18
SriksAdi SriksAdi is offline
Senior Member
 
Join Date: Dec 2003
Posts: 145
SriksAdi is on a distinguished road
Baan: Baan 4 - DB: Oracle - OS: Windows NT
Hi Tushar,
You mentioned "We want to run the this customized session, when ever user run this two session (tipcs5210m000 & tipcs5250m000)". Instead of running the customized session from the standard session, why not run the standard session from customized session? Call standard session to update the replica table and then call tipcs5210m000 or tipcs5250m000 to perform the standard process.

I understand that the there would be pretty less control on the updations on the replica table. In this case the users has to maintain the discipline of updating the session thoughtfully.

regards
Sriks
Reply With Quote
  #5  
Old 12th August 2004, 07:28
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Hi Sriks,

I was thinking the same way, but how we will pass the production order no and project no and other parameter to the standard session from customised session and also if the user cancel the the standard session instead of continue, how we can get the return value, so that we can roll back our customised table. any light? I will be greatful.

Regards,
Tushar
__________________
Tushar
Reply With Quote
  #6  
Old 12th August 2004, 07:43
SriksAdi SriksAdi is offline
Senior Member
 
Join Date: Dec 2003
Posts: 145
SriksAdi is on a distinguished road
Baan: Baan 4 - DB: Oracle - OS: Windows NT
Hi,
As I said earlier it's the users decipline to continue and not cancel.
Other option available is AFS, where in the user access the standard session from your customised session. And you are very much sure, that the continue button is pressed, rather you are pressing continue only.


regards
Sriks
Reply With Quote
  #7  
Old 13th August 2004, 07:21
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
workaround

As others pointed out AFS is an obvious solution . tipcs5250m000 also has subsession tipcs5250s000 which uses the same script . So u can declare all form fields of tipcs5250s000 as extern and set values for those variables in ur customer script and call the session tipcs5250s000 with zoom.to$ function . This way u would be able to run tipcs5250s000 automatically without user having to key in the values again in tipcs5250m000 .
Reply With Quote
  #8  
Old 14th August 2004, 06:32
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Thanks Hitesh,

the suggestion u provide is logical and we want to do that, can you provide me a sample program scripts using zoom.to$, I will change according to our requirments.

Best regards,
__________________
Tushar
Reply With Quote
  #9  
Old 14th August 2004, 09:47
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
tipcs5250

We already have an AFS code working for tipcs5250m000. Maybe u find it useful.
PHP Code:

|Here AFS is used to Transfer only confirmed PRP orders only.Series for studded is hardcoded
|to >10 (if free nos available) and unstudded items are to series >41.
|This will release sfc orders too.
function 
domain tcbool afs.transfer()
{
    
domain tcbool     afs.done,stud.found
    domain tcorno    stud
.orno
    domain tcgrno    ord
.series
    error
.msg ""
    
afs.done true
    stud
.found false
    stud
.orno 1000000
    select    tipcs510
.orno:stud.orno
    from    tipcs510
    where    tipcs510
._index1 = {:tipcs901.cprj}
    and    
tipcs510.osta tcorsa.release
    
and    tipcs510.item refers to tijwx984
    
and    tijwx984.stun tcyesno.yes
    
as set with 1 rows
    selectdo
        stud
.found true
    endselect
    mess
("tijwx0199m001",0)
    
ord.series get.ord.series(10)                |Hardcoded
    stpapi
.put.field("tipcs5250m000","cprj.f",tipcs901.cprj)
    
stpapi.put.field("tipcs5250m000","cprj.t",tipcs901.cprj)
    
stpapi.put.field("tipcs5250m000","orno.f",str$(0))
    
stpapi.put.field("tipcs5250m000","orno.t",str$(stud.orno 1))
    
stpapi.put.field("tipcs5250m000","item.f","                ")
    
stpapi.put.field("tipcs5250m000","item.t","ZZZZZZZZZZZZZZZZ")
    
stpapi.put.field("tipcs5250m000","citg.f","      ")
    
stpapi.put.field("tipcs5250m000","citg.t","ZZZZZZ")
    
stpapi.put.field("tipcs5250m000","planner.f",str$(0))
    
stpapi.put.field("tipcs5250m000","planner.t",str$(999999))
    
stpapi.put.field("tipcs5250m000","order.series",str$(ord.series))
    
stpapi.set.report("tipcs5250m000","rtipcs525001000","D",error.msg)
    if 
isspace(error.msgthen
        stpapi
.continue.process("tipcs5250m000",error.msg)
    endif
    if 
not isspace(error.msgthen
        message
(error.msg)
        
afs.done false
    
endif
    if 
afs.done and stud.found then
        mess
("tijwx0199m002",0)
        
ord.series get.ord.series(41)                |Hardcoded
        stpapi
.put.field("tipcs5250m000","cprj.f",tipcs901.cprj)
        
stpapi.put.field("tipcs5250m000","cprj.t",tipcs901.cprj)
        
stpapi.put.field("tipcs5250m000","orno.f",str$(stud.orno))
        
stpapi.put.field("tipcs5250m000","orno.t",str$(999999))
        
stpapi.put.field("tipcs5250m000","item.f","                ")
        
stpapi.put.field("tipcs5250m000","item.t","ZZZZZZZZZZZZZZZZ")
        
stpapi.put.field("tipcs5250m000","citg.f","      ")
        
stpapi.put.field("tipcs5250m000","citg.t","ZZZZZZ")
        
stpapi.put.field("tipcs5250m000","planner.f",str$(0))
        
stpapi.put.field("tipcs5250m000","planner.t",str$(999999))
        
stpapi.put.field("tipcs5250m000","order.series",str$(ord.series))
        
stpapi.set.report("tipcs5250m000","rtipcs525001000","D",error.msg)
        if 
isspace(error.msgthen
            stpapi
.continue.process("tipcs5250m000",error.msg)
        endif
        if 
not isspace(error.msgthen
            message
(error.msg)
            
afs.done false
        
endif
    endif
    
stpapi.end.session("tipcs5250m000",error.msg)
    return (
afs.done)
}

|
Here AFS is used to release production orders with planned status.
|
Full range for that project.
function 
domain tcbool afs.release()
{
    
domain tcbool afs.done
    mess
("tijwx0199m003",0)
    
error.msg ""
    
afs.done true
    stpapi
.put.field("tisfc0204m000","cprj.f",tipcs901.cprj)
    
stpapi.put.field("tisfc0204m000","cprj.t",tipcs901.cprj)
    
stpapi.put.field("tisfc0204m000","pdno.f",str$(0))
    
stpapi.put.field("tisfc0204m000","pdno.t",str$(999999))
    
stpapi.put.field("tisfc0204m000","item.f","                ")
    
stpapi.put.field("tisfc0204m000","item.t","ZZZZZZZZZZZZZZZZ")
    
stpapi.put.field("tisfc0204m000","prdt.f",str$(date.num() - 500 ))
    
stpapi.put.field("tisfc0204m000","prdt.t",str$(date.num() + 500 ))
    
stpapi.set.report("tisfc0204m000","rtisfc020401000","D",error.msg)
    if 
isspace(error.msgthen
        stpapi
.continue.process("tisfc0204m000",error.msg)
    endif
    if 
not isspace(error.msgthen
        message
(error.msg)
        
afs.done false
    
endif
    
stpapi.end.session("tisfc0204m000",error.msg)
    return (
afs.done)
}

function 
domain tcgrno get.ord.series(domain tcgrno ser.type)
{
    
domain tcgrno tmp.ser
    tmp
.ser 0
    select    tcmcs047
.grno:tmp.ser
    from    tcmcs047
    where    tcmcs047
._index1 = {tcckon.act.sfc}
    and    
tcmcs047.grno >= :ser.type
    
and    tcmcs047.ffno 9999
    
and    tcmcs047.blck tcyesno.no
    
as set with 1 rows
    selectdo
    endselect
    
return (tmp.ser)


The technique suggested by my is working for generating
purchase orders for direct deliveries . AFS on on tdinv3260m000
is not supported. Hence this workaround . U may try this
workaround if u do not wish to use AFS on tipcs5250m000 for any reason.

PHP Code:


        order
.series 0
        srvo
.0 srvo.999999
        orno
.sorn.f  orno.sorn.t
        comp
.0 comp.999
        pono
.0 pono.9999
        buyr
.0 buyr.999999
        cplb
.0 cplb.999999
        cuno
."" cuno."ZZZZZZ"
        
cwar."" cwar."ZZZ"
        
item."" item."ZZZZZZZZZZZZZZZZ"
        
cntr."" cntr."ZZZ"
        
ddta.0 ddta.999999
        prin
.tcyesno.yes
        zoom
.to$("tdinv3260s000",z.session,"sls4240","",0)
        |
This generates purchase order for direct deliveried.
        |
3rd arg may be blank for tipcs5250s000
Reply With Quote
  #10  
Old 14th August 2004, 09:50
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Dear Hitesh,

Thank you very much for the help

regards
__________________
Tushar
Reply With Quote
  #11  
Old 16th August 2004, 11:56
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Dear Hitesh,

I have created one customised session, but when compiling the session I am getting compilation errors

Unresolve reference to function 'stpapi.put.field'
Unresolve reference to function 'stpapi.set.report'
Unresolve reference to function 'stpapi.continue.process'

I am attaching the script of the session, Please help me how to clear this error.

Regards
Attached Files
File Type: txt 5210.txt (4.3 KB, 26 views)
__________________
Tushar
Reply With Quote
  #12  
Old 16th August 2004, 12:03
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
ttstpapihand

U need to use the dll ttstpapihand like

#pragma used dll ottstpapihand
Reply With Quote
Sponsored Links
  #13  
Old 17th August 2004, 04:31
avpatil avpatil is offline
Guru
 
Join Date: Feb 2002
Posts: 710
avpatil is on a distinguished road
Baan: IVc3 - DB: SQL2000 - OS: Win 2003
Running Customizes Session

Tushar,
If the sessions you are trying to run are type 4 sessions then you can call the standard session logic without a source code or wrapper program. I have done many sessions like- Print Picking List, Generate O/B, Release O/B without using wrapper program. And the best part will be that it will take into account any customization you would have done to the program. For this you will need to use to w standard Baan functions- load_dll and exec_func. Let me know if you need an example.

Arvind
Reply With Quote
  #14  
Old 17th August 2004, 14:07
SriksAdi SriksAdi is offline
Senior Member
 
Join Date: Dec 2003
Posts: 145
SriksAdi is on a distinguished road
Baan: Baan 4 - DB: Oracle - OS: Windows NT
Hi Arvind
An example is definitely appriciated.

regards
Sriks
Reply With Quote
  #15  
Old 18th August 2004, 06:13
das_k_tushar's Avatar
das_k_tushar das_k_tushar is offline
Member
 
Join Date: May 2003
Location: Egypt
Posts: 92
das_k_tushar is on a distinguished road
Baan: BaaNIV - DB: DB2 - OS: AIX
Dear Arvind,

Thanks for the reply, Please send me an example so that I can use it in future.

Regards,
__________________
Tushar
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass values from standard session to a customized session !!! learner Tools Development 3 16th May 2003 21:07
tfacp9450m000 FIBU Brush Up Kai's Forum Users Deutsches Forum 1 16th November 1999 00:00
Herstellkostenberechnung in BaaN 4c Kai's Forum Users Deutsches Forum 4 5th July 1999 00:00


All times are GMT +2. The time now is 14:57.


©2001-2017 - Baanboard.com - Baanforums.com