sharma
8th August 2006, 09:54
Hi friends.
I am tryig to use session tfgld1101m000 and tfcmg2100s000 as subsession through afs , but while I am trying it for single company and transaction categary as customer transaction it is working fine ,but is not working for multi-company, it shows error message Invoice could not found.
I check the manualy entry for subsession tfcmg2100s000 without afs. while I tabed the field transaction category cursor jumps to transaction type and pick the company as a current company. I have to go to the previous field tfcmg204.comp and have to change the comapany no as required. I think here is the problem through afs while geting transaction category as customer transaction cursor jumps to the field transaction type and take company no as current company .It is not taking according to the sequence written in the script as
stpapi.put.field("tfcmg2100s000",tfcmg204.tran,"........")
stpapi.put.field("tfcmg2100s000",tfcmg204.comp,"........")
stpapi.put.field("tfcmg2100s000",tfcmg204.tinv,"........")
stpapi.put.field("tfcmg2100s000",tfcmg204.ninv,"........")
How can I handle the situation , Please guide.
thanks
mark_h
8th August 2006, 16:15
Possible solutions
(1) Can you change company before even calling the sessions? Not sure about this, but just a thought.
(2) Contact Baan and see if they have a solution.
(3) Modify session source code if you own source.
(4) Use source extender code (Qkey, RMCis, ~Vamsi solution) to code around this problem. Not always easy or possible but I have use Qkey in the past to get past problems like this.
sharma
23rd August 2006, 14:39
Sir,
1 . I had tried acording to the first option , it is not worj\king
2. There is no option at Baan Support
3. I have no source code .
4. I am not understanding ur 4th option.
Please let me Know can I use stpapi.handle.subprogram with option add and imidiatley stapapi.handle.subprogram with modify option.Can u post some example for this
Thanks
mark_h
23rd August 2006, 15:29
On the first option does it still use the company you originally launched the session in? You might want to search this forum switch company. I seem to remember a few posts on this.
The fourth option allows you to add code to the standard session. So for example in the tfcmg2100s000 session you could probably add some code to import the company number and skip input on this field. Note I am note positive this will work, but I think it should. We have used this option with api.mode to set variables and to get sessions to do what we want.
sharma
24th August 2006, 08:06
Sir,
I am not searching for switch.to.company option. Actualy In the session while user make a tab on customer transction field it automaticaly take company no as default company and skip to the next field transaction type & invoice no , and make search for the same invoice in the ginven company no. It works for perfectly for single company , But while in multicomapny user manualy go to previous filed cistomer transaction and make tab this time cursor go to the field company no and user change the company no according to the requirement. But through AFS is it posible to move to the previous field or how can I handle modify.set .
Thanks
mark_h
24th August 2006, 15:52
Yes - I was just curious if a switch.to.company work work before running each transaction. I could see where this might not work in some set-ups. This is where option 4 would come into play - I would use qkey to either allow the session to accept input for the company number or I would export/import to pull the company number in. My suspicion is there is something on one of the fields that either resets company number or prevents input into it. Sorry I am not much help. Other than contacting Baan support about the problem and asking for the latest solution for this session I can not think of anything else to try.
sharma
26th August 2006, 13:14
Can anyone tell me how to move on the previous entered field .
mark_h
28th August 2006, 16:22
Not sure what you are asking - in AFS code you can only put your fields, execute update/save/continue and hope for the best. Not all of Baans sessions are AFS compliant. It would not hurt to check with this one this.
subbulu
14th September 2006, 17:46
First time I believe, you will be doing an insert. At that time if you get the error that the invoice is not found try to put the company code again as
stpapi.put.field("tfcmg2100s000",tfcmg204.comp,"........")
and then try to do an update. It may work.
Another option:
First time do an insert with the category as "advance". and then change the company code, category and invoice numbers and do an update.
I had a similar problem while maintaining the Sales orders. First time it was taking the customer currency, irrespective of the currency that I am supplying at run time. So I did an insert and then updated the same order with the correct currency.
best of luck
sharma
19th September 2006, 10:52
Thanks for ur reply.
The matter is solved by correcting the session through BaaN Support SSA.
thanks