BOM Upload Error


I have ERPNext: v4.24.4 and also I have downloaded the virtual image of Version 5.
Now what I am doing is, I am trying to download the data from ERPNext: v4.24.4 and upload the same into version 5.

While uploading BOM I am facing problem. I am receiving a message as shown below:

Error for row (#85) BOM/820-000124/001 : Raw Materials cannot be blank.

The above message is coming for each and every row.

You have to add the BOM tables with the child tables (thats how you should export it too)

Hi rmehta,

I am doing it in the same way you are telling.

We are doing this the same way and get the same error. All child tables are imported with data.
The field “Raw Materials” does not exist on BOM whatsoever - nor visible or hidden.
We are trying to import into erpnext v6.4.7 now.

Where this error is comming from?
Please help.

@Evaldas_Pabreza Try exporting a BOM to see the structure and try to re-import using the same structure.

Let us know if this does not work again.

I did the following:

  1. Exported the data from ERPnext v4

  2. Exported template from ERPnext v6

  3. Manually copied columns of data from v4 file to v6 template

  4. Tried importing into ERP v6 - got this error.

  5. Then tried to enter one BOM manually into the erpnext v6

  6. Exported the template again, including this single BOM entry data

  7. Then copied columns one more time manually an checked - everything was matching and visually there vere no differences between the first entry (we I entered manually) and the rest (copied from the v4 file).

  8. Now the first row imports correctly, the rest does not import at all and gives the same error.

Also I tried deleting IDs in child tables, without success.

This error in data is impossible to detect visually…
Please help. I have 1500 BOMs - would not like to enter everything manually.

I have also faced the same problem while importing, try to put all child records first and then parent BOM or do it in a bunch like for example you have a BOM which is like

then in that case put the record of D then in the next row put C and then B and then A.
Try it, it worked for me, however it needs time to do the same.

@Evaldas_Pabreza @ruchin78 I was able to import a new BOM successfully

@rmehta this the case where you have multiple level of BOM.
I am 200% that the BOM you downloaded from the current version cannot be uploaded as it is to the same version without any changes.

Ruchin Sharma

I agree.
To me it seems that when importing old BOMs to a new system, there must be at least one “BOM item” ‘ID’ and ‘BOM Explosion Item’ ‘ID’, which is valid and recognized in the new system.
In other words, if you delete all IDs from the child tables, ERPnext V6 is not able to create these IDs automatically. And there must be an ID pre-entered for at least the first item in the BOM.

Also I noticed that in ERPnext V4 the BOM explosion Items ID is a code, which starts with “FBD/…”, whereas in V6 the ID is a random 10 symbol code. Can this be the main difference?

rmehta, please confirm. Thanks!

@Evaldas_Pabreza ID is a hash, its much cheaper to create random strings than maintain a series (which wastes a few db queries)

Glad we narrowed down the problem to importing old BOMs, Not sure you require one valid row. I am getting out now, but will check later and post.

It seems I found it myself.
In the ERPnext v4 export child tables gave item codes like ‘bom_materials’ and ‘flat_bom_details’, whereas in the V6 the same child tables have names like ‘items’ and ‘exploded_items’.

Since I changed it, things started to move. I think this topic is closed now.