Import Price Loader Format Setup - 10 pg pdf

It is here where business functions and pains hits you in the face. Do we extend and weave requirements into Compiere? Or do we just tweak hardly a code with smart thinking and a full grasp of Compierology? You’ll see lots of both in making your business grow.

Import Price Loader Format Setup - 10 pg pdf

Postby red1 » Fri Aug 06, 2004 7:41 pm

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
red1
Site Admin
 
Posts: 2415
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Import other files

Postby primer » Wed May 18, 2005 1:05 am

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
primer
 
Posts: 2
Joined: Wed May 18, 2005 12:57 am

Postby red1 » Wed May 18, 2005 7:12 am

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. :lol:

cheers
red1
red1
Site Admin
 
Posts: 2415
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby primer » Wed May 18, 2005 12:08 pm

Hi Red1,

Sorry about it! :wink: 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!
primer
 
Posts: 2
Joined: Wed May 18, 2005 12:57 am

Postby new_soft » Wed May 18, 2005 4:36 pm

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.
new_soft
 
Posts: 28
Joined: Tue Dec 21, 2004 9:29 pm
Location: TUNISIA

Postby trifon » Tue Jun 14, 2005 4:12 am

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
trifon
Senior
 
Posts: 324
Joined: Thu Dec 23, 2004 11:20 pm
Location: Bulgaria, Sofia


Return to Reality Strikes

Who is online

Users browsing this forum: No registered users and 1 guest

cron