Options

Help Requied in customizing Boms(801) Report

mkpjsrmkpjsr Member Posts: 587
Hi experts,

I want to customize the Boms (Id 801) report, As we know this report displays the BOM components of the selected Item having Bill of materials.

Suppose i want show Bill of materials of more than one item then it shows Items and their bill of materials one by one.
In my case there are some finished good item that shares their component with other finished good item.
So, i want to show the common item only once but it should show the Quantity Per for both.

For ex:

Suppose I have two finished good items FG1 and FG2, and both has bill of materials

FG1 comprise of say,
Componet Required Quantity Per
===============================
Component1
> 1
Component2
> 2
Component3
> 2
Component4
> 1

and, FG2 Comprise of
Component1
> 1
Component2
> 1
Component5
> 1
Component6
> 1

here Component1 and Component2 are common in both finished goods,
so the BOMs report should look like this,

Item Filter : FG1|FG2


Component Qty Required
================================
Component1
> 2
Component2
> 3
Component3
> 2
Component4
> 1
Component5
> 1
Component6
> 1

Can anybody guide me on this

Comments

  • Options
    mkpjsrmkpjsr Member Posts: 587
    any help!!!!!!!!!!!!!!
  • Options
    FDickschatFDickschat Member Posts: 380
    Take a look at the property TEMPORARY of a table variable.
    Frank Dickschat
    FD Consulting
  • Options
    mkpjsrmkpjsr Member Posts: 587
    FDickschat wrote:
    Take a look at the property TEMPORARY of a table variable.

    thanx for the reply, but how it is going to help me, can u plz guide me.
  • Options
    FDickschatFDickschat Member Posts: 380
    Have you looked in the CSIDE Ref Guide or in the ADG? There is an entry for C/SIDE Temporary Tables.

    Take a look in Report 24. It uses TempTables exactly they way you need them.
    Frank Dickschat
    FD Consulting
  • Options
    mkpjsrmkpjsr Member Posts: 587
    FDickschat wrote:
    Have you looked in the CSIDE Ref Guide or in the ADG? There is an entry for C/SIDE Temporary Tables.

    Take a look in Report 24. It uses TempTables exactly they way you need them.


    Yes, I have gone through the guide but i am not able to relate it with my problem, can u plz guide me.
  • Options
    FDickschatFDickschat Member Posts: 380
    Report 24 requires rather basic programming knowledge. If you don't understand how report 24 relates to your problem I suggest you take a programming course and/or ask your senior.

    I don't want to be offensive but this forum is not a helpdesk.
    Frank Dickschat
    FD Consulting
  • Options
    mkpjsrmkpjsr Member Posts: 587
    FDickschat wrote:
    Report 24 requires rather basic programming knowledge. If you don't understand how report 24 relates to your problem I suggest you take a programming course and/or ask your senior.

    I don't want to be offensive but this forum is not a helpdesk.

    ok, thanx for ur suggestion , actually i am a .net developer and new to navision. i have already gone for a technical training of C/SIDE but it was not helpful to me because in the training i was taught only the basic things, i am going through the PDFs.

    I have seen people asking such questions in this forum, so i did and also i know its not a helpdesk.........
  • Options
    robinho81robinho81 Member Posts: 48
    You could fill an array and display the array by using an integer data-item. Use the search function to find some related topics, or google on the subject.
  • Options
    FDickschatFDickschat Member Posts: 380
    robinho81 wrote:
    You could fill an array and display the array by using an integer data-item. Use the search function to find some related topics, or google on the subject.
    Yes, you could do that. But doing it like in report 24 with a temporary table is much more efficient and much faster to code.
    I have seen people asking such questions in this forum, so i did and also i know its not a helpdesk.........
    Good =D> . In Report 24 look how the temporary tables are used. At the end an integer Element is used to print the temporary records.
    Frank Dickschat
    FD Consulting
  • Options
    mkpjsrmkpjsr Member Posts: 587
    I have tried with following code but nothing get displayed:

    TempBom-> A Temp table i have created for storing data temporarly
    BomComp->Record->BOM Component
    Integer - OnPreDataItem()
          TempBom.DELETEALL;
    
     Integer - OnAfterGetRecord()  
          
            BomComp.SETRANGE(BomComp."Parent Item No.",BomComp."Parent Item No.");
            FOR i:=1 TO  BomComp.COUNT  DO BEGIN
           TempBom.INIT;
           TempBom."Entry No.":=i;
           TempBom."Parent Item No.":="BOM Component"."Parent Item No.";
           TempBom."Item No.":="BOM Component"."No.";
           TempBom.Description:="BOM Component".Description;
           TempBom."Quantity Per":="BOM Component"."Quantity per";
            i:=i+1;
            TempBom.INSERT;
    
           END;
    
          TempBom.RESET;
          SETRANGE(Number,1,TempBom.COUNT);
    
    When i am running the report, i am getting the error message that TempBom already contain entry no: 1, but if i am opening the table to see there is nothing,
    can anybody guide me
  • Options
    FDickschatFDickschat Member Posts: 380
    The Integer DataItem is only used to print the previously filled TempTable. You can copy and paste that DataItem from R24 into R801 after the BOMComp, and adapt the name of the temptable. In the Integer DataItem leave only this code in:
    On Pre
    SETRANGE(Number,1,TempBomComp.count);
    
    OnAfterGet
    IF Number = 1 THEN
      TempBomComp.FIND('-')
    ELSE
      TempBomComp.NEXT;
    

    Then in R801: Change the BOMComp DataItem to not print something but alternatively fill the temp table. Use T90 as the TempTable. Sum up the qty. Think about the Line No. I don't know which table you used as the temp table in your code example but it seems not to be T90 as T90 does not contain a field Entry No.

    Search the forum for temporary tables and you will find lots of more advice how to do this. Start by understanding R24 (from your code I can see you have not understood how it works at all). To understand R24 only look at DataItem 1 + 2.
    Frank Dickschat
    FD Consulting
Sign In or Register to comment.