Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
45%
Handover everything to System Integrator from drawing BP till implementation of ERP
18%
Hire more inhouse skilled & capable IT Resource to work directly with SI
36%
Rely on SI Architects/Consultants
0%
Total votes: 11

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 12th October 2009, 10:43
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 227
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
zoom to correct business partner
Baan: ERP LN 6.1
C/S: Client

Dear Expert,

I made session with business partner (display only) and a P.O. number (zoom to). When I zoom the order number, the session opens (standard session) to wrong business partner and orders. How to make it zoom to correct business partner (header) equal to my display only BP?
Thanks again for any help you will give.

JOJO
Reply With Quote
  #2  
Old 12th October 2009, 11:19
MilindV's Avatar
MilindV MilindV is offline
Senior Member
 
Join Date: Feb 2008
Location: Hyderabad, India
Posts: 107
MilindV is on a distinguished road
Baan: LN, BaaN-IVc4, BaaN-Vc - DB: SQL Server - OS: Windows, Unix
Lightbulb before.zoom

Hi JoJO

Assign current BP ID to the the BP ID field of the session on which you are zooming.

e.g.

Code:
field.<fieldname>: |* here in your case, it should be order no.
before.zoom:
ttmmm999.bpid = curr.bpid 

|# where ttmmm999.bpid is the BP ID (main table)field of the session
|# to which you are zooming.
|# and curr.bpid is the BP ID on current session (form field or table field)
Thanks n Regards
Milind V
Reply With Quote
  #3  
Old 12th October 2009, 16:24
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,543
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Also depending on the session and start option of the zoomed to session you might have to add code in the zoom.from sections. Usually what Milind recommended will work.
__________________
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
  #4  
Old 13th October 2009, 08:18
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 227
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
zooming

Hello mark_h and MilindV!
Actually the codes given by MilindV was the same and worked in my previous sessions created but that was a printing session but I do not know why here it does'nt work.
Thanks for your responses.

JOJO
Reply With Quote
  #5  
Old 13th October 2009, 10:15
ARijke ARijke is offline
Guru
 
Join Date: Sep 2005
Posts: 506
ARijke is on a distinguished road
Baan: Baan IV upto LN - DB: -- - OS: --
Programmers Guide: Importing variables

Importing variables
The browse list session needs to import one or more variables from the parent session. Based on the imported values, the browse list session reads records from the maintable and displays them.

Automatic import

The 4GL engine automatically imports variables (i.e. the primary key values). This happens in the following 5 situations:

Situation 1

From a parent session with main table X a browse list session is started with main table Y. Table X has a reference (foreign key) to table Y. E.g. X = Business Partner table, Y = Currency table. The currency field in the Business Partner table refers to the Currency table.The 4GL engine imports the browse field(s) from table X and stores them in the primary key fields of table Y.Consequences for programming in UI script: None

Situation 2

From a parent session with main table X a browse list session is started with main table Y. A field in table Y refers to table X. (In most cases, there is an identifying relationship between table X and table Y, e.g. order header (table X) and order lines (table Y).) The 4GL engine imports the primary key fields from table X and stores them in the primary key fields of table Y.

Example

Primary key of table X is order number

Primary key of table Y is order number, position number

The 4GL engine imports the order number from table X to the corresponding field of table Y. The position number field remains empty.

Consequences for programming in UI script: None

Situation 3

From a parent session with main table X a browse list session is started with the same main table. E.g. when the user browses from the Business Partner Details session to the Business Partners browse list session to select a Parent Business Partner.The 4GL engine imports the primary key values from the parent session of table X and stores them in the primary key fields of table X in the browse list session.

Consequences for programming in UI script:

Often a hierarchical structure exists in the same table. In those cases you want to override the automatic import by the 4GL engine, since not the primary key values should be imported, but the value of the browse field (e.g. the Business Partner Parent field) and that value should be stored in the primary key fields of the maintable of the browse list session. You should also take care of saving and restoring the primary key values, otherwise the record pointer of the parent session is set incorrectly.

Example

declaration:

table ttcom100

domain tccom.bpid hold.bpid

field.tccom100.prbp:
before.zoom:
|* Save the primary key field
hold.bpid = tccom100.bpid
tccom100.bpid = tccom100.prbp
after.zoom:
|* Restore the primary key field
tccom100.bpid = hold.bpid
Situation 4

From a parent session without a main table (e.g. a print session) a browse list session is started with main table X. The 4GL engine imports the primary key values of table X (if available) from the parent process and stores them in the primary key fields of the browse list sessions' main table.

Example

Browse list session Business Partners is started from the parent session Print Business Partners. The main table of the browse list session is tccom100. The 4GL engine tries to import tccom100.bpid from the print session and stores it in the tccom100.bpid field of the main table of the browse list session.

Consequences for programming in UI script:

In many cases you will have to re-program the parent session in such a way that the primary key fields of the main table of the browse list session are filled.

declaration:

table ttcom100

field.bpid.f:
before.zoom:
tccom100.bpid = bpid.f
Situation 5

From a parent session with main table X a browse list session starts with main table Y. There is no relationship between table X and table Y (e.g. in case of an integration between packages). The 4GL engine imports the primary key values of table Y from the parent session and stores them in the primary key fields of table Y of the browse list session.

In many cases you will have to re-program the parent session in such a way that the primary key fields of the main table of the browse list session are filled.

Consequences for programming in UI script:

Example

Example: (Browsing to Freight Service Levels from Warehousing Orders)

declaration:

table tfmfmd070

field.whinh200.serv:
before.zoom:
fmfmd070.serv = whinh200.serv
Note
Note: for purposes of clarity the example does not use integration DLLs, nor does it use start.session() to start the browse list.

Overriding Automatic Import

Automatic import only works when the browse list starts with the primary key. With dynamic index switching it is also possible to start the browse list with other keys. In that case automatic import can give wrong results.

Because of this and other reasons the application wants to override automatic import. The application might implement browsing as mentioned above at point 5. However the application can also choose to use zoom.* variables in these cases. (The name of these variables does not matter, however it is common practice to name them zoom.*).

Example:

parent session UI script

declaration:

extern domain tccom.bpid zoom.bpid

field.whinh200.stco: | Ship to BP
before.zoom:
zoom.bpid = whinh200.stco
browse list session UI script

declaration:

table ttccom111

zoom.from.all:
on.entry:
import("zoom.bpid", tccom111.stbp)
Example browsing to session with other than primary key (e.g. browsing to Business Partners by Parent Business Partner):

parent session UI script

declaration:

extern domain tccom.bpid zoom.bpid | BP id
extern domain tccom.bpid zoom.prbp | Parent BP

field.ppmmm999.bpid:
before.zoom:
attr.zoomindex = 2 | Start with index 2
zoom.prbp = ppmmm999.prbp
zoom.bpid = ppmmm999.bpid
browse list session UI script

declaration:

table ttccom100

zoom.from.all:
on.entry:
on case curr.key
case 1:
|* Automatic import
break
case 2:
import("zoom.prbp", tccom100.prbp)
import("zoom.bpid", tccom100.bpid)
break
endcase
Note that the start option of the browse list session can cause this not to work (e.g. when this is set to get.defaults). It is recommended to use the default start option instead.
Reply With Quote
  #6  
Old 14th October 2009, 11:26
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 227
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
zooming

Dear ARijke,

Thank very much for your article on zooming and it works and fine.
Thanks again.

JOJO
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
Purchase item from one supplier only batmush Distribution, Transportation & Warehousing 7 10th July 2007 11:27
Business Partner Balance not correct rijandubey Finance, Invoicing and Integration 2 8th March 2007 11:00
EDI: Business partner NOT FOUND Glisha Distribution, Transportation & Warehousing 1 17th February 2006 02:05
Contact by Business partner mostrightfuture Tools Development 0 17th August 2004 11:45
One time business partner changing riazsayeed Distribution, Transportation & Warehousing 5 16th July 2004 16:45


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


©2001-2020 - Baanboard.com - Baanforums.com