Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
26%
500 - 800 GB
3%
800 - 1200 GB
9%
1200 - 1500 GB
12%
1500 - 2000 GB
12%
> 2000 GB
21%
Total votes: 34

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 5th August 2013, 09:52
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
Question ERP LN Wrapper Related Issue
Baan: Other/Unknown
C/S: None/Unknown

Hi All,

I have generated wrapper on standard script. and attached with main session.

now how to handle DAL Using wrapper ... For Ex.
from purchase contract line we can maintain delivery contracts
but for that we need to check delivery contract available checkbox on purchase contract lines

now i have generated wrapper on purchase contract lines.
the code for delivery contract is

function extern boolean tdpur3104m000.is.allowed()
{
parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id)
}

but it will give error because of its return type boolean

now if I modify script like

function extern boolean tdpur3104m000.is.allowed()
{
boolean retval
parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id,retval)

return(retval)
}

but this will return always false(0)

and if I comment the code
the option delivery contract is activate for all even if that checkbox is not checked.


anybody having idea how to handle it???
Reply With Quote
  #2  
Old 5th August 2013, 11:07
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

Code:
function extern boolean tdpur3104m000.is.allowed()
{
	boolean	ret_val
	parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
	parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id, ret_val)
	return(ret_val)
}
This was already generated with the wrapper. Why was there a need to modify anything?

Anyway, I guess there was some problem while creating the macro. Also, please clarify what your requirement is?
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 5th August 2013, 12:33
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
Hi,

When I have generated wrapper,return values are not come by its own ,here I have attached my code for your ref and also My requirement.

In standard Purchase contract line session delivery contract is enabled when delivery contract available checkbox is checked. otherwise it is disable.

I need to customize purchase contract for one of my system AMC so I have generated wrapper on standard script.


function extern boolean tdpur3104m000.is.allowed()
{
parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id)
}

this code is generated in wrapper
to enable or disable delivery contract

now if I add return value as I specified above post

function extern boolean tdpur3104m000.is.allowed()
{
boolean retval
parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id,retval)
return(retval)
}

then it will always return false so delivery contract is always disable for my customised system though I have checked that checkbox that is mendatory for delivery contract.

What is the issue with return value I dont know...
Attached Files
File Type: txt tdpur3101w_wrp.txt (32.5 KB, 27 views)
__________________
Regards,
Ankita Patel
Reply With Quote
  #4  
Old 5th August 2013, 13:05
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi ,

Did you tried changing it to ret_val?

I am not sure if that will work or not. But you can always play with these variables and you never know if it works.

Anyway, here's the wrapper I got.
Attached Files
File Type: bc tdpur3101.bc (32.0 KB, 35 views)
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 5th August 2013, 14:09
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
ret_val also not working...
__________________
Regards,
Ankita Patel
Reply With Quote
  #6  
Old 5th August 2013, 16:57
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

We don't use Purchase Contract but I just created a test scenario with this wrapper script which I have attached. And the session works normally.

Have you done any other changes to the wrapper? I have still not understood what you are trying to do. You can attach the screen shots to show where the problem is.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #7  
Old 6th August 2013, 07:42
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
Hi bhushan,

Here I have attached screen shots. I hope this will usefull to identify problem. this is only one case I have explained.if this will solved out,I'm able to resolve the other cases.
Attached Files
File Type: pdf Purchasecontract.pdf (419.0 KB, 17 views)
__________________
Regards,
Ankita Patel
Reply With Quote
Sponsored Links
  #8  
Old 6th August 2013, 08:09
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi ,

Make these changes:-

Declare table :- ttdpur301

And in the function make this change:-

Code:
function extern boolean tdpur3104m000.is.allowed()
{
	boolean	ret_val
	parent.object.function.id = get_function(parent.object.dll.id, "boolean tdpur3104m000.is.allowed")
	parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id, ret_val)


if tdpur301.dsch = tcyesno.yes then
        return(TRUE)
else
        return(FALSE)
endif
}
Let me know, if it helps. I tried at my end and its working.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!

Last edited by bhushanchanda : 6th August 2013 at 08:25.
Reply With Quote
  #9  
Old 6th August 2013, 08:26
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
Hi,

Its working ...

Thank you..
__________________
Regards,
Ankita Patel
Reply With Quote
  #10  
Old 6th August 2013, 08:31
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Thumbs up

Good.

Be sure to check do this for other check boxes as well, if you are using them.

Anyways, glad that worked for you.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #11  
Old 6th August 2013, 12: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
My question is why will it return false always..?

i have checked the same scenario on sales orders something like

Cancel.sales.order.

Code:
function extern boolean cancel.order.is.allowed()
{
	domain	tcbool	ret.cancel.order.is.allowed
	
	if order.type.is.dm1() then						|#620261.sn
		return(false)
	endif									|#620261.en
										|#022415.sn
	if not check.tms.status()then
		return(false)
	endif									
										|#022415.en
	ret.val("cancel.order.is.allowed",ret.cancel.order.is.allowed) | macro 
	return(ret.cancel.order.is.allowed)
}
i get the return value false and true
__________________
Regards,
Vamsi
Reply With Quote
  #12  
Old 6th August 2013, 12:54
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
i am not sure about the issue ... do face the issue for all tcbool fuctions...?
can you check with

parent.object.function.id = get_function(parent.object.dll.id, "tdpur3104m000.is.allowed")

one issue with the code of bhushan is that

the function return is always depends of

tdpur301.dsch not on the standard fuction.
__________________
Regards,
Vamsi
Reply With Quote
  #13  
Old 6th August 2013, 13:06
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,365
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Yes Vamsi,

I got a PM from her asking about the same thing. Yes, there might be number of references, tables, variables and fields on which the function returns the value.

But, it will be quite tedious or can be impossible to track if you don't have std. scripts.

Quote:

Hi,


Its working well but what if we are not aware of the conditions of enabling & disabling commands .. as we are not having standard scripts at our side..

any idea to handle it ? as method.is.allowed is written in DAL2 and it is returning value according to some conditions.

we should get the exact return value of DAL2 instead of defining conditions in our session script.

any idea??


Reply:-
Hi,

I don't think there is any way to track that. But, in the debugger, you can can collect all the related table field values and check why the return value is FALSE as there are dependencies. It can include multiple tables and variables too which are coming from the Program Script.

Also, you can put the bshell in debugger to track the program flow which can give you the related dll's and you can generate the documentation of those dll's and study them.

But well, that might be a tedious job. The simplest way is check if everything is working the same way as it works in standard. Take a user and let him perform the activities, if any problem found you can change the script likewise.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #14  
Old 6th August 2013, 14:10
benito's Avatar
benito benito is offline
Guru
 
Join Date: Jan 2002
Location: Eastern US
Posts: 520
benito is on a distinguished road
Baan: LN 10.2.1 / LN 10.5 / BaanIVc4 - DB: Oracle11/Informix - OS: Unix/Linux
play with it

maybe take out the boolean. hope this gives you a hint.

http://www.baanboard.com/baanboard/s...+ticpr2210m000
Reply With Quote
  #15  
Old 6th August 2013, 15:09
Ankita Patel's Avatar
Ankita Patel Ankita Patel is offline
Junior Member
 
Join Date: Jul 2012
Location: Hyderabad
Posts: 29
Ankita Patel is on a distinguished road
Baan: BaaN IVC4 ,ERPLN - DB: Oracle - OS: ms - Win
Question

yes vamsi,

for all tcbool functions, it returns false. do you have any idea about it ?
__________________
Regards,
Ankita Patel
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
:confused: wrapper In ERP LN not working proper Ankita Patel Tools Development 4 9th August 2013 07:25
Manager - ERP Infor Ln (Logistics Consultant) HYVA India Jobs and Resumes 2 12th July 2013 14:49
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 16:54
Install Issue - Upgrade of our ERP LN system from FP1 to FP3 BOBBYLYON Tools Administration & Installation 0 5th December 2008 12:23
SSA ERP-NL / Baan V6 is it Vaporware ? tjbyfield General Discussion & Chat 18 1st October 2004 11:50


All times are GMT +2. The time now is 21:01.


©2001-2018 - Baanboard.com - Baanforums.com