RavCOder
7th August 2019, 16:28
Hi,
I have to create a session that read headers and rows from two different
existing tables(tdsls400 e tdsls401).
Then i have to create a easy query for sum a field with another field (ex. quantity with item).
This sum have to put in a new table (
I've already created before by already putting the required fields of the tables I mentioned before ), but when I created and compiled the session it gives me errors:
FATAL ERROR: [MR_NULL_POINTER] NULL pointer use on ''
FATAL ERROR - can not continue in tdsls0900m000 in DLL in ottstpstandard (mmt.startfirstsatallite)
[last function: change.object]
I'm a beginner in LN programming, so I don't know exactly what are the next steps I need to take to solve the problem.
If further clarification is needed I will be willing to explain it better.
I thank everyone who will help me!!!
Regards
mark_h
7th August 2019, 16:35
Can you include the code? That might help one of the ln experts.
RavCOder
7th August 2019, 16:41
Hi,
The fact that it doesn't let me access the script, so I can't send the code.
Maybe I was wrong to do something when I created the session. Should I delete the session I created and create it again using the specs I used before?
bdittmar
7th August 2019, 16:59
Hello,
mmt.startfirstsatallite
looks like a multi maintable session has been created ?
but: .............it doesn't let me access the script .................... WHY if it's your own script ?
Regards
RavCOder
7th August 2019, 17:02
I went to view the script but it doesn't open the script, the icon is disabled to see the script
andreas.toepper
8th August 2019, 07:54
Are you using the WebUI? Viewing and editing scripts will require Worktop or BECS if you don't use Eclipse.
RavCOder
8th August 2019, 09:59
Hi,
No I don't use WebUI because my manager teach me only use becs platform.
what could possibly be the problem?
Regards
bdittmar
8th August 2019, 11:08
Hello,
are you using ttadv2530m000 to view/edit your script ?
Is the script available at OS level in $BSE/.......
Regards
RavCOder
8th August 2019, 11:19
Yes I used now i created two distint sessions for read header and row for two tables,but it doesn't read sessions both.
I checked if there were script and I saw that there only declarations of tables.
Do I have to insert anything in these scripts to read the tables?
bdittmar
8th August 2019, 11:58
Hello,
what is your code so far ?
Your source can contain e.g. :
declaration section
program section
group section
field section
choice section
Maintable section
function section
a.s.o.
for example in declaration:
table tdhsls500 | Sales Employee Structure
table ttccom001 | Employees
extern domain tcnama supr.nama
extern domain tcnama emno.nama
domain tcemno curr.supr
Regards
RavCOder
8th August 2019, 12:08
I have only declaration section with only session's table and program section and group section empty.
In the declaration do I have to put the external domains I have in the table declared right?
bdittmar
8th August 2019, 12:22
I have only declaration section with only session's table and program section and group section empty.
In the declaration do I have to put the external domains I have in the table declared right?
for example:
you're using tdsls400, tdsls401, your.new.table
in declaration:
table ttdsls400
table ttdsls401
table tyour.new.table
so the session knows all fields and their domains
you have to declare all addional tables and variables you wanna use
e.g.
for select :
extern domain tcorno orno.f
extern domain tcorno orno.t
sales order number from - to
after declaring the variables, you have to built your program logig in the right sections
Regards
RavCOder
8th August 2019, 12:30
Ok after the declaration insert a simple query in the program section selecting the header fields right?
bdittmar
8th August 2019, 12:36
Hello,
sorry, but this is not a 4GL education forum.
4GL event sections
A 4GL script can contain one or more of the following types of sections:
program sections
4GL zoom.from sections
4GL form sections
4GL group sections
4GL choice sections
4GL field sections
4GL main table i/o sections
With the exception of program sections, each section consists of a main section and one or more subsections. A main section indicates the object for which the programmed actions must be executed. A subsection specifies when the actions must be executed. Program sections consist of a main section only.
If you do not include a main section immediately before a subsection, the subsection is assigned to the previous main section in the script. For example:
choice.print.data: | main section
before.choice: | subsection of print.data
...
...
after.choice: | subsection of print.data
...
...
The following rules apply to the ordering of sections within a script:
The declaration section (a program sections) must be the first section in the script.
The functions section (also a program section) must be the last section in the script.
Other sections can occur in any order, but the preferred order is: program sections, zoom.from sections, form sections, group sections, choice sections, field sections, main table sections.
Do not mix sections of different types. For example, do not define a choice section, followed by a field section, and then a choice section again.
Variables declared in the declaration section are global variables that you can use in all sections. Variables declared within any other section are local variables that you can use in that section only.
RavCOder
8th August 2019, 12:41
Hi,
excuse me if I disturb you, but unfortunately there is not enough material around and I am a beginner with the world Ln.
Anyway, thank you for giving me a tip on how to proceed.
mark_h
8th August 2019, 14:53
There is a technical manual http://www.baanboard.com/node/46 and a programmers manual http://www.baanboard.com/programmers_manual_baanerp attached to this forum. I recommend reading them, or even better would be to get some training. Next if the system has any source code in it I would go and look at that code to start seeing how they code.