red1.org Forum Index red1.org
Nihili est - in vita priore ego imperator romanus fui
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Import Price Loader Format Setup - 10 pg pdf

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Reality Strikes
View previous topic :: View next topic  
Author Message
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Fri Aug 06, 2004 7:41 pm    Post subject: Import Price Loader Format Setup - 10 pg pdf Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
primer



Joined: 18 May 2005
Posts: 2

PostPosted: Wed May 18, 2005 1:05 am    Post subject: Import other files Reply with quote

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
View user's profile Send private message
red1
Site Admin


Joined: 06 Jul 2004
Posts: 1756
Location: Kuala Lumpur, Malaysia

PostPosted: Wed May 18, 2005 7:12 am    Post subject: Reply with quote

Hi Primer,
This is an Open Source Experience portal i m creating here Wink . 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. Laughing

cheers
red1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
primer



Joined: 18 May 2005
Posts: 2

PostPosted: Wed May 18, 2005 12:08 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
new_soft



Joined: 21 Dec 2004
Posts: 28
Location: TUNISIA

PostPosted: Wed May 18, 2005 4:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
trifon
Senior


Joined: 23 Dec 2004
Posts: 324
Location: Bulgaria, Sofia

PostPosted: Tue Jun 14, 2005 4:12 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    red1.org Forum Index -> Reality Strikes All times are GMT + 8 Hours
Page 1 of 1

 
Jump to:  
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