pamillet
17th July 2003, 18:41
BAAN 5.0c
I want to create a multicolumn form from cprmp300, with period as columns, but items as lines. Of course, it's not possible to have both multiline and multicolumn. So i create a specific tables with a record containing all items data.
The aim is to manage items sharing the same critical resource in the same view. Hereis an example of screen structure:
-------------------------------------------------------
Scenario
Level
Items p1 p2 p3 p4 p5...
----------------------------------------------------
Item1 p11 p12 p13 p14 p15...
Item2 p21 p22 p23 p24 p25...
Item3 p31 p32 p33 p34 p35...
pij is the production plan for the item i and the period j
The specific table used as main table of the form contains all pij of for the same j.
A other specific table contains all item
I have a problem because it's seem to be not possible to add variable fields as a firts column... So i don't see how to manage the item code as first field of each line...
thanks in advance for any help...
lbencic
17th July 2003, 23:34
I am not sure I understand your requirement - maybe post an outline of your custom tables and what fields come from what table on the form would help. But .. are you asking if you can sort the form by something other than a main table field - the answer is no..not really. You can do some things with the query by form after it's loaded...but I don't think that's what you want.
Another option is to base your screen off of your custom table, use the item for sorting, then go look up the period information to display across. You can do the lookup of the period information in a before.display section of any of the fields. I am assuming those fields are not to be maintained, just displayed.
Also, this type of think is easier in a report if you have considered that. Baan is very much main table based in the forms, but using the method above it's not too bad to display other table field info.
Let me know if I missed your point.
pamillet
18th July 2003, 19:39
thanks lbencic..
more details...
the standard table is cprmp300
index: scenario (plnc), level (plvl), item (plni), period (pern)
fields: production plan (prec),
I want a form with period in colum (p1,p2,p3...) to manage production plan (so input field !)
Scenario
Level
Items p1 p2 p3 p4 p5...
----------------------------------------------------
Item1 p11 p12 p13 p14 p15...
Item2 p21 p22 p23 p24 p25...
Item3 p31 p32 p33 p34 p35...
I can't use directlty the rmp300 table because, there are two variable dimension... and i have to choose between multi vertical or horizontal...
the number of item concerned is low (less than 15...). So I decide to use vertical multicolumn for periods and build an intermediate table sprmp301 for items data with
index: scenario (plnc), level (plvl), period (pern)
fields: array of 15 ( item (plni), plan (prec), iventory (astc) )
(OK, i can optimize because item code is repeated for each period..., so i have in fact another intermediate table with item list, but this does'nt change the problem....)
I try to create a form with
Scenario
Level
........ p1 p2 p3 p4 p5...
----------------------------------------------------
Item1 p11 p12 p13 p14 p15...
Item2 p21 p22 p23 p24 p25...
Item3 p31 p32 p33 p34 p35...
where item1, 2, 3 are occurences of array as p1i,p2i,P3i... for period i...
but the first colum is not a multicolumn and if i create field for items code as non multicolum, i obtain the following result...
Scenario
Level
Item1
Item2
Item3
p1 p2 p3 p4 p5...
----------------------------------------------------
p11 p12 p13 p14 p15...
p21 p22 p23 p24 p25...
p31 p32 p33 p34 p35...
It seems to be not possible to have fields at the left of multicolumn columns....
hoping this is clear...
thanks again for any help...
:(
lbencic
18th July 2003, 19:53
ok, I understand. Probably will not like my answer though. As you can see, this is not directly possible with Baan tools because you can either be vertical or horizontal, you can't do both.
A thought comes to mind that you are supposed to be able to update from charts, which I think you could create for this, but this is also a grey area. You can check the postings on charts here if you wish to go down that route.
Another solution would be to make a temporary table that gets filled when you come into the session that contains the information in the format you want (IE 1 record per scenario/level/item that contains all the periods as fields). This may make the session slow to open. You can limit this to them actually inputting the scenario/level/item instead of being able to browse. This is VERY similar to how they did the Time-Phase Planning Overview - cprrp0520m000 session.
The user can then make the changes needed to your custom table fields, and you can then go and write the updates to the standard table whenever the users choose 'update' (using the main table io / after write, after rewrite, and possibly the after delete sections).
Probably a few ways to do this, but off hand that's what I would do.
pamillet
18th July 2003, 20:21
thanks again..
you are probably rigth.. this is a correct solution... (i've already make a prototype with it...)
But i was trying to have period as multicolumn and not item in multiline....
- because i have more period than items...
- and to be closer to item plan (cprmp2101m000) than to timephased planning
And if i create a multicolum form (record in vertical..) I can't add a first column to contain index of line.... (item in my example..)
perhaps using dynamic form editor... but it seems to be complex....
pam