 |
red1.org Nihili est - in vita priore ego imperator romanus fui
|
| View previous topic :: View next topic |
| Author |
Message |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Fri Aug 06, 2004 7:41 pm Post subject: Import Price Loader Format Setup - 10 pg pdf |
|
|
| Here please find a 10 page PDF document describing howto create and setup a new format loader. This Import Price example was done in the midst of implementing Compiere as described in the Workshop Case Study. Download it from http://compiere.red1.org/ImportPriceSetup.zip |
|
| Back to top |
|
 |
primer
Joined: 18 May 2005 Posts: 2
|
Posted: Wed May 18, 2005 1:05 am Post subject: Import other files |
|
|
I tried your Import Price Loader and wow, it's easy to follow. I then tried to create my own Import for Bill of Material, but I had an error at the final step of bringing it from I_BOM into the BOM table.
According to my friend, it was due to using an UPDATE command instead of INSERT command... (?) Any ideas?
thanks |
|
| Back to top |
|
 |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Wed May 18, 2005 7:12 am Post subject: |
|
|
Hi Primer,
This is an Open Source Experience portal i m creating here . So u would have to paste the codes and relevant parts here so that ppl can see what is happening.
Thanks for joining and making IT happen.
cheers
red1 |
|
| Back to top |
|
 |
primer
Joined: 18 May 2005 Posts: 2
|
Posted: Wed May 18, 2005 12:08 pm Post subject: |
|
|
Hi Red1,
Sorry about it! This is the code I am doing to import the BOM into M_Product_BOM. I have completed all the previous steps and already import into the table ImportBOM. This is the last step on how to get it into M_PRODUCT_BOM. Below is the script.
Insert into M_PRODUCT_BOM (AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, LINE, M_PRODUCT_ID, M_PRODUCTBOM_ID, BOMQTY, DESCRIPTION, BOMTYPE)
select AD_CLIENT_ID,AD_ORG_ID,'Y',UPDATED,CREATEDBY,UPDATED,UPDATEDBY,LINE,'','',QTY,' ',BOMTYPE from ImportBOM
After running this script, there is an error message that "cannot insert null value into M_PRODUCT_BOM_ID. I realised that this ID is auto generated. In this case, how do I insert new records into the M_Product_BOM table? Same case for the import of price, as the coding you gave was to update rather than insert.
Thanks! Appreciate your help! |
|
| Back to top |
|
 |
new_soft
Joined: 21 Dec 2004 Posts: 28 Location: TUNISIA
|
Posted: Wed May 18, 2005 4:36 pm Post subject: |
|
|
Hi Red1,
It seems that the archive is not a valid one, i have the error when i try to unzip it with winrar or winzip. _________________ Best Regards,
Khaled Najeh. |
|
| Back to top |
|
 |
trifon Senior
Joined: 23 Dec 2004 Posts: 324 Location: Bulgaria, Sofia
|
Posted: Tue Jun 14, 2005 4:12 am Post subject: |
|
|
| primer wrote: |
Insert into M_PRODUCT_BOM (AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, LINE, M_PRODUCT_ID, M_PRODUCTBOM_ID, BOMQTY, DESCRIPTION, BOMTYPE)
select AD_CLIENT_ID,AD_ORG_ID,'Y',UPDATED,CREATEDBY,UPDATED,UPDATEDBY,LINE,'','',QTY,' ',BOMTYPE from ImportBOM
|
Hi,
You must modify insert statement to look like this:
insert into M_PRODUCT_BOM (AD_Sequence_NextNo('M_PRODUCT_BOM'), ...
AD_Sequence_NextNo('M_PRODUCT_BOM') will generate unique primary key for table M_PRODUCT_BOM.
Regards,
Trifon _________________ Trifon Trifonov |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|