Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
Would you like to see a separate forum on Baanboard for the ION product?
No
14%
Yes
86%
Total votes: 78

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd August 2012, 08:52
zechasso zechasso is offline
Member
 
Join Date: Mar 2008
Posts: 35
zechasso is on a distinguished road
Baan: B4c4 - DB: Oracle 10.2 - OS: Win2003
get position of sales order position in PCF
Baan: Other/Unknown
C/S: None/Unknown

I want to save the position-number of a sales order position in a PCF-attribute.
Is it possible to get this information for example with a 4GL-command?
Reply With Quote
  #2  
Old 3rd August 2012, 09:36
EdHubbard's Avatar
EdHubbard EdHubbard is offline
Senior Member
 
Join Date: Mar 2002
Location: Malvern, England
Posts: 288
EdHubbard is on a distinguished road
Baan: 4c4 MCR - DB: MS SQL Server 2000 - OS: Windows 2003 Server
Just some standard sql should do it (with a "!" before each line as you are in constraint on Baan4):
[ordline] = your name for the feature you are storing position number in

!table ttipcf500
!table ttdsls041

!import("tipcf500.cpva", tipcf500.cpva)

!select tdsls041.*
!from tdsls041
!where tdsls041._index5 = {:tipcf500.cpva}
!as set with 1 rows
!selectdo
! [ordline] = tdsls041.pono
!endselect


Code not tested!

Ed
Reply With Quote
  #3  
Old 3rd August 2012, 11:03
zechasso zechasso is offline
Member
 
Join Date: Mar 2008
Posts: 35
zechasso is on a distinguished road
Baan: B4c4 - DB: Oracle 10.2 - OS: Win2003
Thank you for the quick answer.
I tried this way before, but when creating a new sales order position there is no entry in the tdsls041 before saving the position. So it's not possible to get the value this way.
I tried the following way too:
!get.var(parent,"tdsls041.hpon.sc",<VAR>)

But it didn't work too.
I need to get the values from the field of the session tdsls4102s000.
Is there any way to get values directly from session-fields?
Reply With Quote
  #4  
Old 3rd August 2012, 13:04
EdHubbard's Avatar
EdHubbard EdHubbard is offline
Senior Member
 
Join Date: Mar 2002
Location: Malvern, England
Posts: 288
EdHubbard is on a distinguished road
Baan: 4c4 MCR - DB: MS SQL Server 2000 - OS: Windows 2003 Server
Is the issue that your parent process is not what you think it is?

http://www.baanboard.com/baanboard/s...hlight=get.var
Reply With Quote
  #5  
Old 6th August 2012, 14:45
zechasso zechasso is offline
Member
 
Join Date: Mar 2008
Posts: 35
zechasso is on a distinguished road
Baan: B4c4 - DB: Oracle 10.2 - OS: Win2003
I tried this way but with the function get.pgrp(pid) I get the PID from my own PCF-process, not from the parent.
Can you tell how I can get the parent-PID?
Reply With Quote
  #6  
Old 7th August 2012, 10:13
EdHubbard's Avatar
EdHubbard EdHubbard is offline
Senior Member
 
Join Date: Mar 2002
Location: Malvern, England
Posts: 288
EdHubbard is on a distinguished road
Baan: 4c4 MCR - DB: MS SQL Server 2000 - OS: Windows 2003 Server
This isn't something I have used so can't really help.
Do you need to go up the chain of PIDs - that is, get the PID of tipcf5120 and then from that get the PID of tdsls4102?

You can get the actual runtime values using ottstpshell.
Perhaps if you play around inside your constraint code you can display various values to the screen in a message box until you get the right code that works?
Reply With Quote
Sponsored Links
  #7  
Old 8th August 2012, 08:16
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 502
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
Quote:
Originally Posted by zechasso View Post
...with the function get.pgrp(pid) I get the PID from my own PCF-process...
No. You get the identification number of the process group. That can be identical to the process id, but don't rely on that! See set.pgrp() for details, or have look at Option Dialog / Start shell / ps / columns 1 and 2.

I think you can use the predefined variable 'parent'.

Regards Günther
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
Sales order linking with production order sriaguna Blogs and Web links 0 16th May 2012 13:15
Sales Order Lines manasrpadhi AFS/DDC/OLE: Function servers 2 21st September 2011 13:11
Sales Order Line Deletion learner Distribution, Transportation & Warehousing 2 1st May 2007 21:42
Sales order through AFS Debdas Banerjee AFS/DDC/OLE: Function servers 1 4th November 2004 16:39
Archiving of Sales Order Data kclewley Archiving & Multisite 6 21st January 2003 12:00


All times are GMT +2. The time now is 18:12.


©2001-2013 - Baanboard.com - Baanforums.com