SRM - How to get data from tables???

Hi experts -
I am new to SRM and I have a requirement to code a program that will retrieve purchase orders based on selection criteria, write an ALV report and all the user to select particular lines to close the p.o.
My question is that with the following selection criteria, I see that there are tables such as CRMD_ORDERADM_H and CRMD_ORDERADM_I as well as BBP_PDBEH and BBP_PDBEI, but not exactly sure if I should do selects on them individually or can you collect the records from a function module or BAPI?
Selection criteria:
PO Number - range
Purchasing group - range
Vendor number - range
Buyer ID - range
Cost Center - range
GL Account - range
WBS - range
Asset - range
Plant - range
Company code - range
Delivery Date - range
PO Create Date - range
How can I pull the qualifying records in the easiest manner?
Thanks in advance!
Mark

I'm not certain about this, but I don't think the information you need is in the SRM frontend. I think you'll have to use an RFC enabled FM to retrieve the data from the R/3 backend to the SRM system. Or maybe there is a BAPI that does this for you.
Rob

Similar Messages

  • How to get data from table to pass into alvgrid function module

    i want to get some data from below table to pass into function module of alvgrid
    how can i get data please help.
    thanks in advanced.
    form get_data.
    select * into corresponding fields of table itab
             from  J_1IEXCHDR
                     inner join  J_1IEXCDTL
                        on  J_1IEXCDTLlifnr =  J_1IEXCHDRlifnr
                     where  J_1IEXCHDr~status = 'P'.
       append itab.
    endform.

    Pass your final table(internal table which you want to display) along with fieldcatalog to FM reuse_alv_grid_display.:\
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = i_repid
       IT_SORT               = gt_sort
          it_fieldcat        = lt_fieldcat[]
        TABLES
          t_outtab           = lt_final
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Getting data from table BSEG taking too long ... any solutions.

    Hello people I am currently trying to get data from table BSEG for one particular G/L Account Number With restrictions using For All Entries.
    The problem is that even with such tight restrictions its causing my report program to run way too slow. I put an option where you dont have to access table bseg. And it runs just fine. (all of this is done during PRD Server).
    My question is
    1.) How come BSEG seems to make the report slow, even though I put some tight restrictions. <b>Im using For All Entries where Zuonr eq i_tab-zuonr</b>it seems to work fine in DEV and <b>hkont EQ '0020103101'</b>(Customer Deposits).
    2.) Is there a way for me to do the same thing as what I mentioned in #1 but only much faster.
    Thanks guys and take care

    Hi
    It should be better you don't read BSEG table if you haven't the keys BUKRS and BELNR, because the reading could take many times if there are many hits.
    If you want to find out the records of G/L Account it's better read the index table BSIS (for open items) and BSAS (for cleared items), here the field HKONT is a key (and ZUONR too). So you can improve the performance:
    DATA: T_ITEMS LIKE STANDARD TABLE OF BSIS.
    SELECT * FROM BSAS INTO TABLE T_ITEMS
      FOR ALL ENTRIES I_ITAB WHERE BUKRS = <BUKRS>
                               AND HKONT = '0020103101'
                               AND ZUONR = I_ITAB-ZUONR.
    SELECT * FROM BSIS APPENDING TABLE T_ITEMS
      FOR ALL ENTRIES I_ITAB WHERE BUKRS = <BUKRS>
                               AND HKONT = '0020103101'
                               AND ZUONR = I_ITAB-ZUONR.
    Remember every kind of item has an own index tables:
    - BSIS/BSAS for G/L Account
    - BSIK/BSAK for Vendor
    - BSID/BSAD for Customer
    These table have the same informations you can find out from BSEG and BKPF.
    Max

  • How to retrieve data from table(BOM_ITEM)

    Hi All,
    I wrote webservices using axis1.4 to get BOM information from SAP.. funtional module is CAD_DISPLAY_BOM_WITH_SUB_ITEMS
    webservices works fine..I'am able to retrieve data from Export Parameter..But not able to retrieve data from table
    How to retrieve data from table(BOM_ITEM)..?
    Cheers, all help would be greatly appreciated
    Vijay

    Hi,
    1. Create Page Process.
    2. Select Data Manipulation
    3. In category select "Automated Row Fetch"
    4. Specify process name, sequence, select "On Load - Before Header" in point.
    5. Specify owner, table, primary key, and the primary key column(Item name contains primary key).
    6. Create a process.
    7. In each item select "Database Column" in "Source Type".
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

  • How to get data from a table in a condition between twomonth

    hai friends
    I have a query that is i want to get data from a table based on a condition between two months in a format of char column
    Ex
    I have a column called from_month in the format of 'mon/yyyy'(already converted from date')
    then the second column is to_month in the same format 'mon/yyyy'
    now i wiil select from_month and to_month like
    from month jan/2009
    to month mar/2010
    how to use between of two months in the format of char.Please tell me how to get two different month between data.

    Hi,
    This may be of help.
    Remember Pointless has made a point ;) (worth millions)
    If possible , DO NOT store dates as strings or numbers.Let dates be dates.
    WITH dat AS
    (SELECT ' THIS IS JAN' x,to_char(to_date('01-JAN-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS FEB' x,to_char(to_date('01-FEB-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS MAR' x,to_char(to_date('01-MAR-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS APR' x,to_char(to_date('01-APR-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS MAY' x,to_char(to_date('01-MAY-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS JUN' x,to_char(to_date('01-JUN-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS JUL' x,to_char(to_date('01-JUL-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS AUG' x,to_char(to_date('01-AUG-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS SEP' x,to_char(to_date('01-SEP-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS OCT' x,to_char(to_date('01-OCT-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual UNION
    SELECT ' THIS IS NOV' x,to_char(to_date('01-NOV-2009','DD-MON-YYYY'),'mon/yyyy') y FROM dual)
    SELECT * FROM dat
    WHERE to_date(y,'mon/yyyy') BETWEEN to_date('01 jan 2009','dd mon yyyy') AND to_date('01 mar 2009','dd mon yyyy')Cheers!!!
    Bhushan

  • How to get data from crosstab or table?

    hi !
    i develop my app with bib 9.0.3.1 . To customize my report,i must get data from crosstab or table component (presentation bean) and generate defined XML file ,can you tell me how to do ?

    hi paul
    the sample code like this:
    try{
         DataAccess dataAccess = thinDataview.getModel().getDataAccess();
    int rowCount = dataAccess.getEdgeExtent(DataDirector.ROW_EDGE);
    int colCount = dataAccess.getEdgeExtent( DataDirector.COLUMN_EDGE );
         for ( int i=0; i<rowCount; i++ )
         for( int j=0; j<colCount; j++ )
                   String dataValue = dataAccess.getValue( i,j,DataMap.DATA_UNFORMATTED).toString();
    }catch( Exception e ){
    System.out.println( e.getMessage() );

  • How to get data  from an internal table in some other program

    I would like to get data from the internal table in the other program. When I using FM "LIST_FROM_MEMORY" to get the data, it doesn't work and the exception is not fount.
    If any special code need in the other program, like write data to memory .
    Many thx .
    From Ross Wang

    Hi
    <li>You need to have interaction if you want to use EXPORT/IMPORT statments.
    <li>The internal tables in both programs must be same
    <li>Program one ..Calling program
    REPORT ZTEST_NOTEPAD.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SUBMIT ztest_notepad1 AND RETURN.
      IMPORT it_t001 FROM MEMORY ID 'ZTEST_T100'.
      LOOP AT it_t001.
        WRITE:/ it_t001.
      ENDLOOP.
    <li>Program two ...Called program
    REPORT ztest_notepad1.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
      IF sy-dbcnt > 1.
        EXPORT it_t001 TO MEMORY ID 'ZTEST_T100'.
      ENDIF.
    I hope that it gets you some idea.
    Thanks
    Venkat.O

  • How to get data from COSP table, field HRKFT as the key to data from PM?

    Dear ladies and gentlemen!
    I need to get data from COSP table, field HRKFT as the key to data from PM tables (AFKO and AUFK).
    The problem is that it is a key field to the COSP, and all non-key fields as an alternative to HRKFT are not suitable for this task.
    All this is necessary for the extractor, which loads the data from the R \ 3 systems in the BW-system. I need to perform SELECT from a table COSP and maybe also JOIN, most likely between tables COSP and AUFK.
    What should I do in this case?
    Thank you very much in advance!

    From information on help.sap.com I've made a conclusion that one of possible solutions in theory is to modify standard extractor PM_OM_OPA_1 in order to make HRKFT field available for work, because by default it is hidden by SAP and not available for use as a key field.
    Of course, it's not a very good solution, but for now I know no other way to solve this problem.
    Maybe someone knows better ways? In this case I will be very grateful for any help!
    Moderator: You'd better post it on BI forums

  • OC4J - How to get data from large table (more than 9 million rows) by EJB?

    SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS
    O I use Jdeveloper to create EJB that has finder methods to get data from a big table (more S than 9 million rows). Deploy is OK but when run client program I always get timeout
    O error or not enough memory error,
    S Can any one help me?
    O urgent
    SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS

    Your problem may be that you are simply trying to load so many objects (found by your finder) that you are exceeding available memory. For example if each object is 100 bytes and you try to load 1,000,000 objects thats 100Mb of memory gone.
    You could try increasing the amount of memory available to OC4J with the appropriate argument on the command line (or in the 10gAS console). For example to make 1Gb available to OC4J you would add the argument:
    -Xmx1000m
    Of course you need have this available as hard memory on your server or you will incur serious swapping.
    Chris

  • How to get data from hierachy lookup table

    there is a hierachy lookup table A, and I want to get data from A.
    but the following code does work properly:
    WebTreeNode result = catalog..GetHierarchy(tableName,nodeID);
    could anybody give some suggestion or solution of getting data from hierachy lookup table,
    3x

    Hi fei,
    Please look at the following code.
    I hope it will give you some clues...
    private void showHierarchy() throws StringException
        ResultSetDefinition rsd = new ResultSetDefinition(<code name of your hierarchy table>);
        rsd.GetFields().Add(<code name of a field in your hierarchy table>);
        Search search = new Search(<code name of your main table>);
        WebTreeNode treeNode = catalogData.GetResultTree(search, rsd, 0);
        printHierNameRecursive(treeNode, 0);
    private void printHierNameRecursive(WebTreeNode root, int level) throws StringException
        WebTreeNodeArray arr = root.GetChildren();
        for (int i = 0; i < arr.GetSize(); i++)
            for (int tab = 0; tab < level; tab++)
            System.out.print("t");
            String catName = arr.GetWebTreeNodeAt(i).GetValueAt(<code name of a field in your hierarchy table>).GetStringValue();
            System.out.println(catName);
            printHierNameRecursive(arr.GetWebTreeNodeAt(i), level + 1);
    Regards,
    Nir

  • How to get data from large table (more than 9 million rows) by EJB?

    I have a giant table, it has more than 9 million rows.
    I want to use ejb finders method to get data from this table but always get not enough memory error or time out error,
    Can anyone give me solutions?
    Thx

    Your problem may be that you are simply trying to load so many objects (found by your finder) that you are exceeding available memory. For example if each object is 100 bytes and you try to load 1,000,000 objects thats 100Mb of memory gone.
    You could try increasing the amount of memory available to OC4J with the appropriate argument on the command line (or in the 10gAS console). For example to make 1Gb available to OC4J you would add the argument:
    -Xmx1000m
    Of course you need have this available as hard memory on your server or you will incur serious swapping.
    Chris

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

  • How to get data from a file?

    Hello everyone, i'm new to this forum and to java too. Ok, so here is what i want to do:
    I want to get data from a file containing words and numbers and store them into variables that i will use them after to insert into a database table. For example i have a file called employees.txt in this form:
    eid ename zipcode Hire_date
    1000 "Jones" 67226 "12-DEC-95"
    In C++ i declare variables for each data and store them, for example in this case:
    ifstream in("somefile");
    string name, hdate;
    int eid, zip;
    in >> eid >> ename >> zip >> hdate;
    So i want to do the same thing in JAVA but i can't make it work. So, i would appreciate if someone could give me a simple example how to do it. Thank you.

    [http://java.sun.com/docs/books/tutorial/essential/io/index.html]

Maybe you are looking for

  • Help! iPhone 5 works with iCloud for Contacts and Photo Stream, but Not Music!

    Okay, totally stumped! I have an iPhone 5, which, new, I restored from wife's iPhone 4 backup, remotely (3 Months ago). I just signed into our family Apple ID, chose the most recent backup, and did a restore. So, contacts, and photos and Apps backup

  • HDMI cable

    can anyone tell me if there should be a HDMI cable in the box which comes with the bb tablet because i am missing it

  • Dealing with tables from different databases?

    Hi. I'm a newbie to Visual Studio 2012 and stuck on how to interact with different datasets. I am building a report that is associated with with two tables, each from a different database. The master_flat table with the primary key matter_number is f

  • R/3 Table indexes

    H All, We are on data load performance tuning. Here in our Ecc 6.0 production system by SE11 indexes were created for tables on 2008 and data is loading from 2009 full daily. Is it ok by creating indexes for fields of tables before loading and On wha

  • Roles from Profiles

    I want to create a new Role using the already existing SAP Profiles in the system (e.g.F_FICO_ALL, F_ISRE_ALL, etc.) How do I create this Role? Please help.