Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
bqlikschmidt
New Contributor

Bill of Material - Generate multi-level from single level

Hello everyone - I have been able to have the raw BOM tables downloaded into qvds from SAP and have been able to link them to construct single-level bills.  Now what I need is multi-level bills from those single-level bills.   I have read a number of posts but they seem to be constructed from an existing multi-level bill (typically from a spreadsheet).   If this is posted somewhere I apologize for either not finding it or not recognizing it.  Any suggestions/solutions are welcomed!

My current file looks something like:

Material   Component    Qty per parent

_______  __________    _____________

Table        Leg                      4.000

Table        Top                      1.000

Table        Drawer                 3.00

Leg           Wood Post           1.000

Leg           Metal Foot            1.000

Top           Wood                    4.560

Drawer      Frame                   1.000

Drawer      Handle                  1.000

Frame       Side                       2.000

Frame       End                        2.000

Frame       Bottom                   1.000

I have tried Hierarchy and some examples but I guess I don't understand enough to quite get there.   I have thought of some combination of Hierarchy and Semantic Link but I hit a wall.   HELP!!!

Thanks in advance

Bob Schmidt

5 Replies
MVP
MVP

Re: Bill of Material - Generate multi-level from single level

What is your expected result?

bqlikschmidt
New Contributor

Re: Bill of Material - Generate multi-level from single level

Something like (but am open to suggestions):

Material   Level   L-1 Comp      L-1 Qty   L-2 Comp       L-2 Qty    L-3 Comp     L-3 Qty   L-4 Comp    L-4 Qty.......

______    ____   ________      ______   _________     ______    ________    ______   ________    ______

Table          1      Leg                 4.000

Table          2                                            Wood Post     1.000

Table          2                                             Metal Foot     1.000

Table          1      Top                 1.000                           

Table          2                                              Wood            4.560

Table          1       Drawer           3.000

Table          2                                               Frame          1.000

Table          3                                                                                     Side            2.000

Table          4                                                                                                                      S-Wood       2.533

Table          3                                                                                      End            2.000

Table          4                                                                                                                       E-Wood       2.688

Table          3                                                                                      Bottom       1.000

Table          4                                                                                                                        B-Wood      4.605

Table          2                                               Handle          1.000

Perhaps I really need to be something like:

Table          -       Leg                  4.000      Wood Post      1.000

Table          -       Leg                  4.000      Metal Foot       1.000

Table          -       Top                  1.000      Wood               4.560

Table          -       Drawer             3.000      Frame              1.000      Side              2.000    S-Wood       2.533

Table          -       Drawer             3.000      Frame              1.000      End               2.000    E-Wood       2.688   

Table          -       Drawer             3.000      Frame              1.000      Handle             1.000  

As you can see, I am not sure of the best structure to use to "explode" BOMs.

bqlikschmidt
New Contributor

Re: Bill of Material - Generate multi-level from single level

On further examination an extended single level bill might be the real need:

Material    Comp           Ext Qty

_______   ________    ______

Table        Leg              4.000

Table        Wood Post   4.000

Table        Metal Foot    4.000

Table        Top               1.000

Table        Wood            4.560

Table        Drawer          3.000

Table        Frame           3.000

Table        Side              6.000

Table        S-Wood        5.066

etc.              

MVP
MVP

Re: Bill of Material - Generate multi-level from single level

I guess you already looked into

Bill of Materials

?

bqlikschmidt
New Contributor

Re: Bill of Material - Generate multi-level from single level

I have - I feel that the answer is in there somewhere but using this code I end up with some that only go down so far in the tree.  I think this may only work if the source data is in the proper sequence and structured line-for-line.  I feel this is close.

Thanks for your help.

Community Browser