Extracting information from a table based on different criteria

Post Author: shineysideup
CA Forum: Formula
Hi Folks
I have a bit of a strange one here.
I need to extract information from a single table based on different critera.
Sounds simple enough but here's the tricky part.
This table is a table that contains the build of a product. All the parts that are used to make the product and also the sub-parts that are used to make the primary product parts.
Example:
I have a part that is in the product and the part no is 1111. This part is actually part of another part that is part no 1112
What I need to do is display part no 1111 with all of its details but then also show that it is also part of part no 1112.
The way the table holds this information is as follows.
Seq_No      Parent_Seq_No     Part_No
The seq_no is item no that is given to the part number. If the part is a member of another part then there is also a parent_seq_no.
Everything needs to tie back to the seq_no and the parent_seq no as the part itself can be used in a parent or it can be used on its own. This way you can actually have the same part appearing in the list several times but the seq_no will be different for each one. If the part can be used in two different sub-builds (with each part being used twice in each sub-build) and also on its own once then you would have 5 different seq_nos two parent_seq_nos.
What I need to do is to list all of the parts but then also when a part is part of a parent_seq_no I need to be able to display the parent seqno but also the part_no for that as the parent would also be listed as an individual item in the part list.
At the moment listing the part_no, seq_no and parent_seq_no is easy but when I try to list the part_no for the parent I jsut keep getting the original sub part again. I can do this with a sub-report but with what I need to do with the data after listing the parts a sub-report is not an option for me.
This make sense?
Thanks

Post Author: Charliy
CA Forum: Formula
As long as the chain only goes one link deep, you should be able to Alias the table and link it (left outer)  from the child part to the parent part.  Then build a Detail B (or Group Footer if that's where you're printing) and conditionally suppress is if there is no "Parent Part".

Similar Messages

  • Extracting data from multiple tables based on somelogic on each tables

    Hai
    I need to extract data from some base tables.
    1) first i need extract COMPANYCODE, PROFIT CENTER , PRODUCT from ZRLR custom Rl3-table.
    2) Then i need extract MATERIALS based on above selected COMPANY CODE , PROFIT CENTER , PRODUCT from MKAL , CRHD Base R/3-Tables.
    3) Then i need to extract the MATERIALS based on the above PROFIT CENTERS from MARC table with filters Material Type = 2P , 3P, 2N, 3N , 2S.
    How i extract like this data . Please let me know
    kumar

    Hi,
    you need to create a generic extractor using a function module for this. For some help check this: /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Additionally you can get a template from me. You'll find my email in my business card.
    regards
    Siggi

  • Pulling information from a table based on text input

    Hello,
    I was wondering if it was possible to find cells on another table based on the text input of one cell. For example, I have a 2nd table where I have all the properties of a monster, say a wolf. In the first table I want to enter different monsters multiple times but I don't want to copy and paste their properties in every single time, I just want it to draw the properties from the properties table whenever I type the monster id. If I type =Wolf Damage, Numbers immediately locates the correct number to plug in from the table, because the table axis are listed as Wolf and Damage. But I can't figure out how to make a text input part of a cell reference. If I type "Wolf" in B2, and then do the same thing =B2 Damage, it's obviously a sytax error. I've tried different combinations of =T(B2) Damage, but I feel like I'm missing the syntax to convert a string into an actual cell location.
    Thank you,
    ai48

    Would be a good idea to download (thru the Help menu),
    *_iWork Formulas And Functions User Guide_*
    and read carefully the description of the function VLOOKUP.
    Yvan KOENIG (VALLAURIS, France) mercredi 23 février 2011 22:54:36

  • How to get a block of data from internal table based on a criteria

    Hi all,
              I have some records in the internal table t_int1. I want to retrieve some set records from that table and put them all in some other table, based on a single field which is not  a key. Can i use READ statement to achieve this.
    Could you please let me know any simple way of doin this.
    Regards,
    Vishnu

    I have some records in the internal table t_int1. I want to retrieve some set records from that table and put them all in some other table, based on a single field which is not a key. Can i use READ statement to achieve this.
    Could you please let me know any simple way of doin this.
    Answer :
    data:
    itab2 like standard table of  t_int1 with header line.
    Loop at t_int1.
    read table t_int1 with index 1.
    check ur condition----
    check each line and insert it ---work out the syntax for this
    IF t_int1-xyz = data1
    append  line of t_int1 to itab2. or try insert
    cnt = cnt + 1   -
    u will get no. of records added to next itab.
    else.
    cnt1 = cnt1 + 1 -
    u will get no. of records not added to next itab.
    endif.
    end loop.

  • How do I extract a set of rows from a table based on specified criteria?

    I am using Numbers '08. I have a table that looks like this:
    I would like to, programmatically, find the MAX amount of all the 'Clothing' category items. More generally I'd like it to work like the COUNTIF function where I can do this:
    MAX(INCLUDEIF('Table::Category', 'Clothing'))
    I think my intention is clear.
    I suppose an alternate way is to create a table for every category and just do a MAX over that table, but this seems redundant since I already have that data in this particular table. Thanks!

    The easiest way, to me, is to add a new column to you data table which only shows values from rows that match the category for which you want to find the max():
    The new column (in this example) is titled "Active Category" and is selected from a Summary table.  Add a new table titled "Summary" as shown.
    Make cell B2 contain the category.
    Let's get the data table set up with the new column:
    E2=IF(C2=Summary :: $B$2, D2, "")
    select E2 and fill down.  This will only show the amount IF the category in column C matches what you entered in the summary table:
    Now let's complete the summary table:
    B3=MAX(Data :: E)
    I hope this helps

  • Need suggestion on how to extract data from a table

    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? Java, PHP or other? If Java, any suggestion what classes/module and approach to use?
    Thanks very much.

    xcomme wrote:
    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? It this a one shot (one time only task)? Then the best way is whatever way you are most comfortable with and which works.
    If on going then I doubt language choice matters but using a html parser rather than attempting to parse it yourself is going to help in any language.
    And are you starting with html files or starting with a http server? The two are very different.

  • How to extract data from multiple tables (always got errors)

    Dear Experts,
    I have a simple mapping to extract data from multiple tables as a source (A, B, C) to a target table (X). Below is the picture:
    (Sources)....(Target)
    A----------------***
    B----------------X
    C----------------***
    Sample Source Data:
    Table A:
    ColA1
    100
    200
    etc
    Table B:
    ColB1 ColB2 ColB3
    10 Y Ten
    20 Y Twenty
    30 Y Thirty
    etc
    Table C:
    ColC1 ColC2
    11
    12
    13
    etc
    Target table (X) should be (just has 1 group INGRP1):
    ColA1 ColB1 ColB3 ColC1
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    Scenarios:
    1. Directly map from A, B, C to X. Unable to map with error message: "API8003: Connection target attribute group is already connected to an incompatible data source. Use a Joiner or Set operator to join the upstream data first before connecting it into this operator."
    2. Map each source to Expression Operator and then map from each Expression to target table. I am able to map all attributes successfully but got error when validating it with message: "VLD-1104: Attributes flowing into TEST.EXPR_SRC.INGRP1 have different data sources."
    How can I achieve the correct mapping for this purpose?
    Use Joiner? I have no key to join the sources
    Use Set? The sources have different number of columns
    Thanks in advance
    Prat

    Thanks Nico,
    I think it will results data like this:
    100 10 Ten 11
    200 20 Twenty 12
    300 30 Thirty 13
    etc
    and not the expected:
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    But it inspired me to solve this by adding key expression in each source table (B & C) to be joined to table A with this formula:
    100+TRUNC(INGRP1.COLB1,-2)
    Regards
    Prat

  • How to extract data from 12 tables ?

    Hi experts,
    I want to extract data from 12 tables into bi.
    How can we do this. And also can we extract some fields from
    a structure?
    Full points will be assigned.
    Regards,
    V N.

    Hi,
    First you need to check if the tables are standard tables or custom tables. If they are standard tables check which extractors are using those tables.
    If they are not being used by any of the standard extractors then you you need to create generic datasource for the same. The same hold true for custom tables as well. For custom tables, you'll need to create generic datasource. If you search the forum for generic datasources you'll get a lot of information.
    Its very important that you understand the table relationships, data volumes, if delta is possible or not, data granularity, etc for your datasource design.
    Cheers,
    Kedar

  • Insert data from a table into 5 different tables

    My application has a data block than display information from another table. From this data block, the user has the option to select the records for upload. The information in the data block is used to insert data into 5 different tables. So if any exception occurs while inserting, the whole process should be rollback, but before this happen a record is inserting in a failed table indicated the reason of the failed.
    For this process I use the following commands:
    1.     sp_name := Get_Application_Property(SAVEPOINT_NAME);
    2.     INSERT DDL
    3.     INSERT DDL
    4.     INSERT DDL
    5.     INSERT DDL
    6.     INSERT DDL
    7.     If Other Exception then ISSUE_ROLLBACK(sp_name) Otherwise FORMS_DDL ('commit')
    The problem the previous insert(s) rollback
    Thanks,

    Hi,
    If you are using FORMS_DDL built-in to insert the data, then after each FORMS_DDL statement, you have to check the values of FORM_SUCCESS or FORM_FAILURE built-ins.
    FORMS_DDL('<insert_statement_1>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;
    FORMS_DDL('<insert_statement_2>');
    IF FORM_FAILURE THEN
    <the statement fails. so have to be rollbacked>
    END IF;Hope this helps.
    Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Most recent date (UDATE) from CDHDR table based on CDPOS

    Hi,
    I am working on one object where i stuck with one issue. The requirement is I have to retrieve the most recent date from CDHDR table based on CHANGENR in CDPOS table. Where i am doing FOR ALL ENTRIES on CDPOS table to get the MAX( date )and i got the error, that aggregate functions are not allowed except COUNT( * ) with for all entries.
    Any thread which can solve this issue would help aswel.
    Please guide me how to achieve this. <removed>
    Edited by: Thomas Zloch on Mar 13, 2010 9:10 PM

    Hi Li,
    Thats was really helpful information , infact my requirement is same as what you said. I even checked in the table entries there is only one changenumber.
    You said we can take the first record, i even did the same. But for TABNAME I have to pass 3 table name 'LFA1', 'LFB1' and 'LFM1'. For FNAME 'LOEVM', 'SPERR'. I have written the code as below.
      SELECT objectclas
                   objectid
                   changenr
                   FROM cdpos
                   INTO TABLE i_cdpos_a1
                   FOR ALL ENTRIES IN i_lfabm1
                   WHERE objectclas = c_kred               "KRED
                   AND objectid EQ i_lfabm1-objectid       "Lifnr
                   AND ( tabname EQ c_lfa1 OR tabname EQ c_lfb1 OR tabname EQ c_lfm1 )          "LFA1, LFB1 and LFM1
                   AND ( fname EQ c_loevm OR fname OR fname EQ c_sperr )    "LOEVM, SPERR
                   AND value_new EQ c_x.
            IF sy-subrc EQ c_0.
              IF i_cdpos_a1[] IS NOT INITIAL.
    Select UDATE from CDHDR based on CHANGENR in CDPOS.
                SELECT objectclas
                       objectid
                       changenr
                       udate
                       FROM cdhdr
                       INTO TABLE i_cdhdr_a1
                       FOR ALL ENTRIES IN i_cdpos_a1
                       WHERE objectclas = c_kred             "KRED
                       AND  objectid EQ i_lfabm1-objectid               "Lifnr
                       AND changenr EQ i_cdpos_a1-changenr.   "(this is coming from CDPOS above selection)
    Here i got UDATE which have all the dates from 3 tables. I have to display in the output the field value (X) of LOEVM and UDATE for LFA1, SPERR value and UDATE for LFA1.Same way for other two tables, I have to display the UDATE and its field value (X). Where UDATE should be most recent date respectively.
    How can I populate the Recent date (UDATE) from one interal table for indvidual field values and table names.

  • Create a procedure which requires displaying information from two tables

    What if we want to create a procedure which requires displaying information from two tables. In this situation,
    I need to display all the details of an employee from an 'emp' table based on the deptno. and also their salary information which is
    stored in "Salgrade" Table. Is the use of "And" the correct way of using it?
    Do I need to declare all the attributes before begin or I can just access them directly? Thanks
    Create Procedure findDept
    ( I_deptno IN number
    ) As
    Begin
    Select Ename, Job, MGR, Hiredate, Sal, Comm, Dept_no from emp and exp, grade , location from salgrade where dept_no
    = I_Deptno;
    Exception
    When NO_Data_Found then
    DBMS_Output.Put_Line(' Department not found"|| I_deptno);
    End findDept;

    Hi,
    Besides Qwerty's remark, you've also got a quoting error:
    Change
    DBMS_Output.Put_Line(' Department not found"|| I_deptno);
    {code}
    into
    {code}
    dbms_output.put_line(' Department not found: '|| i_deptno);
    {code}
    Which leads to the question:
    What do you want to do when a record is found?
    Display it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Extracting data from multiple tables using DB connect

    Hi,
       I am having different tables which are  having the same structure in oracle database but  there names are different.Now i have only one datasource at BI side.This datasource shld extract data from the  tables dynamically.How can i do it using DB Connect .
    Thnxs

    ahh I see - problem as you said then is if you then take on a new location!
    I would then put into the source system a table identifier and create a view across all the tables
    Then dbconnect from the view and use the selection parameter of table parameter if you wanted one infopackage per "location"
    If you do need to have a new table in the source then just expand the view and create a new ipak
    hence NO bw changes required that need a dev-q-p transport - just the ipak in prod and it;s the source systems problem to add the extra table to the view

  • Extracting information from Microsoft Acces

    Hello
    I need help, how do I extract information from tables in a database of Microsoft Access to SAP BW?
    If there is a manual please will thank you.
    Nandirri

    Please check if your client have XI or PI consultant, discuss with them.
    Regards,
    Sushant

  • How to design plug-in which extract information from file opened in illustrator

    Hi Everyone,
    I want to design a plug-in in adobe illustrator which could extract information from pdf file which is opened in illustrator.
    Can anyone give me direction from where could I start.??
    Thanks in advance.

    This is very difficult in any API because there are no tables in PDF.
    If the table is at a known exact location you would extract text from each known cell location
    If you have to discover tables you need to decide how to recognise them: perhaps by looking for drawn lines and analysing their relationship to see if they form a grid; then use the positions derived to get the text from the table.

  • Extract data from a table

    Hi All,
    How to extract data from a table to a excel sheet.
    I want matnr and desc from MARA.
    Please help me.
    Thanks
    Veni

    Programmatically it would like something like this.
    report  zrich_0001.
    data: begin of imakt occurs 0,
          matnr type makt-matnr,
          maktx type makt-maktx,
          end of imakt.
    start-of-selection.
      select matnr maktx into table imakt from makt.
      call method cl_gui_frontend_services=>gui_download
        exporting
    *      BIN_FILESIZE              =
          filename                  = 'C:makt.xls'
           write_field_separator     = 'X'
        changing
          data_tab                  = imakt
        exceptions
          others                    = 24
    Regards,
    Rich Heilman

Maybe you are looking for