CS_WHERE_USED_MAT only returns one level

Hi all,
I need to get the results that CS15 (where-used) gives me when multi-level is checked.
I need to write a program and was hoping to use FM CS_WHERE_USED_MAT.  However, this FM only returns the materials that are one level down.  I'm on 4.5b.
Does anyone know what FM I can use that will give me the materials at all levels (like CS15 does).  I can use CS_WHERE_USED_MAT and feed back in each material until I reach the end of the levels.  But I was wondering if anyone has found a better way.
Thanks,
Mike

you can refer link:[http://wiki.sdn.sap.com/wiki/display/Snippets/InverseBOMExplosion-ABAP]
or use fm CS_BOM_EXPL_MAT_V2 pass X to field MEHRS

Similar Messages

  • RemovingContext only for One level(Message Mapping)

    Hi,
    Is it possible to remove context only for one level?
    For Eg:If I apply [RemoveContext] function to <Item>
    I will get {A1,A2,B1,B2,C1,C2,C3,C4}
    <SourceRoot>
    <A>
    <Item r="a">A1</Item>
    <Item r="b">A2</Item>
    </A>
    <A>
    <Item r="a">B1</Item>
    <Item r="b">B2</Item>
    </A>
    <A>
    <Item r="a">c1</Item>
    <Item r="b">c2</Item>
    <Item r="c">c3</Item>
    <Item r="d">c4</Item>
    </A>
    </SourceRoot>
    But I need only those coming under a particluar <A> .
    Like {B1,B2}.
    Any way to do this?
    Can anyone help.
    Thanks in Advance
    Message was edited by: Chemmanz

    Hi,
    I was just trying to give an example. In my real case
    SOURCE - INVOIC01 IDoc
    TARGET - cXML Structure for Invoice.
    When it goes to Line item level the complexity comes.
    A similar situation as i explained needs to be solved.
    [REMOVECONTEXT] helped me a lot.
    But I this situation I want to restrict it to a single level.
    For Ex:
    <INVOIC02>
    <IDOC>
    <EIEDP01>
    <EIEDP02 QUALF="001">.. </EIEDP02>
    <EIEDP02 QUALF="002">.. </EIEDP02>
    <EIEDP02 QUALF="0xx">.. </EIEDP02>
    </EIEDP01>
    <EIEDP01>
    <EIEDP02 QUALF="001">.. </EIEDP02>
    <EIEDP02 QUALF="002">.. </EIEDP02>
    <EIEDP02 QUALF="0xx">.. </EIEDP02>
    </EIEDP01>
    </IDOC>
    </INVOIC02>
    1.<EIEDP01>
    <=== mapped directly to ==> <InvoiceDetailOrder>
    Then internal things are organized differently in
    <InvoiceDetailOrder> compared to IDoc element<EIEDP01>
    Ex:
    I want to take all the <EIEDP02>s coming under one line Item <EIEDP01>
    <EIEDP02> cannot be mapped diectly to cXML element. It can be done only after checking it's own attribute QUALF.
    For this I applied [REMOVECONTEXT], but i am getting all the QALF values.
    I need to restrict it to <EIEDP01> level.
    Regards
    Chemmam

  • How come Java methods can only return one variable?

    Hi,
    I am just curious, how come C/C++/Java methods/functions can only return one argument but can accept many parameters.
    I know that the workaround is to return an object, but sometimes creating a class is just too much overhead.
    Thank you in advance.

    Hello,
    It's an interesting discussion. To get the full answer to your question, you'd have to consult the library and find books on programming language design and implementation.
    I believe the tradition goes all the way back to the first programming languages having subroutines/procedures/functions/methods in them: you can return nothing at all (void i Java) or a single value. The need for returning a single value, I guess, comes from the wish to embed calls in arithmetic expressions:
      res = 2 * someObject.foo(x) - anotherObj.bar(a,b);To my knowledge, few languages allow you to return more values. One that does is BETA (see www.daimi.au.dk/~beta/). Though not indispensable, it's convenient sometimes. I don't know why it's not more widespread.
    Yours,
    Ole

  • SAP APO DP CBF - Change data only at one level

    Hello Guys,
    I am getting error as "Change data only at one level".
    I am getting this error while loading data in the planning book at product level (Details All on products).
    I have a default macro in the data view. However, I am getting proper results when i do a details all on some other characteristic.
    Any clue about these error message ?
    Regards,
    Jacky Jain.

    Hello Guys,
    I am getting error as "Change data only at one level".
    I am getting this error while loading data in the planning book at product level (Details All on products).
    I have a default macro in the data view. However, I am getting proper results when i do a details all on some other characteristic.
    Any clue about these error message ?
    Regards,
    Jacky Jain.

  • SEARCH (only returns one record?)

    When I run my search, it only returns the first record it finds. Can sombody give me a clue to why it won't return multipule records?
    try{
    //Connect to the Database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con =
    DriverManager.getConnection("jdbc:odbc:ComfortZoneDB");
    Statement s = con.createStatement();
    String sql = "SELECT * from Hydronics WHERE Keyword LIKE '%"+field+"%' order by Keyword";
    //Contains results from the SQL Query
    ResultSet rs = s.executeQuery(sql);
    // Displays it all out in a table
    while (rs.next()) {
    txt_search1.setText(""+rs.getString(1)+ "|" rs.getString(2) "|"+rs.getString(3)+ "|"+rs.getString(4)+ "|"+rs.getString(5)+ "|"+rs.getString(6)+ "|"+rs.getString(7));
    rs.close();
    s.close();
    con.close();
    catch(SQLException e){
    catch(Exception e){ 
    }

    Sir,
    Slappy presents Table Models 101.
    import java.sql.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.*;
    public class SlappyReadOnlyTableModel{
      private LinkedList rows;
      private String[] colnames;
      private int[] coltypes;
      public SlappyReadOnlyTableModel(ResultSet rs)throws Exception{
        ResultSetMetaData rsmd = rs.getMetaData();
        colnames = new String[rsmd.getColumnCount()];
        coltypes = new int[rsmd.getColumnCount()];
        for(int i=0;i<colnames.length;i++){
          colnames[i] = rsmd.getColumnLabel(i+1);
          coltypes[i] = rsmd.getColumnType(i+1);
        rows = new LinkedList();
        // this bit checks the cursor position. if not at the start we move it there IF we can
        if(!rs.isBeforeFirst()){
          if(rs.getType()!=ResultSet.TYPE_FORWARD_ONLY){
            rs.beforeFirst();
        while(rs.next()){
          Object[] arow = new Object[colnames.length];
          for(int i=0;i<arow.length;i++){
            switch(coltypes){
    case Types.BOOLEAN:
    arow[i] = new Boolean(rs.getBoolean(i+1));
    break;
    case Types.DATE:
    arow[i] = rs.getDate(i+1);
    break;
    case Types.INTEGER:
    arow[i] = new Integer(rs.getInt(i+1));
    break;
    case Types.DOUBLE:
    arow[i] = new Double(rs.getDouble(i+1));
    break;
    // I have left out many cases. Adjust as required.
    default:
    arow[i] = rs.getString(i+1);
    rows.add(arow);
    public int getRowCount(){
    return rows.size();
    public int getColumnCount(){
    return colnames.length;
    public Object getValueAt(int row, int column){
    Object[] arow = (Object[]) rows.get(row);
    return arow[column];
    public boolean isCellEditable(int row, int column){
    return false;
    public String getColumnName(int column){
    return colnames[column];
    Save that as SlappyReadOnlyTableModel.
    Then invoke in your code like this...
    ResulSet rs = // whereever you get result set from.
    SlappyReadOnlyTableModel tm = new SlappyReadOnlyTableModel(rs);
    rs.close();
    JTable display = new JTable(tm);
    // now add your table where you likeToday was your lucky day. Please use the API and look at the tutorial for more. http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    Sincerely,
    Slappy

  • Result Set only returning one row...

    When I run the following query in my program, I only get one row.
    SELECT * FROM (SELECT * FROM ul_common_log_event WHERE application_name = 'Configuration' ORDER BY cle_id DESC) WHERE ROWNUM <= 500;
    However when I run it in TOAD, I get all the rows I am looking for.
    Here's my java
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    My record set only contain one row. I am using Oracle 9 OCI driver BTW.
    Any ideas? Thanks!

    Good thinking. That was the first thing I tried. That was not the problem. It turns out that I was stomping my rs object in another method. Problem resolved!
    Thanks for the reply!

  • Database is only returns one result

    I'm trying to count the number of calls & low priorty call from my account table in my databate. There is only one call so far in it. Call = 1 but its priorty is Low so Low should also be 1. I have check my sql in the Database and it return 1 result but in my program Low still = 0.
    Connection conn;
    String theNoCallsSQL = "Select call_no From Call ";
    String thePLowSQL = "Select call_no From Call where priorty = 'Low' ";
    int NoCalls = 0;
    int Low = 0;
    ResultSet rsetNoCall;
    ResultSet rsetLow;
    rsetNoCall = stmt.executeQuery(theNoCallsSQL);
    while(rsetNoCall.next() == true)
    NoCalls ++;
    rsetLow = stmt.executeQuery(thePLowSQL);
    while(rsetLow.next() == true)
    Low ++;
    conn.close();
    ArrayList myStatsList = new ArrayList();
    CallsStats myStats = new CallsStats();
    myStats.setNoCall(NoCalls);
    myStats.setNoLow(Low);
    return myStatsList;

    Haven't you heard about debugging? The simplest forum of debugging to answer your question would be to insert a line like this:System.out.println("Low++ executed");immediately before the line that saysLow++;Or you could use System.out to display the value of Low immediately beforemyStats.setNoLow(Low);The possibilities are endless.

  • Database Object Dependencies - only goes one level deep

    I've run the Database Object Dependencies report and it appears that the report only shows the top level dependencies and not lower level ones. Am I running this report incorrectly or is there something I'm missing.
    For example, it displays the tables and views correctly but does not show any triggers that have been created for a specific table. Additionally, I didn't see any references to database links being used.
    version: 3.1.1.00.09
    thanks
    John
    Edited by: johurj on Dec 8, 2008 2:49 PM
    Edited by: johurj on Dec 8, 2008 2:53 PM
    Edited by: johurj on Dec 8, 2008 2:54 PM

    John,
    The report shows the immediate dependencies for the anonymous blocks and similar code snippets contained within the application components. It's just like if you did this:
    create table footab (n1 number)
    create trigger footrig before insert on footab for each row begin null; end;
    create or replace procedure fooproc
    as
    begin
    for c1 in (select n1 from footab) loop
    null;
    end loop;
    end;
    SQL> select referenced_name from all_dependencies where name='FOOPROC'
    2 /
    REFERENCED_NAME
    SYS_STUB_FOR_PURITY_ANALYSIS
    STANDARD
    FOOTAB
    SQL>
    The table FOOTAB is the only "real" object that the procedure FOOPROC has a dependency on. No mention of the trigger on the table.
    Additionally, I didn't see any references to database links being used.Yes, that would be a possible improvement to the report.
    Scott

  • 11g HS ODBC database link only returning one column

    Hi,
    We having a problem with a HS ODBC database link to a SQLServer database - only one column is being returned (when we do a simple 'select * from remote_table@SQLServer_dblink'). We recently set up another HS database link to a MySQL database and that's works okay, even though the init*.ora files have the same settings configured.
    Any ideas what might cause this?
    This is the trace file:
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Heterogeneous Agent Release
    11.2.0.2.0
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Version 11.2.0.2.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/libodbc.so"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using MySQL_CSSUser as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    hgocont, line 2754: calling SqlDriverConnect got sqlstate I

    The characterset on our Oracle DB is AL16UTF16, but we have already tried several language settings without success (see commented out sections in the *.ora file below) - but interestingly not a UTF16. Is that the problem, do you think?
    The collation on the SQLServer DB is 'SQL_Latin1_General_CP1_CI_AS', if that makes any difference. The db server is Linux (5.6), Oracle db is 11.0.2.0 and the SQLServer db is v.8.
    We don't get an error when using the dblink...it's just that only the last column is returned. If we explicitly select any other columns, we get the 'invalid identifier' error. It's the same with whatever table we dblink to...the columns are just standard chars and numerics, nothing large or custom, etc.
    I'll try and dig up the full trace file....
    HS_FDS_CONNECT_INFO=CSS_ST
    set ODBCINI=/etc/odbc.ini
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /usr/lib/libodbc.so
    HS_FDS_SQLLEN_INTERPRETATION=32
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8MSWIN1252
    #HS_LANGUAGE=AMERICAN_AMERICA.UTF8
    set ODBCINSTINI=/etc/odbcinst.ini
    set LD_LIBRARY_PATH=/usr/local/easysoft/lib:/usr/local/easysoft/sqlserver/lib:/usr/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Tags only return one result

    I have tagged numerous bookmarks, but when I type the tag in the location (Awesome) bar, only one result is returned. I have disabled all themes and tried disabled most add-ons. Nothing helps.

    If all else fails, you could use the JDBC driver for your
    SELECTS and your
    ODBCJDBC driver for INSERTS/UPDATES. It's a bit of a crap
    approach, but at
    least it'd work.
    Beyond that, I can't be of any help, sorry. Maybe you could
    revert to the
    7.0.1 version of the ODBC driver?
    Adam

  • Is there only the one level of undo in color?

    I really hope there are more levels. I like to adjust several things and undo them sequentially to see the look...

    Only one Undo. However, if you are doing a lot of your work in the Secondaries, you can disable each secondary, one at a time. Same with the ColorFX room, just select Bypass for the individual node.
    On top of that, you can have up to 4 grades and you can bounce between them by just selecting the grade on the timeline.

  • Presenting characteristic only at one level

    I have a query where the result set is presented as a hierarchy - at the state level, then district level and then at the office level. One of the characters displayed is the office manager. I have to show this value only at the office level and not at the region level.
    How can I do this?

    If office level is at leaf position, make display hierarchy deactivate from the characterstic properties.

  • Jdbc:odbc bridge only returning one result when a count show 148 !

    Hello,
    Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
    It is a simple sceanrio that i have coded umpteen times before ...
    I have the following ....
    1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
    2. Statement object created from connection above
    3. A string with my SQL in it
    4. A result set for the results.
    These are created as follows:
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(ODBCSource, userID, password);
    if (con == null) {
    // error handling not relevant here
    } else {
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String SQL = "select * from table";                    
    ResultSet rs = s.executeQuery(SQL);
    i then try to loop ....
    while (rs.next() )
    // stuff
    however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
    while (rs.next() )
    if (rs.isLast() )
    System.out.println("I am on last record");
    BUT if i run the SQL
    "select count(*) from table" ... i get a count of 148 !!
    I tried setting the FetchSize through setFetchSize(), but made no difference.
    This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
    Cheers

    sorry .... just relaised this is in the wrong forum ... reposted in the Database connectivity forum !!

  • Trigger and Gate Only Returns One Channel

    Hello all,
    I am trying to write a VI that will run in the background and start writing some data to a file when it detects a signal. For detecting the signal, the VI uses the "Trigger and Gate" express VI to see when the input voltage goes above a treshhold. Then I plan to write whatever data comes out of the "Triggered Signal" output.
    There are 8 channels, with the 6th one being the channel that is being checked for a signal. I have configured the "Trigger and Gate" express VI to trigger when that channel reaches 0.01 V and it does trigger when that happens. However the problem is that the "Triggered Signal" output only contains data for the first channel, and I want it to contain all of the channels.
    I don't have access to the device that will be sending the data right now, so I am testing the VI using the "Read From Measurements File" express VI. It reads from a file that contains data that I saved from the device previously. When I set the the "Retrieve segments of specified size" for the express VI, so I can see how it progresses, I get the error I mentioned above. When I set it to "Retrieve segments of original size" (the file contains only 1 segment, so it reads all data), everything works as expected.
    Any ideas as to what I am doing wrong?
    I attached the VI with some sample data.
    Attachments:
    data.csv ‏4834 KB
    trigger-and-gate.vi ‏112 KB

    Hi krizka,
    There are two really good examples that can be found using the NI Example Finder (help -> find examples). These are under Hardware Input and Output -> Analog Measurements -> Voltage  
    Cont Acq&Graph Voltage-Int Clk-Analog Start.vi
    Cont Acq&Graph Voltage-Write Data to File (TDMS).vi 
    These will give you a good start point. Please feel free to ask if you have any questions
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Report Queries - Multiple Source queries - One source returns & one doesn't

    Hi Folks.
    Odd one here.
    I have a report query entry in the Shared Components of the APEX UI.
    Within the Query are two source queries.
    Both return unique column names.
    Both use the same bind variable.
    When generating a PDF using the call to the report, the data from one query is being returned and the data from another is not.
    I have generated a sample XML file from APEX which is populated with data for both queries.
    If I import this into MS-Word using the BIP plugin and generate a preview all is fine. All fields using data from both source queries are populated.
    When generated via a regular call within APEX it simply does not work. I only get the data from one query.
    Does anyone have any suggestions?
    Anyone had a similar thing?
    Any comments/suggestions welcome.
    Many thanks
    Dogfighter.
    Message was edited by:
    Dogfighter
    Message was edited by:
    Dogfighter

    Hi Marc
    Does this make sense to you?
    I have now set up a simple report query and report layout.
    The record ID is hard coded into the query so that it only returns one row.
    I am using an RTF based template.
    If I navigate to Shared Components > Report Queries > Edit Report Query and then press the 'Test Report' button it runs perfectly.
    If I copy the 'Print URL:' value from this page and use it as the URL target on any page in the app. it also works perfectly.
    If I try and execute the following...
    update invoice_summary
    set invoice_pdf = APEX_UTIL.GET_PRINT_DOCUMENT (127, -- App ID
    'TEST_INVOICE', -- query name
    'TEST_INVOICE') -- layout name
    where invoice_summary_gsm_id = a.INVOICE_ID;
    I get the pdf saved to the BLOB column with the field labels in place but no data.
    Three ways of running the report.
    Two of them work perfectly but the one I want (generate direct into BLOB column) does not. Why would the exact same report query & report layout work with the other two methods but not the GET_PRINT_DOCUMENT route?
    It's not as if the pdf does not get into the BLOB column, it does, but it only has the labels and no values.
    Any ideas?
    Simon.
    PS. I only have one report query and one report layout set up so as to avoid confusion. Both with the same name.
    Message was edited by:
    Dogfighter

Maybe you are looking for

  • Problem Entity framework and short types

    I am using the Entity Framework in Visual Studio to access a table in my oracle database. Problem is when selecting a record in runtime the following error shows up: Value was either too large or too small for an Int16 This error originates when tryi

  • What is the disadvantage of RMI?

    Hi, I am trying to understand the RMI. So far what i have read in books is telling the advantages of the RMI, but I can not find the disadvantage. Could anyone tell me ? Thanks, Herbert

  • Sorting app on ipad2 in alpha order

    Sorting apps on ipad2 in alpha order yes or no

  • Excise for material

    hi all, i have dabut, that wether we can maintain some material as excisable and some are not which belongs to same category and division. can we maintain this information in J1ID under the tab Excise rate - Excise tax rates? Thanks & Regards Ashwini

  • Report names in AL11

    Hi, Please give me solution for the following.... 1. where can I find the table which is having daily dataloads status, i.e. I want to know the load is sucess or failed?. If success how many records update to cube. 2. I'm running RSCRM_BAPI and dumpi