DexionIT
6th December 2007, 07:45
I am new to the world of PCF and in particular am interested in running constraints using 3/4 GL.
I have encountered a few issues when trying to execute examples from earlier released of ERP.
Is anyone able to help highlight the major differences applicable to PCF in ln 6.1 when if comes to using 3/4GL?
Issue 1:
I am experiencing difficulty using the import method to determine the Quote/Order Number when adding configured items to a quote/order.
An example from IVc used something like this:
! table ttdsls040
long orno
! import ("tdsls040.orno", orno)
I am assuming that I should be able to use the code below to do the same thing for an order in LN. When I do use this all I get is a blank orno that is 9 chars long.
! table ttdsls400
long orno
! import ("tdsls400.orno", orno)
Am I missing something.
Thanks in advance.
EdHubbard
6th December 2007, 13:44
I am sure I have read about different versions needing or not needing the "!" character. Could it just be that LN doesn't need the !.
Ed
Andreas
6th December 2007, 14:12
Hi DexionIT,
i'm on 5.0 c and there is no need for a ! in our version, so i think it should work without it in LN.
Another one is that the order number is not a long value but a String since 5.0.
So try something like
table ttdsls400
extern domain tcorno orno
import ("tdsls400.orno", orno)
Hope this helps,
Andreas
DexionIT
7th December 2007, 01:47
Thanks for the quick replys,
I was playing around and changed from string to long when I was donig a len() of the returned variable to see if I was getting anything at all. So yes that should not be a long.
In terms of "!" i have alot of other code running in constriants that is running fine and it uses the "!". I have just tried to compile with out the "!" and the complier spits the dummy.
I also tried the
extern domain tcorno orno
And I am still getting a blank value that is 9 chars long.
Here is what I am doing.
We are using PCF to generate straight to item master.
Our item code stucture uses the last 5 digits of the Sale Order. We currently have a feature where the user can enter this manually. I am just trying to pull the value in automatically to save data entry and any errors that may come along with it.
I have a Before Input Constraint for the feature, the code mentioned here is what I have in the constraint. The massaged orno is then assigned to the feature.
I am I doing something wrong or can I not access this tdsls400
Andreas
7th December 2007, 08:49
Hi DexionIT,
from which session do you start the Configurator Session?
DexionIT
10th December 2007, 00:18
When testing the tdsls400 configurator was started from the Sales Orders Session(tdsls410)
I also tried tdsls100 from the Sales Quotes Session (tdsls160)
Thanks
Andreas
10th December 2007, 08:51
Hi DexionIT,
i checked in my environment. I was able to import fields from tdsls401.
Because in 5.0c the configurator session is started from tdsls4101s000 i think the table fields from 401 are accessible.
Maybe you can give that a try.
Hope this helps,
Andreas
DexionIT
11th December 2007, 04:04
Andreas,
Thanks for the suggestion. I gave it a go and I am still just getting a blank string 9 chars long.
!table ttdsls401
string orno
!import ("tdsls401.orno", orno) |import order number
![PRJNUM] =orno
I also tried using
!extern domain tcorno orno
Is it possible that Infor/SSA have stripped access to these tables from configurator?
I was also informed yesterday that I can no longer access the item tables during generation. This means that I cannot modify any item fields(eg, weight EOQ) when the item is first generated. I now have to get users to run the generation twice to get the item tables updated.
Andreas
13th December 2007, 15:45
Thanks for the suggestion. I gave it a go and I am still just getting a blank string 9 chars long.
!table ttdsls401
string orno
!import ("tdsls401.orno", orno) |import order number
![PRJNUM] =orno
I also tried using
!extern domain tcorno orno
I was also informed yesterday that I can no longer access the item tables during generation. This means that I cannot modify any item fields(eg, weight EOQ) when the item is first generated. I now have to get users to run the generation twice to get the item tables updated.
Hi Dexion IT,
Not sure, but think you have to use 'string(9) orno' to declare your variable, but like you mentioned it doesn't work with the domain definition either. So there must be another reason for your problem.
Is it possible that Infor/SSA have stripped access to these tables from configurator?
Might be, i remember that they capsulated the pcf3.. tables sometimes, but they reopened them at a later stage.
So another question:
Do you have the code snippet in one constraint, or is it spread over two or more constraints? In that case you have to define you're orno variable as global.
Something like:
domain tcorno orno global
Are you able to debug your generated Configurator-Script?
Andreas
DexionIT
14th December 2007, 01:08
The code to retrieve the orno is in one constraint.
The constraint is a Before Input Constraint on the First Feature of my Configureable Item.
I have not debugged the constraint and was not aware that a configurator constraint could be debugged. Are you able to advise or point me in the direction of info on debugging constraints?
Thanks again
Hitesh Shah
14th December 2007, 06:10
U have written import function to get the value of orno . Import function plainly gets the value from it's parent process if it exists . So it may be a case that tdsls400.orno exists in a grand-parent or higher up . While debugging the constraint , check the value of pid , parent and "parent" of parent . Using the get.var function u must get the process id of the program where tdsls400.orno is current and present . Use the process listing in ttstpshell for guide to while debugging the constraint.
Once u get the process id of the program where tdsls400.orno is current , u can use the get.var function to get the value of tdsls400.orno .
There are good samples on this board for get.var function .
Andreas
14th December 2007, 09:10
Are you able to advise or point me in the direction of info on debugging constraints?
Hi Dexion,
you can't do the compile with debug out of the application. You have to compile it manually.
Here's what to do (It's for 5.0c).
First you have to search for the source of your configurator script. If you don't changed the standard paths in the compilation session it should be something like
.../bse/application/ti 'your package VRC'/ptipcf/ppcfcons 'company Number'/ 'a Number or character '
The number or character of the script can be found in tipcf201.
Now when you determined the location you have to open a shell, change to directory /bse/bin and type the following:
bic6.2 -l -o .../bse/application/ti'your package VRC'/otipcf/opcfcons 'company Number'/'determined Number or character' .../bse/application/ti'your package VRC'/ptipcf/ppcfcons 'company Number'/'determined Number or character' .
Now you can debug your configurator script during configuration.
Edit: UUUPS, sorry i recently recognized that you are on a WIN System, so you have to look for bic6.2.exe?
Hope this helps,
Andreas
DexionIT
14th January 2008, 02:04
Thanks Andreas,
I have been away on leave over XMas and New Year. We have been informed that alot of the table access that used to be available in this manner is no longer supported. We are currently investigating and pushing for some more answers.
Regards
Mark