newlnuser
16th June 2010, 16:38
Hi,
I am trying to call the session tipcf5120m000 using AFS. I am setting the key value(Product Variant) and try to call using form.command function, but the session is not getting displayed.Please let me know, where i am making mistake.

Code:

stpapi.put.field("tipcf5501m000","tipcf500.cpva","21")
fnd = stpapi.find("tipcf5501m000")
if fnd = 1 then
stpapi.get.field("tipcf5501m000","tipcf500.cpva",cp.val)
stpapi.get.field("tipcf5501m000","tipcf500.dsca",var.desc)
stpapi.get.field("tipcf5501m000","tipcf500.item",item.val)
ret = stpapi.mark("tipcf5501m000", error.msg)
if ret then
stpapi.form.command( "tipcf5501m000", 5, "start.product.config", error )
endif
endif
stpapi.end.session("tipcf5501m000")


Thanks in Advance,

steveauckly
16th June 2010, 17:55
You've picked one of the toughest sessions to try to use AFS. I'd be interested if anyone has done this successfully. Good luck!

iiparrag
17th June 2010, 17:52
This sesion will give you problems.
I tried doing the same:
http://www.baanboard.com/baanboard/showthread.php?t=58455

But after debugging and so on, I realised that it's code inserts into a loop that was imposible to come out from (it uses "graphical.mode" predefined variable and if you call with AFS it will always be false), so I decided creating registers of tipfc500 table and variant thorugh program. I didn't touch the code of tipcf2150 but you could try cehcking the value of that variable in some other way.

Let us know about your results.

p.cole
24th June 2010, 08:46
You don't need to automate tipcf5120m000. Fill the product variant tables directly, tipcf520, tipcf500, tipcf510 (as EDI does). Then use session "Validate Variants" (tipcf5200m000) to validate the variant options. Now one of the "Generate Product Variant Structure ..." sessions _can_ be automated via AFS.

newlnuser
25th June 2010, 12:26
Hi all,
Thanks for the suggestions and the help provided.

Since, the session is required, i tried replicating that session by creating it as main session. i used tipcf520 as main table and passed the product variant number while opening the session and it works fine.
But the option set(tipcf520.copt) is not displaying in drop down list.

How to make the drop down to show with values, when the zoom for that item is used.

Thanks in Advance.

newlnuser
29th June 2010, 09:04
hi ,
I searched for the listbox in baanboard and i got many information from baanboard. Now the listbox is working fine.


I want to personally thank all the baanboard members for the information's provided.

Regards,