Getting a specific record in table MBEW.

Where/how can I get the Storage Location (LGORT) for a specific record in table MBEW.
Regards:
Phillip Mathopa

Check MARD Table. The storage location (field LGORT) is linked via check tab T001L to a plant (field WERKS in table T001L)
The plant is linked via table T001W to a valuation area (field BWKEY in table T001W).
The valuation area is used as a key field in table MBEW
By using this link chain you will be able to identiy for a given record in MBEW the accociated storage locations
Hope this helps
Martin

Similar Messages

  • I am getting only one record from table data

    Hi Experts,
    I am using interacive forms to bring the table data i used  GET_STATIC_ATTRIBUTES_TABLE
    method. initially the table is empty when i fill some records more than one it is giving me only one record.
    where as i fill the table in wddoinit more than one record and try to retreived it, showing all the records more than one. waht is the reason.. if i fill manually why it is not bringing all the reocrds.
    i have used the cardinatly as follows
    1. parent node(no tables/structure used)
    Dictionary structure       empty not used
    Cardinality 1..1
    Selection 0..1
    Initialization Lead Selection  Checked
    Singleton    Not checked
    Supply Function  not used
    2. table node(i used table type)
    Dictionary structure    SFLIGHT_LIGHT
    Cardinality 1..n
    Selection 0..n
    Initialization Lead Selection  Checked
    Singleton    Not checked
    Supply Function  not used
    Pleae help me out...
    Thanks,
    Mahesh.Gattu

    hi,
    Use the following code for making the rows editable for a table UI element.
      DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
      DATA ls_cn_try TYPE wd_this->element_cn_try.
      DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
    navigate from <CONTEXT> to <CN_TRY> via lead selection
      lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
    do 5 times.                       
    clear ls_cn_try.
    append ls_cn_try to ls_cn_try1.
    lo_nd_cn_try->bind_table( ls_cn_try1 ).
    enddo.
    ->  cn_try is the node which is binded with the Table UI element.
    What all this is called as initialization of table. This code will make 5 rows editable, If u want more rows editable then run the loop according to the requirement.
    U can write this code in the WDDOINIT.
    Thanks,
    Pankaj Aggarwal.

  • Get a specific record in duplicates

    Hi Experts,
    I have a requirement with source table has duplicates so i need to select a row based upon the a condition.
    Source table
    EMP_NO ENAME SALARY CODE EMP_ID
    1 TOM 1000 1 10
    1 JOHN 2000 A 20
    1 SAM 3000 A 30
    2 TOM 500 1 40
    2 SUNG 1500 1 50
    Desired Output
    EMP_NO ENAME SALARY CODE EMP_ID
    1 TOM 1000 1 10
    2 SUNG 1500 1 50
    I tried with MAX and DENSE_RANK but its not getting me the first row.
    Please help. Any help will be highly appreciated.
    Thanks,
    K

    Are you looking for something like this?
    (You are free to change the "order by" inside the keep dense_rank statement according to your requirements. But it should be the same order for all columns)
    -- Test-Data
    with yourtable as
    select 1 emp_no, 'TOM' ename, 1000 salary,'1' code, 10 emp_id from dual union all
    select 1, 'JOHN', 2000, 'A', 20 from dual union all
    select 1, 'SAM', 3000, 'A', 30 from dual union all
    select 2, 'TOM', 500, '1', 40 from dual union all
    select 2, 'SUNG', 1500, '1', 50 from dual
    -- Query:
    select emp_no,
           min(ename) keep (dense_rank first order by ename, salary, code, emp_id) ename,
           min(salary) keep (dense_rank first order by ename, salary, code, emp_id) salary,
           min(code) keep (dense_rank first order by ename, salary, code, emp_id) code,
           min(emp_id) keep (dense_rank first order by ename, salary, code, emp_id) emp_id
    from yourtable
    group by emp_no;

  • To Get the earlier records in a table for a particular id neglecting the newer ones

    Hi All,
    I need to get the older records for a particular id rejecting the newer ones..My Scenarios is as follows..
    ID      Result           Date
    1        Pass             2015-01-01
    1        Fail                2015-03-05
    2       Pass                2014-06-07
    2       Fail                  2015-02-02
    My Output will be 
    ID        Result              Date
    1          Pass                2015-01-01
    2          Pass                 2014-06-07
    How can i achieve this....Thanks in advance

    Please follow the basic Netiquette of all SQL forums for the past 35+ years on the Internet. Post DDL that follows ISO-11179 rules for data element names. You have no idea; you do not even know that DATE is a reserved word in SQL! Use industry standard
    encodings (ISBN, UPC, GTIN, etc) and avoid needless dialect. Give clear specifications. Give sample data. Web need to see the keys and constraints, the DRI, etc.  80-95% of the work in SQL is in the DDL. 
    If you do not know that rows are not records, fields are not columns and tables are not files, then you should not be posting. If your tables have no keys, you should not be posting. If you have not tried any DML yourself, you should not be posting. 
    >> I need to get the older records [sic] for a particular product_id, rejecting the newer ones..My Scenarios is as follows.. <<
    Now we have to do all your typing because of your bad manners. Thanks a lot. Here is a repair job. 
    CREATE TABLE Inspections 
    (product_id CHAR(5) NOT NULL,
     inspection_date DATE NOT NULL
    PRIMARY KEY (product_id, inspection_date),
     inspection_result CHAR(4) NOT NULL
     CHECK (inspection_result IN ('pass', 'fail'))
    INSERT INTO Inspections 
    VALUES
    ('prod1', '2015-01-01', 'pass'),
    ('prod1', '2015-03-05', 'fail'),
    ('prod2', '2014-06-07', 'pass')
    ('prod2', '2015-02-02', 'fail'); 
    Here is one way to do this: 
    WITH X(product_id, inspection_date, inspection_result, first_inspection_date)
    AS 
    (SELECT product_id, inspection_date, inspection_result,
            MIN(inspection_date) OVER (PARTITION BY product_id) 
       FROM Inspections)
    SELECT product_id, inspection_date, inspection_result
     FROM X 
    WHERE first_inspection_date = inspection_date;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • SQL query to get last 10 records in the table?

    Hi,
    Can anyone tell me the SQL query to get last 10 records in the table?
    Thanks!!
    MCP

    Please, define what "last" means. Sets are unordered by definition, so if you want to retrieve rows from a table in a specific order you need to specify what that order is - e.g. by maintaining a value in a column (or a combination of columns) that you can use in the ORDER BY clause of the SELECT statement.
    If, for instance, you kept the time when the row was inserted in a special column (InsertedTime), you could use this in your query like this:
    select top (10)
      <column list>
      from <table or view>
      where <restriction(s)>
      order by InsertedTime desc;
    ML
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

  • How to display/navigate to specific record in a table with more then thousand records

    Hi,
    there is a task that I do not know how can be resolved.
    There is a query that returns around 1 - 2 thousand records. And all those records have corresponding weight assigned.
    After query executing it is necessary to navigate to the records with the highest weight assigned. It can be first record, it can be a record at the end or in the middle of the row set from thousand records.
    I have used "DisplayRow"=selected or the code below, but it does not work properly ... when the record that we navigate is in the middle of record set from 2000 records, then users have to scroll down to it.
    And I need to position to that specific record after query is executed.
    So I used the code below:
    public void onButtonClicked(ActionEvent actionEvent) {
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bc.findIteratorBinding("ViewVIIterator");
            Row row = iterator.getCurrentRow();
            String bestPosition = (String)row.getAttribute("BestPosition");
            iterator = bc.findIteratorBinding("DetaillVIIterator");
            ViewObject vo = iterator.getViewObject();
            vo.setWhereClause(some_conditions);
            vo.executeQuery();
            RowSetIterator rowSet = iterator.getRowSetIterator();
            Key key = null;
            while (rowSet.hasNext()) {
                row = rowSet.next();
                if (row != null && ((String)row.getAttribute("weight")).equals(bestPosition)) {
                    key = row.getKey();
                    Key rowKey = row.getKey();
                    ArrayList tableRowKey = new ArrayList();
                    tableRowKey.add(rowKey);
                    this.getRangeTable().setScrollTopRowKey(tableRowKey);
                    break;
    After the code above I getting the row selected or set as a current, but in case of 2000 records, when my record is in the middle of this record set, I need to scroll down to this record to see it.
    And I wanted that I will be navigated to my record with records above and below.
    What am I doing wrong above?
    Thanks
    Alexander

    Hi Timo!
    thanks for the reply.
    version info:
    Oracle JDeveloper 11g Release 2 11.1.2.3.0
    Studio Edition Version 11.1.2.3.0
    Build JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1
    IDE Version: 11.1.2.3.39.62.76.1
    Product Version: 11.1.2.3.39.62.76.1
    1. sorting order is already applied and we to position to a specific record in af:table.
    From another side the task can rephrased: I need to position to a specific record and I need to be able to show 500 records before and 500 records after.
    So where clause can be like:
    :bestPosition > position - 500 and :bestPosition < position +500.
    2. I tried to apply your second approach and found that record is selected, but I need to scroll to it down. It happens when first 20 records are displayed in af:table and my record is 480 records below ...
    Alexander

  • How to get the last record of an internall table ....

    Hi All..
    i want to get the last record of an internal table itab, and i want the the value of the last record.

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • How can i get all the records from three tables(not common records)

    Hi
    I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
    And i dont have any standard extractor for these tables .
    If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
    But i want all the records from three base tables (not only common).
    So how can i get the all records from three tables. please let me know
    kumar

    You can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.

  • I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add info), it overwrites part of the record following it. I am using labview 6.0

    I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after

    It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Dynamic update  of cursor records when table gets updated

    Hi,
    I am having a table with 4 columns as mentioned below
    For a particular prod the value greater less than 5 should be rounded to 5 and value greater than 5 should be rounded to 10. And the rounded quantity should be adjusted with in a product starting with orderby of rank with in a prod else leave it
    Table1
    Col1     prod     value1     rank
    1     A     2     1          
    2     A     6     2
    3     A     5     3
    4     B     6     1
    5     B     3     2
    6     B     7     3
    7     C     4     1
    8     C     2     2
    9     C     1     3
    10     C     7     4
    Output
    Col1     prod     value1     rank
    1     A     5     1          
    2     A     5     2
    3     A     3     3
    4     B     10     1
    5     B     0     2
    6     B     6     3
    7     C     5     1
    8     C     5     2
    9     C     0     3
    10     C     4     4
    I have taken all the records in to a cursor. Once after rounding the request of 1st rank and adjusting the values of next rank is done. Trying to round the value for 2nd rank as done for 1st rank. Its not taking the recently updated value(i,e adjusted value in rounding of 1st rank).
    This is becoz of using a cursor having a value which is of old value.
    Is there any way to handle such scenario's where cursor records gets dynamically updated when a table record is updated.
    Any help really appreciated.
    Thanks in Advance

    Hi,
    Below is the scenario. Which I am looking for.
    ITEM_ID(A)
    ITEM_ID Value Date
    A          3     D1     
    A          5     D2
    A          3     D3     
    A          5     D4
    A          3     D5     
    A          5     D6
    Rounding for Item A has to be done for the rows less then D2 and rounding value is
    x and value adjustment to be done from very next row.
    --For record D1 rounding to be done and value adjustment is to be done from D2 to till the end untill the adjustment value is 0.
    --For record D2 (updated value has to be taken from rounding which updated in D1 row rounding) and the adjustment has to be done from very next row D3 to till the end or adjustment value is o.
    --For D3 row onwards no rounding has to be done.
    ITEM_ID(B)
    B          7     D1     
    B          8     D2
    B          9     D3     
    B          5     D4
    B          4     D5     
    B          3     D6
    Rounding for Item has to be done for the rows less then D3 and rounding value is
    y and value adjustment to be done from very next row.
    --For record D1 rounding to be done and value adjustment is to be done from D2 to till the end untill the adjustment value is 0.
    --For record D2 (updated value has to be taken from rounding which updated in D1 row rounding) and the adjustment has to be done from very next row D3 to till the end or adjustment value is o.
    --For record D3 (updated value has to be taken from rounding which updated in D2 row rounding) and the adjustment has to be done from very next row D4 to till the end or adjustment value is o.
    --For D4 row onwards no rounding has to be done.
    Thanks in Advance
    Edited by: unique on Apr 16, 2010 11:20 PM

  • Record not getting inserted into R/3 table.

    Hi Experts,
    I am trying to save some information in R/3 using BAPI. I have written codes like as shown below:
    Code in View
    public void onActionInsertRecord(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionInsertRecord(ServerEvent)
        try {          wdThis.wdGetTimesheetCompController().executeBapi_Catimesheetmgr_Insert_Input();
                   wdThis.wdGetTimesheetCompController().executeBapi_Transaction_Commit_Input();
        } catch (Exception ex)
        {wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
        //@@end
    Code in Component Controller
    public void executeBapi_Catimesheetmgr_Insert_Input( )
        //@@begin executeBapi_Catimesheetmgr_Insert_Input()
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
        {   Bapicats1 xx = new Bapicats1();
           xx.setWbs_Element(wdContext.currentWorklistElement().getRec_Wbs());
           xx.setEmployeenumber(wdContext.currentZbapi_Cat_Stech00_Getdetail_InputElement().getEmployeenumber());
           xx.setCatshours(new BigDecimal ("1"));
           xx.setWorkdate(wdContext.currentOutputElement().getDate_From());
           wdContext.currentBapi_Catimesheetmgr_Insert_InputElement().setProfile(wdContext.currentZbapi_Cat_Stech00_Getdetail_InputElement().getProfile());
              wdContext.currentBapi_Catimesheetmgr_Insert_InputElement().modelObject().execute();
              wdContext.nodeOutputnew().invalidate();
        catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
        //@@end
    My records are  not getting saved in R/3 tables. Can you please let me know what is going wrong here. The BAPI input parameters values are correctly getting populated in Component Controller.
    I have also created error message table in View. This error message table is mapped to output of Bapi_Catimesheetmgr_Insert. This table is not getting populated.
    Due to this reason, I believe that the values of input parameters of BAPI are not getting passed to R/3. However, I am not sure where the problem lies. Can you please help me in resolving the issue?
    Regards,
    Brian

    Hi Sumit,
    I am not getting any exception. Using SE37, I can save the transaction. Can you please let me know what is going wrong here.
    Regards,
    Sumit

  • Getting less records in TABLE

    Hi All,
    I am executing a BAPI function module in webdynpros.
    My RFC is returning table with 2 records of data.
    also i mapped all the feilds to my TABLE in webdynpro( view).
    But i am getting only one record.
    checking no of recods code is:
    int s=wdContext.nodeTb_Po_Details().size();
    Please suggest me why i am getting only one row of record.
    Thanks,
    Ravi

    Hi ,
    try to do your application once again.
    Suppose u want to display material list.
    bapi :Z_Matnr.
    After importing this u get the Z_Matnr_Input
    u can implement this code in your view.
    In your View init method.u can write the code like this.
    Z_Matnr_Input input = Z_Matnr_Input();
    wdContext.node<Z_Matnr_Input>.bind(input);
    Do u have any input params send here.
    input.set<param>(1);
    input.set<param1>(2);
    Otherwise u do not have params.
    wdContext.current< Z_Matnr_Input()>.modelObject().execute();
    <b>Check this currect out put node as invalidate.
    I think this might be the problem.</b>
    wdContext.node<OutPutNode>.invalidate();
    This will help.
    Thanks
    Lohi.

  • PDE-PLI031 Unable to fetch record from table tool_modulre

    Dear ALL
    I am creating PL/SQL Libraries in report builder.
    but When I try to save the Library to database, a error
    PDE-PLI031 Unable to fetch record from table tool_modulre.
    Would you please tell me how to solve this problem
    and why it coming
    thankyou very much
    pritam singh

    Hi ,
    Saving a library (.pll) to database would store the object inside specific tables that are to be created.
    If you are using 6i, then you should find toolbild & toolgrnt.sql files which you have to run in the order specified. The above scripts creates the necessary tables and henceforth you won't get those errors while saving.
    Hope this helps.
    Thanks,
    Vinod.

  • How can I get rid of Global Temp Table

    Hello,
    I've been writing PL/SQL stored proc for creating reports on VB.NET front end. Until now, I've been using session specific global temp table to store intermediate results and at the end I pass the result set to .NET via reference cursor. The reports are created by simply binding the ref cursor result sets to .NET grids. It's been working fine, but I am kind of bothered by the temp tables. I looked on other options, but couldn't really come up with one.
    Can somebody suggest me how I can get rid of those temp tables? Thanks,

    Tubby, that's exactly I was trying to do. I think that table type has to be defined in database, not within PL/SQL. How can I create that table of user defined record type? I tried that, but it doesn't allow me. I think I am missing something. For example,
    create type group_t is record
    (A varchar2,
    B number,
    C number)
    now inside sp, i have something like:
    type my_group is table of group_t index by binary_integer
    now I have sp cursor as
    cursor cur_test IS 'ABC' as A, 1 as B, 5 as C
    now i do something like this. My original queries are longer and much more complicated so please don't suggest you can directly open ref cursor for this query.
    FETCH cur_test BULK COLLECT INTO my_group;
    Then I do all the processing, calculations, totals, sub-totals, and insert into temp table and return via ref cursor.
    My problem is I can't directly fetch into the above table you mentioned. How should I go about in this situation?
    Maybe I should STOP thinking about this approach and just do whatever I've been doing or solve it through pure SQL. However, there are tons of problems with pure SQL approach.

  • Find a specific record in a recordgroup

    I am building a recordgroup at runtime of IDNum and Name. (Basically key-value pairs)
    I'm able to build the recordgroup. But how do I find a specific record to get a Name value if I have an IDNum?
    I know I can just do this with a temp table, but I was trying to do it this way....

    Hello,
    Use the Get_Group_Record_Number() to retrieve the desired row in the record group (see the on-line documentation).
    Francois

Maybe you are looking for

  • How to get pics from old phone to new phone using iCloud.

    I just got the iPhone 5s and I used to have a 4. I backed up my pictures and contacts but the only thing that's on my new phone is my contacts. My old phone won't come back on. I need my pictures off of my old phone. My new phone says I don't have en

  • Problem in idoc to file mapping

    Hi Experts, I am doing a idoc to file scenario... There is a single idoc with multiple header and line items . I am using multi mapping for header and lineitems. The problem i am facing is regarding the occurences in target strucure... at which level

  • How to save a form in a different file name?

    Hello All, I have a form which has 7 pages. I have 3 buttons which are for submitting PDF,XML and print button. I do not want to keep SaveAs button. What I need : When the user completes all the required fields and clicks on SubmitAsPDF or SubmitAsXM

  • ABAP query related to IDocs

    Hi All, My ABAPers had done settings for IDocs a month back. We were able to post finance documents. Now we are getting following error: "No cross-system company code is defined for company code .......... Message no. F1302 Diagnosis ALE distribution

  • Question about javabeans and xml !!!

    Hi all, I created a java bean in which I will read data from the database and create a table of that data. Now I need to transform this data into xml format. Please can anyone give me some idea how to transform it. Thanks a lot. Jahnavi.