Query for BOM child items

Dear Friends,
This following query,if I will attach it at PO in Item Code with formatted search  , I get result as BOM child items as per project code, here project code is similar to item code.
But my limitation is that my  item code is more than 8 character ,under accounting TAB BP project  ,project I can define it up to 8 character only.
My requirement is that if I will put project name (which is 30 characteristic) as like as item code , shall I get child item list.
If yes , suggest necessary changes in above query.
Query :
WITH RECUR ( CODE) AS
SELECT ITT1.CODE FROM  ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father WHERE ITT1.Father=$[$157.1.1]
UNION ALL
SELECT ITT1.CODE
FROM ITT1  INNER JOIN  OITT ON OITT.Code=ITT1.Father
INNER JOIN RECUR ON   RECUR.CODE    =ITT1.Father
SELECT CODE FROM RECUR inner join OITM on OITM.ItemCode=RECUR.CODE --and OITM.PlaningSys='M' and OITM.PrcrmntMtd='B'
Thanxs & regards
Mahesh.

Dear Mahesh,
I am not sure about your aim.
You would like to put a formatted search in the project code field of the sales order in order to get the children of the itemcode of that line in the document. The child codes will become the name of the project.
Your issue is the following:
As the project code field in the sales order (field called: rdr1, project) is long 8 characters only and the sum of the children codes will be too long for this field.
Am I correct?
If I am not correct, can you please tell me step by step what you are trying to do?
Thank you.
Marcella Rivi
SAP Business One Forums Team

Similar Messages

  • Query for BOM

    Hi All,
    I need a query which displays for an spicific BOM child item
    all its parent items in the hierarchical structure
    For example: the Table ITT1 consists of following rows
    child_item  parent_item
    I1             P1
    I1             P2
    P1            P3
    P2            P4
    I1              P5
    the query I need should display
    child_item  parent_item1  parent_item2
    I1              P1                 P3
    I1              P2                 P4
    I1              P5

    Hi All,
    thank you for the quick answers, but I have already found the solution, how to display for an spisific item all it's parent items in all assembly levels.
    It can be done with recursive function calls:
    CREATE FUNCTION dbo.GetParentItems(@ChildItem nvarchar(20))
    RETURNS @retParentItems TABLE(ChildItem nvarchar(20), ParentItem nvarchar(20))
    AS 
    BEGIN
         DECLARE  @Item nvarchar(20), @ParentItem nvarchar(20)
         DECLARE RetrieveParentItems CURSOR STATIC LOCAL FOR
         SELECT Code, Father FROM ITT1 WHERE Code=@ChildItem
         OPEN RetrieveParentItems
         FETCH NEXT FROM RetrieveParentItems
         INTO @Item, @ParentItem
         WHILE (@@FETCH_STATUS = 0)
         BEGIN
              INSERT INTO @retParentItems
              SELECT * FROM dbo.GetParentItems(@ParentItem)
              INSERT INTO @retParentItems
              VALUES(@Item,@ParentItem)     
         --     set @Level = @Level + 1     
              FETCH NEXT FROM RetrieveParentItems
              INTO @Item, @ParentItem
         END
         CLOSE RetrieveParentItems
         DEALLOCATE RetrieveParentItems
         RETURN
    END
    GO

  • Query for BOM Stock

    Hi Experts,
    I need a report in which i hit BOM Code and it returns BOM + Child Item Inventory Status.
    i.e.
    BOM Code = ABC
    Child Code = A, B, C
    When I select ABC in selection criteria then I can able to see BOM Code(ABC) + Child codes(A, B, C) inventory status.
    Any help will be appreciated.
    Regards,
    Ravi

    Hi Ravi,
    try this:
    Declare @Item As Nvarchar(20)
    Set @Item = (Select MAX(Code) from OITT I0 Where I0.Code = '[%0]')
    Select
    T1.Father as [Parent Code],
    (Select MAX(ItemName) from OITM Where ItemCode=T1.Father ) [Parent Name],
    T1.Code Child,
    (Select MAX(ItemName) from OITM Where ItemCode=T1.Code ) [Child Name],
    (Select Sum(onHand) from OITM Where ItemCode=T1.Code) [OnHand Qty]
    from ITT1 T1, OITT T0
    Where
    T0.Code = T1.Father and
    T0.Code=@Item For Browse
    Thanks,
    Neetu

  • BOM Child Item Qty

    Hi Experts,
    In BOM Child Item Quantity i need to exceed decimal points over 3 decimals.
    i.e. currently when i put weight for child item  as 0.115 gms it will return in 0.12 gms.
    and its making atleast 10-15 % variation in Qty.
    Plz suggest for same.
    awaiting for your kind reply.
    Regards,
    Ravi

    Hi Ravi.....
    Go to Administration> System Initialization> General Settings> Display Tab> Decimal Places for Quantity....
    Be sure that its Decimal digits should be upto 3 but once you do it, it wont be reversed....
    Regards,
    Rahul

  • How to create ABAP Query for vendor open items

    HI,
    My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.

    Hello,
    Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
    For Query you can use SQ01.
    USE BSID & BSAD for AR open/clear items...
    LFA1, LFB1 are vendor master data tables
    This is FYI
    Hope this helps.
    Rgds
    Rajendra

  • Condition type EDI1 is not populating in XKOMV for BOM Header Item

    Hi All,
    We have assgined EDI1 and EDI2 condition types in pricing procedure, and creating orderd through Idoc, and checking for customer expected price.
    EDI1 and EDI2 are correctly populating for standard items, but NOT for BOM header item.
    I checked in XKOMV and observed that EDI1 is not coming for BOM header item.
    Please advise what to do.
    Regards

    Hi,
    In case your pricing procedure is similar to standard SAP then probably you use calculation routine 8 for EDI1 and EDI2.
    8 is represented by routine FV64A008. Inside this routine there is the following check:
    check: komp-prsfd = 'X'.
    Verify if your BOM header item category has switched on Pricing indicator (TVAP-PRSFD).  If you have blank value there then this is the reason why EDI1 / EDI2 condition don't receive value in your case.
    Best regards
    Witek Prawecki

  • Query for Billable item form MTL_SYSTEM_ITEMS_B for BOM billing item

    Hi All,
    I want to write query to get billing item from mtl_system_items_b for BOM ...Can anyone give me the idea for accessing the billing item..
    In BOM
    Routings - Resources(form) - Billing Item (Field) and Outside Processing Item (Field)LOV...i Want to know query to access these items..
    Thanks
    Raman Sharma
    Edited by: 929841 on Apr 24, 2012 6:06 AM

    Obtain FRD log file to find out why the trigger is fired twice.
    R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications (Doc ID 438652.1)
    Steps To Take FRD Trace in 11.5.10 & R12 (Doc ID 867943.1)
    R12: How To Create An FRD (Forms Runtime Diagnostic) Log Using Forms 10g (Doc ID 445166.1)
    How To Collect And Use Forms Trace (FRD) in Oracle Applications Release 12 (Doc ID 373548.1)
    Thanks,
    Hussein

  • Issue in copy control F2 to RE for BoM (TAP) item

    Hello All,
    I am facing a issue in return order which is reference to F2.
    I have maintained all standard copy control, still I am having a issue in TAP item category.
    The issue is
    In my sales order I have one standard item ( TAN ) and one BoM item(Main item of LUMF) and its sub item is of TAN as BoM is of item pricing.
    I can see in my order to Invoice all 3 items ( TAP item is not relevant for pricing and picking, its fine )
    but when I try to create return order with reference to F2 , I could get all 3 items in return order but TAP item converted to TAN and hence its relevant for the pricing, return order value is not matching with F2 ( as third TAP item comes in picture)
    as In my invoice BoM main item is having TAP item category ( showing zero price in Invoice)  so I believe same item should get copy in return order with zero pricing but its not happening.
    Guys can you provide me any specific copy control for TAP or any other solution.
    BR,
    Abhijit

    Hi Navaneetha,
    I have maintained the copy control as per your suggesstion but it is not working
    I will tell you how I want the scenario
    In Return Order RE I want all items to be copied from F2
    1 ) Standard material 1-- TAN (F2) -
    > REN ( RE)
    2) BoM
        Material 1-- TAP (F2) -
    TREN ( developed by me ) for no pricing
        sub item      TAN (F2) -
    REN
    for above item categories I have maintained determinations and copy control
    still getting a message in while creating RE is " Item category for item 30 can not be determined."
    Regards,
    Abhijit

  • Formatted search query for displaying invoice items details

    hi all,
    i need to display all the items in AP invoice.kindly suggest me a query for that.
    in AP invoice
    Ex. row items
    code--descqtyprice--
    total
    I0001--XXXXXXX5--
    100 -
    500
    query should display this row as
    code--desc--
    price
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    =================================
    the query should display as the qty is 5 so it will display the same item 5 times
    kindly suggest me some query for formatted search
    its very urgent
    regards
    sandip

    Hi Sandip,
    DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
    Hope its help for you
    Give me reward points,
    Regards,
    G.Suresh.

  • How to change warehouse code in BOM child items on marketing documents

    Hi Every body!!
    I need some Help.
    I am importing some sales documents from an 3th party POS application to SBO.
    I have several POS and each one is a warehouse on SBO. All sales items are Template BOM.
    I can change through SBO-UI the child items related information, but how can it do it through DIAPI???
    Thanks!
    Enriquillo Guigni
    Edited by: Enriquillo Guigni on Jun 29, 2010 12:28 AM

    Hi
    oItems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
    oPT = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees)
    opt.Items.Warehouse="WarehouseCode"
    oPT.Items.Add()
    RetVal = oPT.Add
    If RetVal <> 0 Then
            oCompany.GetLastError(ErrCode, ErrMsg)
            MsgBox(ErrCode & " " & ErrMsg)
    End If

  • MDX query for parent-child combination display

    Hi guys..
    I am really new to the Essbase technology.
    Could you please help me out with this one:
    is it possible to extract the data(for example the metadata of a outline)..eg:-
    The outline structure is as follows :
    A1
    A11
    A12
    A2
    A21
    A22
    I want a MDX query to display it as :
    A1 A11
    A1 A12
    A2 A21
    A2 A22
    I have tried various ways but couldnt come up with a query for this.
    Thanks in advance for all your help.

    Unfortunately MDX cannot do this. If you think about what you are asking for, you are essentially saying that you want to see members of the same dimension on different axis. Multi-dimensional queries can't do that (think about trying to do it with addin).
    A further limiation is that MDX is not robust enough to allow you to work the results into a single axis using a concatenation function because while there is a string-to-member function, there is no member-to-string function and concat requires a string as input.
    Other approaches would require MDX to support joins or subqueries, which it does not.
    As others have mentioned, to do what you want to do, you need outline extractor or something like that.
    *Fun fact - if you have OBIEE 11g, it can do reporting in Essbase with hierarchy members in hierarchy format or column format, which will give you the results you need.  That alone is good reason to start using OBIEE.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Query for BOM Allocations to Master Routes

    I just acquired Query Building permissions and the involved transactions in SAP-PP.  I have access to the sandbox (QAS) to build them before they go into production.  I have a good technical background but never built a query in SAP.  I should be able to catch on fairly quick.
    **I would like to create a query that reports which material numbers have BOM components that are/aren't allocated.  Is this possible where do I start?
    **Are there any threads in this forum that show good query information in regards to production versions, master routes, BOMs, etc. that someone can point me to?

    Hi Lucas,
    Sorry for the late reply. I was travelling yesterday. Was able to create your query in quickviewer.
    Table I used for Joining are as follows:
    Mast: Material to BOM Link
    STPO: BOM Item
    PLMZ: Allocation of BOM to operation
    PLPO: Task List - operation/activity
    Join Condition:
    MAST-STLNR to STPO-SLNR
    STPO-STLTY to PLMZ-STLTY
    STPO-STLNR to PLMZ-STLNR
    STPO-STLKN to PLMZ-ZUONR
    PLMZ-PLNTY to PLPO-PLNTY
    PLMZ-PLNNR to PLPO-PLNNR
    Selection Screen:
    Material Number: MAST-MATNR
    Plant: MAST-WERKS
    List Fields:
    Material Number: MAST-MATNR
    Plant: MAST-WERKS
    BOM Item Number: STPO-POSNR
    BOM Component: STPO-IDNRK
    Component Quantity: STPO-MENGE
    Component Unit: STPO-MEINS
    Operation Assignment: PLPO-VORNR
    I guess this will help you in getting your query set. In case you need to change the field you can do as per your requirement. As told earlier once you are ok with Quickviewer you can convert it to SAP Query from SQ01 transaction.
    Hope this helps you out.
    Best regards,
    Kiran

  • Query for top 5 items

    Hi All,
    Looking for a query that would return the top 5 sales items along with sales values, between a date range
    Thanks
    Ranjit Krishnan

    Hi,
    You may try this if Credit Memos do not need to be included:
    SELECT TOP 5 T1.ItemCode, MAX(T1.Dscription) as 'Item Description',  SUM(T1.LineTotal) as 'Amount(LC)'
    FROM dbo.OINV T0
    INNER JOIN dbo.INV1 T1 ON T1.DocENtry = T0.DocENtry
    WHERE t0.docdate >= [%0\] and t0.docdate <= [%1\] AND t0.doctype = 'I'
    GROUP BY T1.ItemCode
    Order by SUM(T1.LineTotal) DESC
    Thanks,
    Gordon

  • Approval Query for Invoices with Items Onhand below zero.

    Dear Experts,
    I would like to make an approval procedure applicable on A/R Invoice. 
    When ever one of the Invoice items OnHand amount is below ZERO - I need the Approval Procedure to Popup and this way the Produce of the Invoice will be blocked.
    Is there any way to write a query on Approval Template for that?
    Thanks! 
    Regards,
    D.Medalion

    Hi D.Medalion
    Please Follow some step
    First Create Approval Stages in Administration ->Approval Procedures->Approval Stages
    First -
    Administration ->Approval Procedures->Approval Templates->Documents-> Click On A/R Invoice .
    Second-   Administration ->Approval Procedures- Approval Templates->Terms->When the Following Applies->Click Tick On Deviation from Commitment  and ration Drop Down Choose Greater or Equal
    Thanks & Regard
    Khan Imran

  • Caml query for filtering list item not working as expected in Sharepoint hosted app

    I am trying to filter list item based on particular value.
    var header = "xyz";
    camlQueryHeader.set_viewXml = "<view><Query><Where><Eq><FieldRef Name='Position'/>" + "<Value Type='Text'>" + header + "</Value></Eq></Where></Query></view>";
    Instead of getting filtered list items, I get all the list items. What am I missing?
    Note: I am creating Sharepoint hosted app using CSOM.
    regards, Ritesh Anand

    Hi,
    According to the code provided, I suggest you modify the code like this:
    camlQueryHeader.set_viewXml('<view><Query><Where><Eq><FieldRef Name=\'Position\'/>' + '<Value Type=\'Text\'>' + header + '</Value></Eq></Where></Query></view>');
    Here is a documentation of how to use the viewXml property of SP.CamlQuery object:
    SP.CamlQuery.viewXml Property
    Thanks
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Eliminate Tab spaces in Customer Text

    Hi SAP Gurus, I have a requirement. In Smartforms/Script I pull Text from SD Invoice at header level. This text is getting copied from Customer master into Invoice. In Customer master if user enter text along with the spaces or Tabs, It disturbs the

  • Error 606

    Adobe Media Encoder cannot be opened because of error 606. I googled this but it seemed to be mostly a Blackberry issue.

  • Cannot fill a rectangular shape with Color

    HI, I cannot fill a rectangular shape with color. I know it was working at some point. I checked the ID help, and did a search here with no results. I have the tool bar set correctly I think (see below). The object isn't behind other objects either,

  • DBMS_XMLSCHEMA commands concurrent executing

    Java class methods execute statements 'DBMS_XMLSCHEMA.registerSchema' and 'DBMS_XMLSCHEMA.deleteSchema' on Oracle 9i through JDBC using Jboss 4.0.0. Several users may request these service simulaneously and the following happens: one or both actions

  • After changing track name, sequence no longer alphabetical

    I decided to make a few changes to my iTunes library to ensure that, for all my classical music, the song name was preceded by the composer's name in the few situations where this was not already the case. So I made the necessary changes through the