Amit_Jain
28th November 2011, 16:21
Hi All

I am trying to write AFS on "Export Data Dictionary", The AFS opens the session in API mode, The stpapi.form.command("ttiex1280m000", 5,"exec.cont.process", err.msg) returns message for directory being created. but no dump is created.
I am not able to figure out the right reason. Can sombody help me?

The basic code that I have tried is as under:

stpapi.put.field( "ttiex1280m000", "cpac", "hr")
stpapi.put.field( "ttiex1280m000", "vers", D_VERS )
stpapi.put.field( "ttiex1280m000", "rele", D_RELE )
stpapi.put.field( "ttiex1280m000", "cust", D_CUST )

stpapi.put.field( "ttiex1280m000", "c.update", "1" )
stpapi.put.field( "ttiex1280m000", "vers.f", "B50U" )
stpapi.put.field( "ttiex1280m000", "rele.f", "c" )
stpapi.put.field( "ttiex1280m000", "cust.f", "stnd" )

stpapi.put.field( "ttiex1280m000", "clan", "2", 1 )
stpapi.put.field( "ttiex1280m000", "clan", "3", 2 )
stpapi.put.field( "ttiex1280m000", "clan", "H", 3 )
stpapi.put.field( "ttiex1280m000", "clan", "h", 4 )
stpapi.put.field( "ttiex1280m000", "clan", "m", 5 )
stpapi.put.field( "ttiex1280m000", "clan", "t", 6 )
stpapi.put.field( "ttiex1280m000", "clan", "s", 7 )
stpapi.put.field( "ttiex1280m000", "dump.comp", "1" )
stpapi.put.field( "ttiex1280m000", "only.pack.yn", "1" )
stpapi.put.field( "ttiex1280m000", "error.report", "2")
stpapi.put.field( "ttiex1280m000", "path", trim$(path.f))
stpapi.form.command("ttiex1280m000", 5,"exec.cont.process", err.msg)
stpapi.enum.answer("ttiex1280m000", "ttadvq1151",tcyesno.yes)
stpapi.enum.answer("ttiex1280m000", "ttiex12801",tcyesno.yes)
stpapi.end.session( "ttiex1280m000", err.msg)

darkbook4008
28th November 2011, 19:53
I have the same problem

http://www.baanboard.com/baanboard/showthread.php?t=61535

mark_h
29th November 2011, 15:00
Answer the questions before the continue. So this:

stpapi.form.command("ttiex1280m000", 5,"exec.cont.process", err.msg)
stpapi.enum.answer("ttiex1280m000", "ttadvq1151",tcyesno.yes)
stpapi.enum.answer("ttiex1280m000", "ttiex12801",tcyesno.yes)

should be

stpapi.enum.answer("ttiex1280m000", "ttadvq1151",tcyesno.yes)
stpapi.enum.answer("ttiex1280m000", "ttiex12801",tcyesno.yes)
stpapi.form.command("ttiex1280m000", 5,"exec.cont.process", err.msg)

mark_h
29th November 2011, 16:59
See the linked thread for code that worked for me in 4c4.

Amit_Jain
1st December 2011, 17:25
Hi Mark / Darkbook

I tried it in Baan V Environment, according to mark's suggestions. It didn't work for me. AFS seems not working at all. The debugger doesn't even pauses for a moment, no report, nothing which can suggest AFS is working.

I tried AFS on other tools(tt) session(ttadv6200m000) used for copying components from one language to another, but faced the same problem.

Someone suggested me some time back that AFS won't work on session from tools module(in Baan V). I have started to believe him

However, Thanks mark for your efforts, Darkbook we will have to wait/keep trying till Mark moves to a company with Baan V :).

mark_h
1st December 2011, 21:33
I have never heard that AFS would not work for tools sessions on Baan V. I will have to keep that in mind. And I do not think they will make an A&D version of Baan V or LN. :)

Amit_Jain
28th December 2011, 07:17
Hi Mark/Darkbook

I have worked out some crude solution to my requirement. I populate the field values that I need, as default values for this session by my code and run this session manually. In this way all I need is to start session and click on 'Export' button.
I feel this is the only solution since the AFS is not working on this particular session.

Mark: You are right AFS does work on other tools sessions, I feel this particular session workout some piece of code(which triggers choice.again) which is picked up when the session is started through AFS.