Urg help-SetUp InterCompany or Virtual Company

Hello All, Greetings! I have two companies CompA and CompB both running Axapta3.0. These 2 companies located in different regions in the same country. Now, the problem is that my purchase manager wants to view the stock on hand of CompA sitting in CompB and vice-versa. Regarding setup, these 2 companies are using separate database servers (runs on SQL Server 2000). I have gone through some forums and articles in Technet regarding intercompany and virtual accounts. To my knowledge, i think virtual companies are used for sharing master data like inventtable,inventtablemodule,inventitemlocation,inventdim etc. and not for transaction table sharing. And on other hand, intercompany is like having business or trade between 2 subsidary companies. Right now, i’m little confused as to which approach will solve my particular scenario about viewing inventory on hand. Also, I think pre-requisites for intercompany/virtual company is a common database on one server but in my situation it is 2 databases on 2 servers. Can anyone please guide me about how to go about this? Thanks in advance for your help. Warm Regards, Dilip

Hi 1. You are right concerning intercompany and virtual companies: you need to have it in the same SQL database, so nothing for your setup. 2. The intercompany license allows to see the onhand qty of the other companies. There is an “intercompany” button in the Onhand Qty Form that does that. 3. For your setup, the only way I could think of is that you make a form which will be filled by direct SQL queries. But of course then you loose all Axapta-related features like security etc… BR Helmut

Dear Helmut, Thanks for your response. At the moment, i was just curious to see how virtual company works so tried setting up the following in my test environment i.e. Axapta Application and database on the same server. Here are the steps: Here are the steps: a. Created 1 virual company which is mapped to existing companies i.e. CompA and CompB. b. Created a new table collection and mapped tables inventtable, inventtablemodule and inventtablelocation. c. Mapped table collections to the virtual company. But now when i click on items form, i cant see any data… I have seen in the technet forums about data import and export so also i tried to export the tables to .xpo files and then re-importing .xpo after step b. but still no success :frowning: can you please help me where i’m going wrong in my steps? thanks for the immediate response…waiting for your advice warm regards, Dilip

Hi, I got Virtual Company working. Actually, I was not doing the export/import using Data Definitions file. Once I did the export before creating table coll through DDF, and then re-imported the .dat file, everything work smooth. Thanks and Best regards, Dilip

Hey Guys , I created a workaround for my problem of viewing inventory on hand in multi-databases of 2 companies in the following manner: a. Created a view in Axapta - datasource set to InventSum b. Created a linked server in SQL which connects to my other company’s database server. c. Modified the view in SQL by changing the from clause in select statement i.e. ...inventsum , dataareaid field i kept it as the same of first company (dataareaid is the key here) i sort of tricked Axapta :wink: and it works for me. now remaining in one company i can see inventory on hand of my other company as well without using virtual or intercompany solution :slight_smile: … only thing is the performance factor little delay bcoz of the bandwidth… Thanks and Regards, Dilip

Hi Dilip Same question as in Technet :sunglasses: What will happen after you synchronize Axapta? Will the view be re-created in SQL?

Nope it doesn’t… In case of tables you are right, it does but not in case of views…Whatever i override thru SQL it remains as it is…This technique gives me perfect encapsulation, what I have done is created one more SQL Server view and have overridden the definition of Axapta view(i.e. call the SQL view from Axapta view)

Hi Helmut, I tried synchronizing the view in SP3 and you are right, it does override the view definition in SQL…Earlier when I was using was a demo version, i was not facing this situation… But again, I beat Axapta :wink: … First, I tried creating an instead of trigger in SQL on the view thinking that my trigger would fire whenever Axapta tries to change the definition of view. But i was wrong… As i observed in sysobjects table, I found that whenever I did a synchronize on the view, the object ID of the view was taking a new number…then i came to the conclusion that actually Axapta drops the view and creates a new one in SQL… I searched on the net, to find how to enable triggers on DDL statements, but in case of SQL Server - this feature is only available in ver 2005. Then I struck upon an idea, what I did is modified the sysobjects table for that particular view record and set the replinfo (its field for replication) status as 1…By this setting, I tricked Axapta to make it believe that the view is configured for replication and you cannot issue a DROP command over the view…Now, when I say synchronize on view, it gives me an error saying that “Object already created.” But, i achieved my purpose :wink: … Regards, Dilip

Never give up! (But somehow I’m “glad” to see that my initial thinking was correct)