hujiehujie
19th April 2008, 04:07
Hi All expert:
I met a problem in erp Ln 6.1 , I want to create a main session, and want to use the main.table.io function, but the main table is exist DAL, so that I can not use the main.table.io function, I want to deactivate DAL,so that I can use the main.table.io to do something, Who can tell me how to deactivate DAL in program script?
expecting your suggestion.
Thanks a lot
Regards
Hujie
U.R.Naga Kumar
19th April 2008, 07:28
Hi,
If u want to deactivate the DAL,goto GTM give the table info and press shift + * then u can activate and deactivate DAL.
Regards!!!
Naga Kumar
dharam.dv
21st April 2008, 07:48
Hello,
One thing i would like to suggest you that always try to use DAL for LN. In LN if you want to use any Database Operation so you must use DAL/DAL2. It is very good and easy to use. Once you learnt this functionalit, you will feel quite easy to work with LN.
Regards
Dharam
hujiehujie
21st April 2008, 10:44
Hi Dharam:
thanks your suggestion, I know the dal's function, because we don't the source code for tibom010 dal , so that I can not do something after save a record for tibom010, so that I have create the new session for maintenance the BOM, but because the tibom010 dal, I cannot do something after adding a record , so I want to know whether I can deactivate the DAL in my new program script.
Regards
Hujie
hujiehujie
21st April 2008, 10:46
hi Naga Kumar:
thanks your help, I know the GMT can deactivate tibom010 DAL, Is valid the set in my program script?
Regards
Hujie
dharam.dv
21st April 2008, 11:01
Hello,
May I know what kind of operation you want to perform in the talbe?? and Why DAL is not allowing these operation??? if you explain your exact problem so we can have look.
As concern over Deactivating DAL script from your program script. I dont think so Baan will allow it.
Regards
Dharam
hujiehujie
23rd April 2008, 11:08
Hi Dharam:
thank your reply. for baan4, when I create a new session , such as tibom0110mh01, and main table is tibom010, when user add a record or modify a record, I must update some other table, so in baan 4 , I write the following script:
main.table.io:
after.write:
|I will do something . such as update other table.
after.rewrite:
|I will do something . such as update other table.
for ERP LN: I want to do the same thing. but when I edit the following script:
main.table.io:
after.write:
|I will do something . such as update other table.
after.rewrite:
|I will do something . such as update other table.
the function can not run, and I use the debug, and the operation can not go into the main.table.io. I read the help manual, decrible The DAL will ingore the main.table.io.
so that I want to deactivation DAL in the program script, so the operation can go into main.table.io.
I read the DAL help manual , display after.save.object() will replace after.write and after.rewrite. but I don't know how to use the after.save.object() in my customization program .
Expecting your help!
Best Regards
Hujie
dharam.dv
23rd April 2008, 11:39
Hello,
Whenever DAL is present for table. You can not use main.table.io functions. then options are whether you need to write into DAL script or you can use section
after.db.commit.transaction()
here you can update any of the table. But update the table very carefully it can cause errors.
Regards
Dharam
hujiehujie
24th April 2008, 10:45
Hi Dharam:
thanks your reply, could you give me a sample for how to write the after.db.commit.transaction() in program script. beause the ERP LN help manual don't tell how to write.
Thanks again()
Regards
Hujie
dharam.dv
24th April 2008, 11:00
Hello,
you can use after.update.db.commit section for more details gone through with programmer's guide. here you can update any of the table by your programming script.
Regards
Dharam
hujiehujie
25th April 2008, 06:12
Hi Dharam:
I have know how to use the after.update.db.commit section from your help.thanks.
other a question maybe your help . IN BAAN4, I can know whether adding a record or modify a record in a maintenance session. the flag is :
if update.status=add.set then |this is insert a record.
if update.status=modify.set then | this is modify a record.
but for ERP LN. the update.status is invalid. I don't how to confirm the user operation is insert a record or modify a record.
expecting your reply.
Thanks a lot!
Best Regards
Hujie
dharam.dv
25th April 2008, 11:16
Hello,
Checking mode(like insert, update) we can check in DAL but after.db.commit.transaction section couldnt work for you. One thing that you can do i.e. you can declare a Flag as long variable and set value at the time of Insert and Update. you can set value at the time of choice.add.set and choice.modify.set and after.db.commit.transaction you can perform your task.
Regards
Dharam
dstegink
19th May 2008, 15:59
In Ln, to help with these types of customizations, a new feature has been added to Enterprise Server 8.4.1 called User Extensions. User extensions extend the DAL framework and provide an additional way to add code to newly defined actions that are around the insert, update and delete actions. In addition, your code is stored in a 'TABLENAMEue' (for example tcibd001ue) program script component code. Infor will never issue a ue component (although customization partners might), so your code is safe on updates. Check it out - again, does require a porting set and tools update to enterprise 8.4.1.