Displaying multiple records on 1 screen

scenario:
- search dept_head thru dept_id in screen 1 via user input (dept_id)
- screen2 has 2 buttons BACK and NEXT
- if dept_head is only 1:
     BACK - go back to screen 1
     NEXT - exit the screen (im done on this)
- if dept_head is more than 1: (this is my problem)
     BACK - display previous record, if on record #1 back to screen 1
     NEXT - display next record, if last record is reached - exit.
this is my approach...
PAI - 1st screen
no_of_rec = 0
select dept_id
     into v_dept_id     
     from dept
     where dept_id = user_input.
     no_of_rec = no_of_rec + 1.
endselect.
PBO - 2nd screen (I have a loop to display the record(s))
LOOP.
     ' display the records to corresponding fields'
ENDLOOP.
if no_of_rec = 1
     'disble NEXT button'
else
     'enable NEXT and BACK buttons'
endif.
PAI (2nd screen)
rec_num = 1.
case sy-ucomm.
when 'NEXT'.
     rec_num = rec_num + 1
     if rec_num < no_of_rec.
     **i need to display next record in their corresponding fields - - - - how would i be able to do this??
do i need another loop or a select statement..
when 'BACK'.
i also don't know how to display the records in their correponding fields in screen2..
     **please help...
also do i have a mistake in my approach?
thanks so much... hope you could help!

Hi paul,
pls add : next_record;
OPEN prop_cur(:TXT_BACODE);
FETCH prop_cur INTO
:blk_address.txt_ref
,:blk_address.txt_address
,:blk_address.txt_desc
,:blk_address.txt_band_value
,:blk_address.txt_date1 ;
next_record;
CLOSE prop_Cur;
Hope this will work.
Regards
Anu

Similar Messages

  • Display multiple records in forms 6i

    hi every body
    will anybody plz tell me how to display multiple records in tabular view of forms 6i.for example say i have a field in a block of a form.and i have to display multiple records in another block in the same form depending upon the value of the mentioned field in the above block.
    will anybody help me??

    Why are you manually populating your data block when Oracle Forms will do this for you? Oracle Forms is tightly integrated with the Oracle Database. You should just base your Forms data block on the ISSUED table. Then you can filter the records displayed by setting the WHERE Clause property to ID = :BLOCK1.ID or you can dynamically set it with code using the SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE,'ID = :BLOCK.ID') built-in.
    Then, the only code you would need in your Button's When-Button-Pressed trigger would be:
    BEGIN
      GO_BLOCK('BLOCK2');
      EXECUTE_QUERY;
    END;This is the point of InoL's reply. When a Form is based on a table, you can use the "Enter Query" and "Execute Query" built-in features to query and display records.
    Sounds like you might be new to Oracle Forms development. If that is the case, you might want to go through a few Forms Tutorials to learn what Forms can do for you. ;) Just search the internet for "Oracle Forms Tutorials" and you will find many!
    Craig...

  • Can i get multiple records if selection screen is 900 using PROVIDE

    Hi All,
    Iam using following statement for fetching MULTIPLE records from infotype 0008. In Attributes if i declare LDB as pnp and selection screen as 900, then iam not getting any records.
    Instead of th selection screen 900 is empty. then records will getting properly.
    How can i get multiple records if selection screen is 900?
      PROVIDE * FROM p0008
                    between pn-begda and pn-endda.

    Hi Ranjith
    You can use
    PYBEGDA and PYENDDA instead of PN-BEGDA AND PN-ENDDA.
    Regards
    Muneer.VK

  • To display multiple records in smart form

    hi,
    In the smartform how to use  the LOOP option to display the multiple records .

    Two possible reasons,
    Here is a very good code sample for using Template,Table,Loop in smartforms with screen shot
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Please do not post multiple threads. Kindly reward point and close the duplicates.
    Regards
    Kathirvel

  • Display multiple records as sub-sections in the same report.

    I am using Crystal Reports (VS-2005).
    In a report, I have various sub-sections in the Details section. Each section represents a category and is connected with SQL command which uses LEFT OUTER JOIN.
    The first section is the main section and the subsequent sections are the child sections.
    Sometimes, a sub-section (other than the first main sub-section) picks multiple records of that category. In this case the report extends to multiple pages. Each report displays one record of this sub-section.
    I want to show the the same sub-section multiple times in the same report as opposed to multiple reports that are now automatically generated by Crystal Reports.
    How to handle this issue?

    This is a .NET programming forum related to Crystal Reports. Your question is best suited for our report design forum below. Also, when you post your question it will be helpful if you use report design terminology. We have elements like Report Header, Page Header, Groups, and Details sections. Just mentioning "sections" doesn't give us a good idea about what you are attempting to do.
    Check out the grouping options and see if it helps. You might need to create a formula to help you with your grouping though.
    If you like, I can move this to the design forum.
    [SAP Crystal Reports Design|SAP Crystal Reports;

  • Can I use a cursor to display multipla records (just as an EXECUTE_QUERY)?

    is it possible?
    so I can display about 10 records at the same time in a block (in forms)
    just like a tabular form?
    using a cursor, fetch, etc.

    what I want is this...
    do you see when in a tabular forms (multiple records, i.e 5 records at the same time).
    if you press F8 (execute query), it will fetch all records.
    ok, now instead of using the execute_query key, how can I get the same thing by using cursors?

  • Display multiple records with CSS

    PHP MySQL
    I have a MySQL table with several columns and multiple
    records... it is easy
    to display these records in a <table> using the repeat
    record server
    behavior applied to the <tr> that displays the records.
    I would like to do this with CSS and eleminate
    <table>'s
    My question is can this be done displaying the records in a
    <div> using the
    repeat record server behavior?
    Or is this just one of those things that a <table> is
    required?
    Jeff

    Displaying rows of data is actually the reason tables were
    originally
    invented. :)
    You need a table with the number of columns for your data and
    two rows. The
    first row is for the column headers. The second row is for
    the PHP
    placeholder that will be replaced with data. Apply the repeat
    region to
    this second row either for all rows or the number of rows you
    desire to
    display on one page .. in which case you would also use
    recordset paging.
    (previous, next)
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
    A Beginner''s
    Guide, Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "Jeff" <[email protected]> wrote in message
    news:erindt$i70$[email protected]..
    > PHP MySQL
    > I have a MySQL table with several columns and multiple
    records... it is
    > easy to display these records in a <table> using
    the repeat record server
    > behavior applied to the <tr> that displays the
    records.
    >
    > I would like to do this with CSS and eleminate
    <table>'s
    > My question is can this be done displaying the records
    in a <div> using
    > the repeat record server behavior?
    > Or is this just one of those things that a <table>
    is required?
    >
    > Jeff
    >

  • How to Display multiple records in Table in VC without using BAPI.

    Hi All,
    I am working on Visual composer (NW2004s SP10). I am trying to display Poitems from BAPI_PO_GETDETAIL. I am creating my front end using VC. I have created one form and one Table where I want to display POItems. I am writing my logic of retrieving data from BAPI in CAF.I am connecting them in Guided procedures.When I run my process in Guided Procedures I am getting single row displayed in table. Can Anyone help me how to display multiple rows in table.
    Regards,
    Sheetal

    Hi Sheetal,
    if the BAPI returns a table, then you get multiple rows. From which system is the BAPI, so that I can check the BAPI to give you further information.
    Best Regards,
    marcel

  • How to display multiple records in a block text items

    Can fetching be done to dispplay multiple records in the text items base on the query.

    put the code in post-query trigger

  • How to create Form based on a table to display multiple record

    Hello All,
    Would somebody please tell me how to create a Form based on a single table ,
    to view and insert multi record based on a single table.In other words I would like
    to have a form as shown below ,where the users can Insert,update,delete,query and so on
    Item Id PArt Number List Price
    100 Item-1 $120.oo
    200 Item-2 $150.00
    300 Item-3 $50.00
    I know I can do it as Single Record block using Tabular Format,but multiple record ?????
    Thanks in Anticipation
    Babu

    Try this method,
    1. Creat a Master Detail Form (Custom Layout and not tabular)
    and in the master block select one field.
    2. In the HTML layout for master remove the reference for
    that field(so that nothing will appear in the master block
    of the form).
    3. Before the update (in the Pl/SQL event handler select the 'Save' event and write the following code to avoid updating master block).
    p_session.set_value(p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'MASTER_ACTION',
    p_value => 'None');
    doSave;
    For eg, let's say
    Master is from 'Dept' table and Detail is from 'Emp' table(with join condition Dept.dept_id = Emp.dept_id). In the master remove everything except dept_id field and in the HTML layout for master remove the reference of the dept_id field(you cannot remove this field physically from the master layout). Now the form will look like multirow form rather than master detail form but only problem with this workaround is 'Detail Action' will be present in the detail block.
    I hope this will help you.
    Thanks
    -Krishnamurthy

  • How to display multiple records in smart forms in new page for each record

    Hi,
              How to display the data from a internal table in a smart form.
    I want each record to be displayed in seperate page.
    please tell me with example.
    thank u,
    Sarath

    Do this ,
       in the main window - open a loop on your internal table ,
    within the loop open the text and give the output fields,
    after this text  use the Command node and in this set the next page as page1,
    so when the loop gets executed its first record will be on the first page and the second record will be on the next page and so on ..
    Reward to usefull answers.

  • Failure to display multiple lines om editor screen

    I converted a form from v 4.5 to 6I. This form(in v 4.5)for a text item that was associated to a editor had a value in the mulit-line property of the property palette = 'False', yet in the 4.5 version multi lines on the editor screen have always been displayed.
    When I converted this same form to 6I, the multi-lines property value was set to 'No'. When I ran the form under 6I, the display of the editor screen was limited to a single line instead of displaying the multi-lines.
    I changed the property for multi-lines from 'No' to 'Yes' and then the multi-lines were displayed under 6I. It appears to me that 4.5 did not care what the value for the multi line property was since it displayed multi-lines even with the value = to 'False'.
    It appears in 6I it does care what the value is since I had to change the value from 'No' to 'Yes'. Is this the case? If it is that's disturbing since we have many forms that utilize an editor and that would mean I have to go into each form and change that value.
    Am I missing something here?
    Any help would be appreciated.

    This is a bug and has been fixed in Patch 3a.
    Apply this patch (Forms 6.0.8.12.x) and it will work.
    Abhijith Unnikannan,
    Oracle Support Services

  • Display multiple records into one deliminated record

    If I have a table with two columns such as:
    create table test(
    id number(10),
    name varchar2(30)
    Say the example data in the table is:
    id name
    1 John
    1 David
    How can I select the data from sqlplus and return the record in the following format
    1 John,David
    instead of
    1 John
    1 David
    What's the select statement looks like? Thanks.

    or you could put it this way...
    SQL> SELECT a.id, a.name||','||b.name Name
    2 FROM test a, test b
    3 WHERE a.id = b.id
    4 AND a.name <> b.name
    5 AND a.ROWID = (SELECT MIN(ROWID) FROM test WHERE id = a.id);
    ID NAME
    1 John,David
    2 Neil,Craig
    SQL>
    the position of how the names (i.e. John, David or David, John) are presented would depend on the sub-query for ROWID (either use MAX or MIN function). I think the later query would match with that of your requirement.

  • Display multiple record block in multiple canvases

    Hi,
    I am facing a problem while creating multiple canvases with the same blocks.
    I have block A, B, C. Block B and C are detail of A. I want items from blocks B and C to appear in multiple canvases. I tried doing the synchronize with item. It works fine but I cannot see the scrollbar in other canvas. Is it possible to show scrollbar in multiple canvases?
    Thanks in advance.
    DK

    If you mean that you want the scrollbar of the same block to be appeared on multiple canvases where items of this block are placed in different canvases... unfortunately... you cannot....
    Greetings...
    Sim

  • Display multiple records based on checkbox selection

    Hi - I have a cfm page that displays all the employees in the
    company (select * from employee). I have a checkbox next to each
    one of the employee name. I want the users to be able to select the
    checkbox and view phone number of selected employees (select
    phone_number from employee where emp_id = 12, 15, 18, 20, 31) I
    know I'll have to use some kind of loop to pick these employees and
    display ... but I don't know how to write that loop ... can
    somebody please help!
    - Amber

    The code below should help you out.

Maybe you are looking for

  • Unable to install updates on Adobe Acrobat X Pro

    Apparently I'm yet another person who can't do it.  I keep getting an error message along the lines of "file not found."  The program's definitely there.  I use it frequently -- just can't get any updates.

  • Creating and accessing a Table control using  CL_TABLE_VIEW_MM

    Hi everybody.,         I am new to Module Pool Programming using Abap Object Oriented Programming .I need to create a Table Control in my Screen .I debugged the standard ME21n Tracsaction and found that it used class  CL_TABLE_VIEW_MM  .How can i mak

  • InDesign Crashing When Exporting a Large Book

    I have a large InDesign book (159 documents) that recently started crashing when I export the whole thing. The book was created years ago, and I can't figure out what would cause this issue all of a sudden. Originally, I thought this was due to the l

  • Writing a bash.bashrc?

    In debian and ubuntu you could have a file called bash.bashrc in /etc which (I think) was the only file launched when a terminal instance is launched. You usually (it's normally configured during install) set it to look for a ~/.bashrc and launches i

  • Can't find button to accept license agreement

    Just downloaded reader 9.0. When I tried to use it, the license agreement poped up and it says to press the accept button to continue BUT there is no accept button anywhere on the page, so what do I do?