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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 8th December 2016, 15:09
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 445
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
At the click of a checkbox, want the session to be from Type-3 to Type-2
Baan: ERP LN 6.1 FP10 (Infor ERP 10.4)
C/S: Both

My Session is a Type-3 (Multi Occurrence with a View field) , Now at the event of a Checkbox i want the session to be converted to Type-2 with showing all the records and not restricting it to with a particular view field.

Things i tried

Tried to select all Projects instead and re-defined query.extend,hit rebuild.query . But i am not getting expected results.
Reply With Quote
  #2  
Old 8th December 2016, 16:28
kishoremeher kishoremeher is offline
Junior Member
 
Join Date: Apr 2007
Location: India
Posts: 24
kishoremeher is on a distinguished road
Baan: baan4, baan LN - DB: Oracle - OS: UNIX
change of view field

try remove.field.from.view()
Reply With Quote
  #3  
Old 9th December 2016, 06:59
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 445
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
It can only be used in before.program..
Reply With Quote
  #4  
Old 9th December 2016, 08:35
srprks srprks is offline
Member
 
Join Date: May 2016
Location: Bangalore
Posts: 71
srprks is on a distinguished road
Baan: 10.4,Baan IV - DB: Oracle,SQL - OS: Unix,Windows
Hi,
If this solution can meet your expectation:
In your fields on.input event ,you can do one thing, start the session using start session/zoom.to$ and provide there session type MODAL/ MODLESS. and kill your session.

Thanks
Reply With Quote
  #5  
Old 9th December 2016, 13:43
vamsi_gujjula's Avatar
vamsi_gujjula vamsi_gujjula is offline
Senior Member
 
Join Date: Nov 2011
Location: hyderabad ; india
Posts: 240
vamsi_gujjula is on a distinguished road
Baan: ERPLN fp3 and 10.4 - DB: oracle - OS: Aix , Redhat linux 6
have look at below code it might help

I had almost similar requirement ... a toggle on view fields under specific command but if the sort by option was changed the view fields would in changes type 2 list ( the toggle would work if sort by was changed , but it your case as srprks said you need to restart the session.

-- The comment part would help you in restarting the session and retrieving the key values

Code:
declaration:

	extern	domain  tcbool		no.view.fields		
	extern  domain  tcitem     	xi.item

before.program:

	get.var(parent,"no.view.fields",no.view.fields)			
	get.var(parent,"xi.item",g.item)	
	if no.view.fields then
		remove.field.from.view("XXsls028.item")
		remove.field.from.view("XXsls028.citm")
	endif

| zoom.from.all:
| on.entry:
| 	if not isspace(g.item) then
| 		ignore.first.event = true
| 		XXsls028.item = g.item
| 		execute(find.data)
| 	endif

group.1:									
init.group:
	set.checked.command("toggles.view.fields",no.view.fields)	

functions:
	
function extern toggles.view.fields()						
{
	no.view.fields = not no.view.fields
	set.checked.command("toggles.view.fields",no.view.fields)
	xi.item = XXsls028.item
|start.session(MODELESS+MULTI_OCC,"XXsls0128m000","XXsls0128m000",")
|	end()

}
__________________
Regards,
Vamsi
Reply With Quote
  #6  
Old 15th December 2016, 14:15
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 445
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
I tried this restarting the session business. But it really looks terrible.
Reply With Quote
  #7  
Old 16th December 2016, 00:18
shah_bs's Avatar
shah_bs shah_bs is offline
Guru
 
Join Date: Jan 2002
Location: Lewisville, Texas
Posts: 387
shah_bs is on a distinguished road
Baan: BAAN IVc3 with A&D2.2b - DB: ORACLE 9 - OS: HPUX
Up until BAAN IV c, any BAAN session has the concept of 'standard program' which controls the 'under the hood' navigations of the screen (in addition to the 'flow' of the session). So, technically, it is necessary to have two different sessions to handle Type 2 and Type 3 navigations. I would assume that this 'foundation' of 'standard program' is also applicable to later versions of BAAN.

Just wondering what sort of functionality would require switching between Type 2 and Type 3.
Reply With Quote
  #8  
Old 16th December 2016, 12:48
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 445
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
The requirement is to create a Project Dashboard. Now the user wants all the details by Project Wise. So i have created the view field as Project. And in the detail section, all price lists are there, cost price, sales price etc.


Now he wants to see the details by Project and Parent BOQ wise. Parent BOQ is an entity under project. A Project can have multiple Parent BOQ under it. Now the thing is Parent BOQ is not in the index field. And even if i include it under index field, i would have to restart the session, wouldnt i have to?
Reply With Quote
  #9  
Old 16th December 2016, 12:59
vamsi_gujjula's Avatar
vamsi_gujjula vamsi_gujjula is offline
Senior Member
 
Join Date: Nov 2011
Location: hyderabad ; india
Posts: 240
vamsi_gujjula is on a distinguished road
Baan: ERPLN fp3 and 10.4 - DB: oracle - OS: Aix , Redhat linux 6
Quote:
Originally Posted by shah_bs View Post
Up until BAAN IV c, any BAAN session has the concept of 'standard program' which controls the 'under the hood' navigations of the screen (in addition to the 'flow' of the session). So, technically, it is necessary to have two different sessions to handle Type 2 and Type 3 navigations. I would assume that this 'foundation' of 'standard program' is also applicable to later versions of BAAN.

Just wondering what sort of functionality would require switching between Type 2 and Type 3.
In my case .. just to upload the data from excel ..using mingle. ( all data - no just the data related to view fields. ) .. so instead of a new session . just had a toggle.
__________________
Regards,
Vamsi
Reply With Quote
  #10  
Old 16th December 2016, 17:11
shah_bs's Avatar
shah_bs shah_bs is offline
Guru
 
Join Date: Jan 2002
Location: Lewisville, Texas
Posts: 387
shah_bs is on a distinguished road
Baan: BAAN IVc3 with A&D2.2b - DB: ORACLE 9 - OS: HPUX
Ajesh

I am not familiar with the Tools system of BAAN LN. They may have better flexibility than BAAN IV c3.

HOWEVER, I would almost think that they could not have disturbed the foundation of the 'standard program' because when a type 3 session is generated (or any type for that matter), the generator EXPECTS the index to be defined at the DATABSE level - that is what allows us to choose how many fields of an index are the view fields and how many in the detail.

(As far as I have understood your requirement) In terms of how I would do this (maybe you have the code and license that will allow to do this):

- Session 1 - type 2 session - display project level data

- sub-session 2 - type 3 session - on selection of the project in session 1, zoom to the sub-session to display the details by BOQ ( assuming that this field is also part of the index at the database level - if not, consider possibility of adding it - but that will need some amount of impact analysis, so something else does not 'break')
Reply With Quote
  #11  
Old 19th December 2016, 14:34
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Actually I did something like this - not quite the same. I used multiple sessions and just made tabs. Each tab represented a different session. It was not pretty and I had to anchor it to the screen and prevent changing form size. Not sure this even qualifies for what you are looking form. In my case it was one main table per form. Some multi-occurrence and some single record.
Attached Images
File Type: png Capture1.PNG (6.0 KB, 15 views)
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #12  
Old 20th December 2016, 02:46
shah_bs's Avatar
shah_bs shah_bs is offline
Guru
 
Join Date: Jan 2002
Location: Lewisville, Texas
Posts: 387
shah_bs is on a distinguished road
Baan: BAAN IVc3 with A&D2.2b - DB: ORACLE 9 - OS: HPUX
Wow! This is taking things to the limit!

How did you handle the type 3 form navigation? Or did it just work by standard program logic?
Reply With Quote
  #13  
Old 20th December 2016, 03:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Quote:
Originally Posted by shah_bs View Post
Wow! This is taking things to the limit!

How did you handle the type 3 form navigation? Or did it just work by standard program logic?
Works by standard session logic. Each tab is a separate subsession. So basically when you click on a tab it executes another sub-session. Then if you are in that sub-session and click on a different tab - the subsession ends, returns to the main-session and then calls the next sub-session. This beast was designed so you could pick a part - then go to different places and see what it says for inventory and peg. And if necessary you can update a few fields to so the part quantity is balanced across all the tables.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #14  
Old 20th December 2016, 10:22
okneb1 okneb1 is offline
Junior Member
 
Join Date: Aug 2016
Posts: 5
okneb1 is on a distinguished road
Baan: 10 - DB: oracle - OS: win
Quote:
Originally Posted by mark_h View Post
Actually I did something like this - not quite the same. I used multiple sessions and just made tabs. Each tab represented a different session. It was not pretty and I had to anchor it to the screen and prevent changing form size. Not sure this even qualifies for what you are looking form. In my case it was one main table per form. Some multi-occurrence and some single record.
Can you share how you achieved this please?
Reply With Quote
  #15  
Old 20th December 2016, 14:59
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
So each session has the same 7 forms - so all the session point to the same forms. And yes some are type 1's and some are type 3's. So lets take form 5 - maintain items. Besides the normal session code for its table the parent session code is:
Code:
form.5:
before.form:
	chld.proc = wait.and.activate("tifix0101s00a")
	check.return.from.sessions()
	to.form(some.form)
functions:
function check.return.from.sessions()
{
	import("some.form",some.form)
	import("abrt.code",abrt.code)
	if abrt.code>0 then
		execute(end.program)
	endif
	import("zoom.cprj",ticpr951.cprj)
	import("zoom.item",ticpr951.item)
	import("zoom.mbcs",ticpr951.mbcs)
	ticpr951.item = zoom.item
	ticpr951.cprj = zoom.cprj
	ticpr951.mbcs = zoom.mbcs
	ticpr951.trdt = 0
	execute(find.data)
}

So now the subsession tifix0101s00a is activated.
Code:
form.1:
before.form:
	set.exit.variables()
	
init.form:
	to.form(5)

form.2:
before.form:
	set.exit.variables()
	
form.3:
before.form:
	set.exit.variables()
	
form.4:
before.form:
	set.exit.variables()
	
form.5:
init.form:
	max_window()
	import("ticpr951.item",ticpr951.item)
	import("ticpr951.cprj",ticpr951.cprj)
	import("ticpr951.mbcs",ticpr951.mbcs)
	tiitm001.item = ticpr951.item
	execute(find.data)

form.6:
before.form:
	set.exit.variables()
	
form.7:
before.form:
	set.exit.variables()
	
|****************************** field section *********************************
field.ticpr951.item:
before.display:
	get.all.totals()
|****************************** choice section ********************************	
choice.end.program:
before.choice:
	abrt.code = 1
	export("abrt.code",abrt.code)
	exit()
	
choice.abort.program:
before.choice:
	abrt.code = 2
	export("abrt.code",abrt.code)
	exit()
functions:
function set.exit.variables()
{
	abrt.code = 0
	some.form = form.curr
	export("some.form",some.form)
	export("abrt.code",abrt.code)
	zoom.item = ticpr951.item
	zoom.cprj = ticpr951.cprj
	zoom.mbcs = ticpr951.mbcs
	export("zoom.item",zoom.item)
	export("zoom.cprj",zoom.cprj)
	export("zoom.mbcs",zoom.mbcs)
	exit()
}

Now what I did not post is some of the code for the normal session use. Which was not a whole lot - I only allowed certain fields to be modified - mainly quantity fields.

library code -
Code:
function extern max_window()
{
	long My.Win
	My.Win = current.mwindow()
	change.object(My.Win,DsNx,0,DsNy,0)
	update.object(My.Win)
}
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.

Last edited by mark_h : 20th December 2016 at 15:26. Reason: Add library code
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
Auto Save of Data in Form Type 2 session jbaanm Tools Development 3 4th August 2015 22:54
How to get the session type? DirkRi Tools Development 3 3rd May 2003 01:01
AFS e type 3 session E.Toniolo AFS/DDC/OLE: Function servers 3 21st February 2002 20:54


All times are GMT +2. The time now is 09:44.


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