How to get multiple records from internal table through BDC

PERFORM DYNPRO USING:
  'X'  'SAPMM61L'  '0500',
  ' '  'BDC_OKCODE'  '=NEWC',
  'X'  'SAPMM61L'  '0500',
  ' '  'BDC_CURSOR'  'PLPTU-PLWRK(01)',
  ' '  'BDC_OKCODE'  '=TAKE',
  ' '  'PLPTU-PLWRK(01)' '2531'. (2531 is a plant)
This is the recording used to get plant via BDC of MS31.
Using this code i can get only single plant...
If i want to get multiple plants from an internal table,how i can change this code?
Since it is a recording i cant put this code in LOOP..ENDLOOP.
Suggest any method for doing this....
Awaiting for ur reply...

Hi,
While recording also record the scroll down button.
The you can place different plant in the BDC using loop and endloop
Regards
Arun

Similar Messages

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to Getting 10lack records from 2 tables and share  into 10 tables

    Hi Experts,
    i have some special requirement about counting records before we we procees them in to intenal table.
    here is the sample code .
    **Needed to get users for ref users data
    DATA: BEGIN OF gt_usr02 OCCURS 0,
            bname LIKE usr02-bname,
          END OF gt_usr02.
    DATA:g_wa_usr02 LIKE LINE OF gt_usr02.
    **Needed To get reference users data
    DATA: BEGIN OF gt_usrefus OCCURS 0,
            bname LIKE usrefus-bname,
            refuser LIKE usrefus-refuser,
            END OF gt_usrefus.
    DATA:g_wa_usrefus LIKE LINE OF gt_usrefus.
    SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS : s_user FOR usr02-bname.
    SELECTION-SCREEN :END OF BLOCK blk1.
    START-OF-SELECTION.
    REFRESH:gt_usr02,gt_usrefus.
    CLEAR:gt_usr02,gt_usrefus
    CLEAR:g_wa_usr02,g_wa_usrefus ,
    SELECT bname FROM usr02 INTO TABLE
           gt_usr02 WHERE bname IN s_user. "say suppose "*" in s_user
    1.Here i need to get no of records befor we are getting data from this select statement
    basically i need to know the no of records (like count (sy-dbcnt) with same condition like below.
    IF NOT gt_usr02 IS INITIAL.
        SELECT bname refuser FROM usrefus INTO TABLE  gt_usrefus
         FOR ALL ENTRIES IN  gt_usr02
        WHERE bname =  gt_usr02-bname AND refuser <> space.
      ENDIF.
    2.if i found no of records based on that  i have to broke those records into diff tables
    say i found 10,000 records ,that time i have spilt those 10,000 records into 10 tables(Similar strcture like table gt_usrefus ) with 1000 records each .
    Can you help us.this requirement is for avoiding memory issues.

    Hi nagraju102,
    - please try to post code formatted as code
    - splitting a table of 10000 records into 10 tables of 1000 records will use not less memory at all, even a little bit more for the administrative overhead
    - the numer of lines in an internal table can  determinde used system function lines( itab )
    - you can create an internal table of references and then create any number of internal tables,
    data:
      lt_tabref type table of ref to data.
    field-symbols:
      <table> type  table,
      <tabref> type ref to data.
    DO 10 TIMES.
      append initial line to lt_tabref assigning <tabref>.
      create data <tabref> type table of usrefus.
      assign <tabref>->* to <table>.
      perform fill_table changing  <table>."fill this table as you prefer
    ENDDO.
    Here you have 10 internal tables with USREFUS structure.
    Regards,
    Clemens

  • How to fetch previous record from internal table?

    Hi,
    My final internal table (it_final) has all the data month wise year wise.(opening and closing qty)
    but if
    Material   Batch    Month   Year        opening_qty         closing_qty
    FC5431   abc        08        2008        100                       50
    FC5431   ABC       09        2009         0                          100
    Suppose I want to take PREVIOUS record(closing_qty = 50  in my 09/2009  openin_qty = 50)  how will Ido this?
    Any solution????????? BTW i m using S033 for opening an closing qt monthwise.
    Plz reply soon if anyone knows.
    Thanks and Regards,
    Archana

    Hi,
    Test the following Sample code hope will solve out your problem,
    TYPES:  BEGIN OF ty_test,
            m(3),
            open_qty TYPE i,
            close_qty TYPE i,
            END OF ty_test.
    DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE,
          wa_test LIKE LINE OF it_test,
          ctabix LIKE sy-tabix,
          ptabix LIKE sy-tabix.
    it_test-m = 'AAA'. it_test-open_qty = 100. it_test-close_qty = 50. append it_test.
    it_test-m = 'AAA'. it_test-open_qty =  0. it_test-close_qty = 100. append it_test.
    LOOP AT it_test.
      ctabix = sy-tabix.
      IF sy-tabix > 1.
        ptabix = sy-tabix - 1.
        READ TABLE it_test into wa_test INDEX ptabix.
        IF sy-subrc = 0.
          it_test-open_qty = wa_test-close_qty.
        ENDIF.
        MODIFY it_test INDEX ctabix.
      ENDIF.
    ENDLOOP.
    LOOP AT it_test.
      WRITE: it_test-m, it_test-open_qty, it_test-close_qty, /.
    ENDLOOP.
    Regards,
    Faisal

  • How to get Multiple records from functions

    Hi Everyone
    Im new to this stuff. Im trying  through JCO. As far as the single recordsets like data of customer or article are concerned i get it through an array.
    But i wanted to retrieve
    1- Whole tables like (all articles)
    2- Selected articles. or Customer order details (articles in PO)
    That means multiple records in one go.
    Later on ill display it in JTables.
    Like for the past three days i was googling around. Thought like this ones not for my stomach. Came across this Forum. Thought its worth posting a request.
    Here is the code
    public String[] KSearch(String Knr) throws Exception{
                            String[] Result=new String[11];
                            IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
                            if (ftemplate == null)
                                    throw new Exception("Funktionstemplate nicht gefunden");
                            JCO.Function function = ftemplate.getFunction();
                            JCO.ParameterList input = function.getImportParameterList();
                            input.setValue(Knr,"FieldName");
                       JCO.Client client = JCO.getClient(Con.conPoolId);
                       client.execute(function);
                       JCO.ParameterList output = function.getExportParameterList();
                       Result[0]=output.getString("NAME");
                       Result[1]=output.getString("VORNAME");
                       Result[2]=output.getString("GDATE");
                       Result[3]=output.getString("TELEFON");
                       Result[4]=output.getString("MAIL");
                       Result[5]=output.getString("STRASSE");
                       Result[6]=output.getString("PLZ");
                       Result[7]=output.getString("ORT");
                       Result[8]=output.getString("KONTO");
                       Result[9]=output.getString("INSTITUT");
                       Result[10]=output.getString("BLZ");
                                                                                    JCO.releaseClient(client);
                       return Result;
    now instead of a single record what if im expecting a number of records, like what if i need customer over 25. Which means more than one. I have to get in tabular format so that i can display it in JTables.
    Hope it a bit illustrative.
    Regards
    Edited by: Aaron Maleck on Jan 5, 2008 7:35 AM

    public String[] KSearch(String Knr) throws Exception{
    String[] Result=new String11;
    IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
    if (ftemplate == null)
    throw new Exception("Funktionstemplate nicht gefunden");
    JCO.Function function = ftemplate.getFunction();
    JCO.ParameterList input = function.getImportParameterList();
    input.setValue(Knr,"FieldName");
    JCO.Client client = JCO.getClient(Con.conPoolId);
    client.execute(function);
    // Maybe here you should use a JCO.Table Class to get the //ExportParameters such as
    JCO.Table output = function.getTableParameterList().getTable( "tabelname" );
    // so you can use setRow() Function to get the information of the //relevant record. such as the 3. Costum
    output.setRow(3);// Record Number
    Result[0]=output.getString("NAME");
    Result[1]=output.getString("VORNAME");
    Result[2]=output.getString("GDATE");
    Result[3]=output.getString("TELEFON");
    Result[4]=output.getString("MAIL");
    Result[5]=output.getString("STRASSE");
    Result[6]=output.getString("PLZ");
    Result[7]=output.getString("ORT");
    Result[8]=output.getString("KONTO");
    Result[9]=output.getString("INSTITUT");
    Result10=output.getString("BLZ");
    JCO.releaseClient(client);
    return Result;
    &#65321;am not sure that works. But you can try it. and reply me to tell if it really works as i think.
    Hope helps.
    Amao

  • How to get missing records from one table

    I have one table with many records in the table. Each time a record is entered the date the record was entered is also saved in the table.
    I need a query that will find all the missing records in the table.
    so if I have in my table:
    ID          Date          Location
    1           4/1/2015        bld1
    2           4/2/2015        bld1
    3           4/4/2015        bld1
    I want to run a query like
    Select Date, Location FROM [table] WHERE (Date Between '4/1/2015' and '4/4/2015') and (Location = bld1)
    WHERE Date not in
    (Select Date, Location FROM [table])
    and the results would be:
    4/3/2015   bld1
    Thank you

    Do you have a table with all possible dates in it?  You can do a left join from that to your above mentioned table where the right side of the join is null.  If you don't have a table with all possible dates you could user a numbers table.
    Below is one way to achieve what you want with a numbers table...
    DECLARE @Table table (ID Int, DateField Date, Location VarChar(4))
    DECLARE @RunDate datetime
    SET @RunDate=GETDATE()
    IF OBJECT_ID('dbo.Numbers') IS NOT NULL 
    DROP TABLE NUMBERS
    SELECT TOP 10000 IDENTITY(int,1,1) AS Number
       into Numbers
        FROM sys.objects s1
        CROSS JOIN sys.objects s2
    ALTER TABLE Numbers ADD CONSTRAINT PK_Numbers PRIMARY KEY CLUSTERED (Number)
    INSERT INTO @Table (ID, DateField, Location)
    VALUES ('1','20150401','bld1')
    ,('1','20150402','bld1')
    ,('1','20150404','bld1');
    WITH AllDates
    as
    SELECT DATEADD(dd,N.Number,D.StartDate) as Dates
    FROM Numbers N
    cross apply (SELECT CAST('20150101' as Date) as StartDate) as D
    select * 
    from AllDates AD
    left join @Table T on AD.Dates = T.DateField
    where ad.Dates between '20150401' and '20150404'
    AND T.ID IS NULL
    LucasF

  • How to select multiple records from a TREE in the table

    HI,
    I have a tree structure which is in the table.When I open the node of the tree,all the subnodes are coming as one-one records in the table.I want to slect multiple record from this table.I applied onLeadSelect for this table,I can select only 1 record from the table.
    Can any one plz suggest me how to select multiple records from the table so that I can get all the data of those selected record.
    Regards
    -Sandip

    Rashmi/Kukku,
    First of all, Thanks for your help!
    Is there any other way in which we can access tables other than using BAPIs or RFCs?
    In my case, there is a table structure which has to be updated with values after validating a key. i don't think there is any RFC available now. do i need to create bapi/rfc for that?
    Krishna Murthy

  • How to update Records from Internal table to u2018Zu2019 table?

    Hi Friends,
    How to update Records from Internal table to u2018Zu2019 table.
    I have records in Internal table , that records want to update on u2018Zmarau2019 Table.
    ( my internal table & u2018 Zu2019 table structures are same.)
    Thanking you.
    Regards,
    Subash

    Hi,
    loop at internal table.
    modify <Z- table > from values < internal table Workarea>.
    if sy-subrc = 0.
      COMMIT work.
    else.
      ROLLBACK waork.
    endif.
    endloop.
    or
    UPDATE <Z- table > from table < internal table Workarea>.
    if sy-subrc = 0.
      COMMIT work.
    else.
      ROLLBACK waork.
    endif.
    Prabhudas

  • How to get multiple records using fn-bea:execute-sql()

    Hi,
    I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
    Regards,
    Nagaraju
    Edited by: user10373980 on Sep 29, 2008 6:11 AM

    Hi,
    Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
    For example:
    fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
    Id Name
    01 XXX
    02 YYY
    03 ZZZ
    I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
    <student>
    <Name>XXX</Name>
    </student>
    I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
    Please suggest.
    regards,
    Venkat

  • Allow multiple records from this table to be displayed in the form is greyed out.

    I'm trying to add a second table to my main data source in an InfoPath 2010 form (database template), but the option to allow multiple records from this table to be displayed in the form is greyed out and I can't select it.
    Can someone please tell me how to correct this? I'm guessing that there might have to be something change in MS SQL because on other occasions I've have not encountered this problem when adding a second table.
    Any help would be greatly appreciated.
    Thanks.

    So I've found a work around, but I still don't know why I'm having the problem in the first place.
    I've been trying to relate the two tables by using the primary key in the parent table to a view of the child table that also includes primary key in the parent, e.g. the ORDER ID in the order table relating to the ORDER ID in the view of the order detail
    table. For whatever reason whenever I did that InfoPath prohibited the data source from returning multiple order details.
    My work around is to use views of both the order table and order details table that include the customer ID and to relate the two table in InfoPath using the customer ID. Now I get a data source that allows multiple order detail records. In order to get
    just the order details that I want that relate to a particular order, I use a rule that sets the order id in both the order and order details query data sets before executing the query (as opposed to just the order data set).
    Hope that's a clear explanation.

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • Inserting records from internal table to database table

    Hi all,
    i want to insert records from internal table to zDatabase table, can u plz guide me which statement is better in performance to insert the records.
    1) insert one by one record from internal table
    loop at itab.
    insert ztable from wa.
    endloop.
    2) insert total records at a time
    INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
    or let me know if any other statement is there with high performance.
    i internal table contains nearly 40000 records.
    thanks.

    Hi,
    Insert the entire table at atime rather than a record so as to increase the performance.
    you can use INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
    or
    MODIFY ZPRODUCT FROM TABLE GI_AFPO.
    Regards,
    Raj.

  • How can i fetch records from 3 tables in a single query  without using join

    Hi.
    Can any body please tell me <b>How can i fetch records from 3 tables with a single query  without using joins</b>
    Thanx
    prabhudutta

    Hi Prabgudutta,
    We can fetch the data by using the views concept.
    Go throuth this info we can know the how to create view and same like database table only we can fetch the data.
    Views conatin the data at runtime only.
    Four different view types are supported. These differ in the
    way in which the view is implemented and in the methods
    permitted for accessing the view data.
    Database views are implemented with an equivalent view on
    the database.
    Projection views are used to hide fields of a table (only
    projection).
    Help views can be used as selection method in search helps.
    Maintenance views permit you to maintain the data
    distributed
    on several tables for one application object at one time.
    step by step creation of Maintenance view:
    With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
    It can be set in transaction SE11 - Tools - Table maintenance generator.
    Table maintanance Generator is used to manually input values using transaction sm30
    follow below steps
    1) go to se11 check table maintanance check box under attributes tab
    2) utilities-table maintanance Generator-> create function group and assign it under
    function group input box. Also assign authorization group default &NC& .
    3) select standard recording routine radio in table table mainitainence generator to move table
    contents to quality and production by assigning it to request.
    4) select maintaience type as single step.
    5) maintainence screen as system generated numbers this dialog box appears when you click on create button
    6) save and activate table
    One step, two step in Table Maintenance Generator
    Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
    Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
    SM30 is used for table maintenance(addition or deletion of records),
    For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
    Sm30 is used to maintain the table ,i.e to delete ,insert or modify the field values and all..
    It creates the maintenance screen for u for the aprticular table as the maintenance is not allowed for the table..
    In the SE11 delivery and maintenance tab, keep the maintenance allowed..
    Then come to the SM30 and then enter the table name and press maintain..,
    Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
    Then create,,,
    Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
    We use SM30 transaction for entering values into any DB table.
    First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
    Then it will create a View.
    After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
    Hope this resolves your query.
    Reward all the helpful answers.
    Rgds,
    P.Naganjana Reddy

  • How to delete a record from BSEG table

    Dear Experts,
    How to delete a record from BSEG table.
    If there possible to delete some records from transparent table ?
    Please help.
    Regards,
    Tan

    Hi,
    Deleting a record from a standard table can be done only if table maintenance exists - Cehck tcode - SM30.  But it is not advisable to delete records, coz the records may be dependent on many other tables.  If u delete in a single place, there may be chance that inconsistency in the data happens and hence will affect ur financial statements.
    Pls. assign points, if useful
    Regards,
    Sridevi

  • To delete duplicate records from internal table

    hi friends,
    i have to delete records from internal table based on following criterion.
    total fields are 7.
    out of which  if 4 fields are same and 5th field is different,then both records must be deleted.
    in case all five fields are same,the program should do nothing.
    for example.
    if there are 3 records as follows
    a1 b1 c1 d1 e1 f g
    a1 b1 c1 d1 e2 w r
    a1 b1 c1 d1 e1 j l
    then first two records should be deleted as four fields are same but fifth(e) field differs.
    but third record should remain as it is evenif first five fields are same for first and third record.
    values of last two fields need not to be consider for deleting the records.

    LOOP AT ITAB.
      V_FILED5 = ITAB-F5. "to compare later
      V_TABIX = SY-TABIX. "used to delete if condition not matches
      READ TABLE ITAB WITH KEY F1 = ITAB-F1
                               F2 = ITAB-F2
                               F3 = ITAB-F3
                               F4 = ITAB-F4.
      IF SY-SUBRC = 0.
        IF ITAB-F5 <> V_FIELD5.
    *--both the records to be deleted,as Field5 is different.
          DELETE ITAB INDEX SY-TABIX. "deletes that record
          DELETE ITAB INDEX V_TABIX. "deletes the current record
        ENDIF.
      ENDIF.
    ENDLOOP.
    Message was edited by: Srikanth Kidambi
    added comments
    Message was edited by: Srikanth Kidambi

Maybe you are looking for