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 19th December 2016, 23:11
eric.dizon's Avatar
eric.dizon eric.dizon is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
eric.dizon is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: 2003
Functions that returns two or more value with different data type
Baan: ERP LN 6.1 FP7 (Infor ERP 10.1)
C/S: None/Unknown

I know I am trying to push the limits with this question. I am kind a wishful thinking if it is possible to get multiple results from a function with different data types. This would be possible on OOP type of programming. Is that imposible to do in LN without using tables?
Reply With Quote
  #2  
Old 20th December 2016, 02:29
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,934
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Do you have an example? You can do a lot with dynamic sql, but I am having a hard time picturing what you might be specifically asking about.
__________________
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
  #3  
Old 20th December 2016, 02:42
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
Not sure about BAAN ERP LN.

But in BAAN IV c3, it would be possible as follows:

The following example is for returning two values
- one is the string representation of the 'next field' (the extern domain tcmcs.str100 string)
- second is the position of that field in the input string (the ref domain tcmcs.long)

By defining as many 'ref' arguments, it is possible to return as many return values as required.

For example, take a look at the Tax Calculation library - I think it is tccomdll0000 or something.

Code:
function extern domain tcmcs.str100 tccomdll9003c.get.next.field(
                domain  tcmcs.s999      i.string.c,
                domain  tcmcs.long      i.string.length.c,
                        string          i.separator.char.c,
        ref     domain  tcmcs.long      io.start.pos.c)
{
        domain  tcmcs.long      p.posn.c
        domain  tcmcs.str100    p.field.c

        p.field.c = ""
        p.posn.c = io.start.pos.c + 1   |* To skip over the separator character

        while p.posn.c <= i.string.length.c
            if  i.string.c(p.posn.c;1) = i.separator.char.c
            then
                break
            endif
            p.field.c = p.field.c & i.string.c(p.posn.c;1)
            p.posn.c = p.posn.c + 1
        endwhile

        io.start.pos.c = p.posn.c

        return(p.field.c)
}
Reply With Quote
Sponsored Links
  #4  
Old 20th December 2016, 03:26
eric.dizon's Avatar
eric.dizon eric.dizon is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
eric.dizon is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: 2003
mark_h - I intend to write a function where I can expect two values it will return under the functions section of a DAL or Program script.

shah_bs, That helps a lot as long as I assign corresponding value on the ref variable that I can those values on the instatiating function. Pretty cool!
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
CODE: Validate Import Exchange Scheme Data gfasbender Code & Utilities 10 18th November 2009 00:19
Importing item data from CSV file Paul P Distribution, Transportation & Warehousing 3 8th September 2007 15:01
How to use function about STPAPI insert data to session (Form type 3) wikizhou AFS/DDC/OLE: Function servers 1 4th July 2007 19:29
Using Set Data Type ksthakur Tools Development 4 3rd February 2003 10:36


All times are GMT +2. The time now is 00:48.


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