klixy23
15th April 2004, 15:11
If I want to add a new step as first step in sales orders is it neccesary to renumber the other steps or is a sequence 12, 1, 2, ..., 7 possible?
Is the changing of the related character position in pmsk hardcoded in sessions or retrieve the session self the own position in the step sequence?

I read other threads here, but not found answer to my questions.

evesely
15th April 2004, 15:20
Within certain limitations, you should be able to create a new sales order type that has a different sequence. That way you don't have to modify the existing step numbers. Obviously your new step must be coded to properly change the mask and determine the next step.

In most (if not all) cases, the step numbers are not hard-coded. They are determined at runtime via calls to function itdsls0014.

skosana
16th April 2004, 00:03
We should be able to enter the order steps in any sequence. We are limited only by the validations in the session 'Maintain Order Types' viz. Process Delivered Orders must be final step etc. Once we maintian the order type and enter sequence numbers in tcmcs0142m000 'pmsk' should not be a issue. The Baan functions that update 'pmsk' should take care of it.

klixy23
16th April 2004, 09:13
I've tried following: Copy the entire session (form, script, reports) tdsls4401m000 "Print Order Acknowlegement" to session tdsls4401m100 and rename it to "Print Order Receive Acknowlegement". This must be the first step in our sales process flow. Than I insert this session as step 12 in tcmcs0139m000 and create a new order type in sequence 12, 1, 2, 3... and so on.
If I insert a sales order than the next step is 12. OK. But it is still possible to do step 1 first. If I do step 12 first than the status isn't change from 12 to 1 and the pmsk is not updated. That's why I think there is some hardcoded in session script tdsls4401.

Where is my mistake?

Do I have to call the function itdsls0014 in my own script? Does this work without source?

evesely
16th April 2004, 15:25
Most of the scripts have code like the following in them:

read.stepno.session.isls0014("tdsls4401m000",stno.4401,exag.4401)


The step number is not hard-coded, but the session name is. Some, if I remember correctly, are forward thinking enough to use prog.name$ rather than the hard-coded session name. In this case, copying the script meant that it still thought you were on step 1, not the first step (12). Somehow (e.g., using include itdsls00014 or hard-coding) you must set stno.4401 to 12 in your copied session. You could use something like RMCgen (http://www.rmcis.com/rmcgen2.html) or QKey to add a line at the end of the before.program section. I'm sure there are other ways around this, too.

Good luck.

klixy23
19th April 2004, 12:41
Thanks for the hints. I look into the object with a hex editor and found a string "tdsls4401m000". I changed this to the new session name "tdsls4401m100" but i get a fatal error: object inadmissable (translation from german). So this doesn't work.

But now I found a so simple solution!
In report script I import the variable stno.4401 in before.program section, change the value and export this variable. Now the status is changed, when I execute my copied session and print the report.
Really it works.

evesely
19th April 2004, 15:15
Great. Very clever solution!!