Display all record in case of null parameter OR selecting "ALL"

hi all,
I want to show the all records in the report in case the user give empty parameter Or "ALL" from the parameter list.
I used such the way in the query:
select item
from item_master
where ITEM_ID = NVL(:P_ITEM,ITEM_ID);
its working good but now I want to give the "ALL" in the list of parameter form. so when the user select the "ALL" then the all items to be displayed.
thanks
Muhammad Nadeem
[email protected]

Hello,
You can use the following SQL Query :
select item
from item_master
where (:P_ITEM='ALL' or ITEM_ID = NVL(:P_ITEM,ITEM_ID);)
as long as :P_ITEM has a "type" compatible with a string ...
Regards

Similar Messages

  • Display different record in ALV Grid after provide different selection

    Hi All,
    I am a newbie.
    This is my situation:
    Firstly, on dropdown list, I select 'Annual'. Then, the alv grid display all records for 'Annual'.
    Then, I select 'Sick', I'd like to use the same ALV Grid to display all records for 'Sick'.
    I'd like to know if this is doable. If yes, can you show me some sample of coding which I can use as references.
    If it is not possible, I'd like to ask for y'all opinion whether it is efficient to use different ALV Grid for different selection?
    Hope to hear from you soon. Thank you very much.

    This is the snippet of the code:
    if l_rbtlvreqlvid = 'X'.
            "search based on leave id
            select *
            into gw_leave
            from zabmd_leave
            where lv_id = l_lvreqlvid.
              append gw_leave to gt_leave.
            endselect.
            if g_lvreq_cus_cont is initial.
            create object g_lvreq_cus_cont
                exporting
                  container_name = 'L_LVREQCONT2'.
              create object g_lvreq_alv_grid
                exporting
                  i_parent = g_lvreq_cus_cont.
              g_lvreq_alv_grid->set_table_for_first_display(
              exporting
                  i_structure_name              = 'zabmd_leave'
              changing
                  it_outtab                     = gt_leave
              exceptions
                  invalid_parameter_combination = 1
                  program_error                 = 2
                  too_many_lines                = 3
                  others                        = 4
              if sy-subrc <> 0.
                message id sy-msgid type sy-msgty number sy-msgno
                           with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              endif.
              call screen 222.
        else.
            g_lvreq_alv_grid->refresh_table_display(
               exceptions
                 finished       = 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.
              call screen 222.
    endif.

  • Display all records from 4 select list

    Hi,
    trying to associate 4 select list where i could display all records from a list linked to an other list.
    1./ Created an item for each select list
    P1_employee_name
    P1_departments
    P1_employee_type
    P1_locations
    2./Set both null and default values to '-1' for each item
    3./Associated these items to source columns in the Region:
    where employee_name=:P1_employee_name
    or :P1_employee_name ='-1'
    and departments=:P1_departments
    or :P1_departments ='-1'
    and ......
    When running the report, couldn't display all records from a given list associated to an other list.
    e.g: Display all emp and type of emp for sales dept in Paris.
    Thks for your help

    I believe the issue is that you need to group your predicates such as:
    where (employee_name=:P1_employee_name
    or :P1_employee_name ='-1')
    and
    (departments=:P1_departments
    or :P1_departments ='-1')
    Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.

  • How to display all incorrect records in PSA

    Hello,
    Is there a shortcut to display all the incorrect records in PSA. I am aware of a particular value that has been posted incorrectly and we're pulling over a million records from R/3. Each time i run the update, it fails due to the same data value error. This is prod env and i'm running delta init after a transfer rule change.
    Pls. help.
    Malli

    Hi malli
    I was facing the same problem. But i just asked my end user to make the changes in his data entry so that there were no errors while extraction itself.
    One more thing what you can do if u know the exact data error is to write one select statement on the PSA table where the condition is the error what ur facing daily. There are no other shortcuts to see a error record in PSA unless untill u face problem while updating the data target. in that case the record in PSA will be in in status red and you can filter for this record.
    Hope i made certain things clear. Please post if u r not convinced.
    Regards
    Sriram

  • How can I display all records as a end user?

    I am applying for jobs with the state and every week they publish a list of new positions that have just been posted on the following link: https://forms.spb.ca.gov/bulletins/weekly.cfm
    and also at http://jobs.spb.ca.gov/wvpos/search_p_ejv.cfm?classcode=5393&criteria=associate%20governme ntal
    It is a .cfm but only displays 15 records at a time, I was wondering if there is a tag or way to have it display all 300 something records at once?  My ultimate goal is to get just the full table into a excel spreadsheet while retaining the HTML formatting so the links still work.
    My thought is that the state has set it up this way to only display a set number of records at a time, the data is not private or protected, I am simply seeking a easier way to access it in aggregate.
    Thank you in advance for your suggestions and help!

    I think your best hope is to ask the author of the CFM whether they provide any web service that can get you that data when you call it.  like.
    https://forms.spb.ca.gov/webservice.cfc?method=getJobsPostings&key={key_goes_here}
    There's a chance they may be regulating performance on the resultset, and don't want to return that many records at a time, pagination or not.

  • Form does not display all records from table

    Hi guys
    I modified one form that was based on a signle DB table. I removed certain fields from the table and added some extra fields to that table. Then based on the new table I also modified the form and removed the text items related to old fields in the table and added new text items pointing to the new fields now. II have checked all the new items properties and they have don't seem to be wrong or so. But now the problem is the form does not display all the records from the table. before it used to display all records from the table when qureied but not now. It only certain records from the table containing all new data and also old data but the form does not display other records though I don't see any obvious discrepancy. Remember that the before doing the modifications, I have table back for the old, created another table that contained new records for the new fields, and then I inserted the old records and updated the new table data in the new table with these new table values. So this way I have got my new table. Could someone help why the new modified form fails to display all records from the new table updated table though it display some of them successfully.
    Any help will be appreciated.
    Thanks

    hi
    Set the block property of "Query All Records" to "YES"
    hope it will work.
    Faisal

  • Displaying All Values from a Multiple Value Parameter

    Hi,
    Using XI, I have a parameter field that allows the user to enter multiple values Eg. 01, 02, 13, 14.  I want to create a formula to display all the values the user has selected. 
    Is there a way to do this? 
    Thanks,
    Brian

    join({?Parameter},",")
    creates a string with the items in your parameter separated by commas

  • Database displaying all records when no records are in database

    SEARCH PAGE:
    <form id="searcMennuu" name="searcMennuu" method="post" action="VehicleListing.php">
    <select name="vehicles" id="vehicles">
    <option value="allCars" selected="selected">ALL</option>
    <option value="Sedan">Sedan</option>
    <option value="Jeep">Jeep</option>
    <option value="Motorbike">Motorbike</option> </select> <input name="radioVehicle" type="radio" id="searchSale" value="searchSale" />
    Vehicles for Sale</label>
    <label>
    <input type="radio" name="radioVehicle" id="searchRent" value="searchRent" />
    Vehicles for Rent</label> <input type="submit" name="searchButton" id="searchButton" value="Search" />
    </form> RESULTS PAGE:
    mysql_select_db($database_ddd, $ddd); $query_rsTest = "SELECT `year`, `model` FROM vehicles";
    if (isset ($_POST ['vehicles'])) {
    $parSearch = mysql_real_escape_string ($_POST['vehicles']);  if($_POST['vehicles'] == "Sedan"){
    $query_rsTest.= " WHERE vehicle_type LIKE '%$parSearch%'";
    } $rsTest = mysql_query ($query_rsTest, $ddd) or die(mysql_error());
    $row_rsTest = mysql_fetch_assoc ($rsTest);
    $totalRows_rsTest = mysql_num_rows ($rsTest); <div class="showPage"><?php echo $totalRows_rsTest ?></div><?php do { ?>
     <?php if ($totalRows_rsTest > 0) { // Show if  recordset not empty ?> 
    <div class="output" id="Results">
    <p><?php echo $row_rsTest['year']; ?></p>
    <p><?php echo $row_rsTest['model']; ?></p>
    </div>
    <?php } // Show if recordset empty ?>
    <?php } while ($row_rsTest = mysql_fetch_assoc($rsTest)); ?> 
    1. I think i found out why the hide region is not working, whenever i search for something that is not in my database or does not satisfy my search criteria the results page is displaying all records in the database. However i don't know how to fix that. Can someone please help me?
    2. Also i'm trying to find out how i would display ALL vehicles in my database either for rent or sale, i dont have a field in my database for "ALL" so i'm not sure where to start. Thanks in advance

    Which BOBJ version do you use?
    Which kind of data source are you retrieving data from?
    Regards,
    Stratos

  • Displaying all the records in a tabular form on a single page

    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.
    Some help will be much appreciated.
    Regards
    Leckraj

    leckj wrote:
    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.Pagination settings are cached for the duration of the session. For this change to be instantly visible, either log out, restart the brower, and log in again, or manually re-request the page from the browser address bar, adding 'RP' in the ClearCache position in the URL.

  • Query not displaying all records when execute it first tme

    Hello,
    i have an issue with the WEBI report.when i run  the report first time it's displaying only few records, but when i run the same report second time it's displaying the more records and it's correct.
    Could any one tell me why it's not displaying all records when i execute first time.
    Thanks in advance for your help.
    Regards,
    Prathap

    Which BOBJ version do you use?
    Which kind of data source are you retrieving data from?
    Regards,
    Stratos

  • Parameter List displaying all the values on Parameter form

    Dear All...If I uncheck the "Restrict List to predetermined values" option, then report parameter form displays all the values on web parameter form instead of displaying those values in the List Item. Is it the Default behaviour of Oracle Reports 10g or Can I control it anyway because if I've 1000 entries in a list, then displaying all those values openly on the form is an ugly thing and it increases the size of parameter form very much.

    Hello,
    A solution is provided in the Note :
    Note.465886.1 How to Implement an Alternate Solution to Unrestricted List Of Values (LOV) in Parameter Form on the Web:
    regards

  • Shell Script parameter $0 displays all concatanates all defalut parameter values

    I have a issue.The $0 is displaying all the default parm values. Pls suggest workaround:
    echo ‘Printing parameters….’
    echo ‘0:’$0
    echo ‘1:’$1
    echo ‘2:’$2
    echo ‘3:’$3
    echo ‘4:’$4
    echo ‘5:’$5
    echo ‘FCPLOGIN:’$FCP_LOGIN
    echo ‘Finished printing parameters.’
    echo ‘FCP_USERID:’$FCP_USERID
    Printing parameters….
    0:/u01/app/oracle/DEV/apps/apps_st/appl/xxabc/12.0.0/bin/xxabc
    1:xxabc FCP_REQID=684095 FCP_LOGIN=”APPS/APPS” FCP_USERID=1234 FCP_USERNAME=”ABC” FCP_PRINTER=”noprint” FCP_SAVE_OUT=Y FCP_NUM_COPIES=0
    2:
    3:
    4:
    5:
    FCPLOGIN:APPS/SONICDEV1
    Finished printing parameters.
    FCP_USERID:

    How do you call it ?
    What character(s) do you use to suppress the " in the parameters specified ?
    If you call it like this (simplified) :
    program "one two three"
    it will do:
    $0=program
    $1=one two three

  • Display all dates between date range (Time Dimension left outer join Fact)

    All,
    I have done some searching around this issue but within all the posts regarding date variables, date prompts and date filtering I haven't seen one exactly answering my issue (maybe they are and I just dont have my head around it correctly yet).
    My report requirement is to allow a user to select a start day and an end day. The report should show all activity between those two days - AND display 0/null on days where there is no activity. That second part is where I am getting hung up.
    The tables in question are:
    TimeDim
    EventFact
    CustomerDim
    My BMM is setup as follows:
    TimeDim left outer join EventFact
    CustomerDim inner join EventFact
    If I run a report selecting DAY from TimeDim and a measure1 from EventFact with day range 1/1/2010 - 12/31/2010 .. I get a record for every day and it looks perfect because of the left outer join between TimeDim and CustomerDim.
    But .. if I add in a field from CustomerDim, select TimeDim.DAY, CustomerDim.CUSTNAME, EventFact.MEASURE1, OBIEE only returns records for the days that have EventFact records.
    This is due to the fact that the TimeDim is still outer joined into EventFact but adding in CustomerDim makes OBIEE setup an inner join between those tables which then causes only data to be returned where EventFact data exists.
    There is a way around this in this simple case and that is to define the relationship between CustomerDim and EventFact as an outer join as well. This will give the desired effect (but an outer join between these two tables is not the true relationship) and as I add additional dimensions and add additional logical sources to a single dimension in the BMM it gets complicated and messy.
    Ive also messed with setting the driving table in the relationship, etc.. but it has not given the desired effect.
    Has anyone ever encountered the need to force display all dates within a specfied range with a fact table that may not have an entry for every date?
    Thanks in advance.
    K
    Edited by: user_K on Apr 27, 2010 11:32 AM

    It worked!!!* Even my time drill downs and date based filtering still work!
    That is awesome. Never would have thought of that intuitively.
    Now, just need a little help understanding how it works. When I run my report and check the logs I can see that two queries are issued:
    Query 1: Joins the fact table to all the associated dimensions. I even changed all the relationships to inner joins (which is what they truly are). And calculates the original measure. If I copy and paste this query into sql developer it runs fine but only returns those rows that joined to the time dimension - which is what was happening before. It is correct but I wanted a record for every time dimension record.
    Query 2: Looks like the following:
    select sum(0)
    from timedim
    where date between <dateprompt1> and <dateprompt2>
    group by month *<--* this is the time dimension level specified in Query 1, so it knows to aggregate to the month level as was done in query 1
    Final Question: So what is OBIEE doing ultimately, does it issue these two requests and then perform a full outer join or something to bring them together? I couldn't see anywhere in the log a complete query that I could just run to see a similar result that I was getting in Answers.
    Thanks for all the help .. Id give more points if I could.
    K

  • Display one record at a time

    i am trying to display one record from my database on my jsp page per time using next and previous buttons to navigate. I have tried to implement this by putting the resultset in a vector and then tried to tried to dispaly data with no success.Please somebody help ,i been at this for two days with no success.Could someone give a concreate example to guide me

    Please post all code, i dont know how to put my resultset in a vector or arraylist.
    I need a First Previous next and Last link in asp it is called recordset paging or recordset navigation.
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ include file="Connections/connEvents.jsp" %>
    <%
    int index = 0; //or wherever you wish to start
    if((String s = request.getParameter("index")) != null)
    index = Integer.parseInt(s);
    %>
    <%
    Driver DriverrsEvents = (Driver)Class.forName(connEvents_DRIVER).newInstance();
    Connection ConnrsEvents = DriverManager.getConnection(connEvents_STRING,connEvents_USERNAME,connEvents_PASSWORD);
    //PreparedStatement StatementrsEvents = ConnrsEvents.prepareStatement("SELECT * FROM hog_evenementen", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    //StatementrsEvents.setFetchSize(10);
    //ResultSet rsEvents = StatementrsEvents.executeQuery();
    PreparedStatement StatementrsEvents = ConnrsEvents.prepareStatement("SELECT * FROM hog_evenementen");
    ResultSet rsEvents = StatementrsEvents.executeQuery();
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>HD - Evenementen-beheer</title>
    <style type="text/css">
    <!--
    body {
         background-color: #333333;
    -->
    </style></head>
    <script>
    function post(actValue)
    document.MyForm.action.value = actValue ;
    document.MyForm.submit() ;
    </script>
    <body>
    <table width="60%" border="0" align="center" cellpadding="0" cellspacing="0" class="">
    <tr>
    <td><table width="100%" class="" border="0" cellpadding="6" cellspacing="0">
    <tr>
    <td width="175" align="center" valign="bottom" bgcolor="#FF6600" class="">Evenementen-beheer</td>
    <td bgcolor="#333333" class=""><span class=""><span class="formField">
    </span></span></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="6">
    <tr bgcolor="#61ABD0" class="verdana10zwart">
    <td width="4"> </td>
    <td width="512" height="29"> <span class="">Evenementenoverzicht</span></td>
    </tr>
    <tr bgcolor="#61ABD0" class="">
    <td> </td>
    <td><table width="100%" border="0" align="center" cellpadding="6" cellspacing="0">
    <tr class="">
    <td width="252" class="smallText">record 1 van 1 etc moet hier komen <br></td>
    <td width="231" align="left" class="smallText"><table width="50%" border="0" align="center">
    <tr>
    <td width="23%" align="center"> Firs </td>
    <td width="23%" align="center"> <a href="index.jsp?index=<%= (index-10)%>">Previous</a></td>
    <td width="23%" align="center"><a href="index.jsp?index=<%= (index+10)%>">Next</a></td>
    <td width="23%" align="center">Last</td>
    </tr>
    </table>
    <br>
    </td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td>Thema</td>
    <td>Datum</td>
    </tr>
                   <%
                   int rowCount = 0;
                   while(rsEvents.next() && rowCount < 10) {
              rowCount++;
                   %>
    <tr>
    <td><a href="event_crud.jsp?ID=<%= rsEvents.getObject(ID")%">"><%= rsEvents.getObject("thema")%></a></td>
    <td width="231"><%= rsEvents.getObject("datum")%></td>
    </tr>
                   <% } %>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td bgcolor="#CCCCCC"><form action="event_frm_process.jsp" METHOD="POST" name="MyForm" id="MyForm">
    <table width="100%" border="0" cellpadding="6" cellspacing="0" class="verdana10zwart">
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td colspan="2"><span class="kop1"><br>
    Evenement toevoegen </span><span class="formField"><br>
    </span><br>
    <span class="formField"> </span></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td width="107" class="downBorder">Thema:</td>
    <td width="383" class="downBorder"><input name="thema" type="text" id="thema"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder">Omschrijving:</td>
    <td class="downBorder"><textarea name="omschrijving" cols="40" rows="10" id="omschrijving"></textarea>
                   </td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder">Datum:</td>
    <td class="downBorder"><input name="datum" type="text" id="datum"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder">Tijd:</td>
    <td class="downBorder"><input name="tijd" type="text" id="tijd"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder">Lokatie:</td>
    <td class="downBorder"><input name="lokatie" type="text" id="lokatie"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder">Plaatje:</td>
    <td class="downBorder"><input name="plaatje" type="text" id="plaatje"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td class="downBorder"> </td>
    <td class="downBorder"><input name="insert" type="button" id="insert" onClick="post('insert');return false;" value="Evenement toevoegen"></td>
    </tr>
    <tr bgcolor="#CCCCCC">
    <td width="9"> </td>
    <td>
                   <input name="action" type="hidden" class="" id="action" value="">
    <% while(rsEvents.next()){ %>
                   <input name="ID" type="hidden" class="" id="ID" value="<%=rsEvents.getString("ID")%>">
                   <%
                   %>
                   </td>
    <td> </td>
    </tr>
    </table>
    </form></td>
    </tr>
    </table>
    </body>
    </html>
    <%
    rsEvents.close();
    StatementrsEvents.close();
    ConnrsEvents.close();
    %></a>

  • To display total records in a table through Go URL

    Hi All,
    Can anyone give me the solution how to display all the records of a table through Go URL. Actually according to the documentation provided by the oracle or the stuff in the blogs, We can write Go URL to display all the records in a table in two methods.
    1) To change the properties of a table and use the basic Go URL.
    2) Adding Action=Scroll&P5=-1&ViewID=go~Table to the Go URL.
    First one is not a solution in our case, According to our scenario we should not change table properties because If we change the properties and display the whole records in one page... it will impact the performance.
    Coming to the second, we tried to append this part in the report Go URL. But It gave Assertion Failure Error.
    Anybody please provide a solution how to write a Go URL to get all the records in the table.

    Hi All,
    Can anyone give me the solution how to display all the records of a table through Go URL. Actually according to the documentation provided by the oracle or the stuff in the blogs, We can write Go URL to display all the records in a table in two methods.
    1) To change the properties of a table and use the basic Go URL.
    2) Adding Action=Scroll&P5=-1&ViewID=go~Table to the Go URL.
    First one is not a solution in our case, According to our scenario we should not change table properties because If we change the properties and display the whole records in one page... it will impact the performance.
    Coming to the second, we tried to append this part in the report Go URL. But It gave Assertion Failure Error.
    Anybody please provide a solution how to write a Go URL to get all the records in the table.

Maybe you are looking for

  • I Need a PC Detective for..The Strange Case Of My Malfunctioning DVD RW Drive: IT WILL NOT EJECT!

    I can't get this drive to spit out my disc and quit saying error code: There are no factual errors. Here is the play by play summary list regarding my pc's vital stats, events that occurred just Before the problem happened, what happened During the t

  • Hide photo in album

    Ok, I just upgraded to 10.10.3 Yosemite with the new iPhoto, all the photos that I had previously hidden in my albums are shown. Can I hide a photo in an album? Like previous version with the X? And then show the photo when I want to see them? Why di

  • RH 6 Command Line Compiling

    I have downloaded the trial copy of RH6 and I'm trying to generate WebHelp from the command line. This is a project imported from X5. The project compiles properly from within RH, but from the command line I get the error "Warning: No baggage file de

  • Full Screen Caller for C1-01

    Pls, anyone tell me, if there is any option/application/software available for C1-01, to get full screen picture of the person, during incoming or outgoing calls.

  • What is ExternalAuth in psjoa Session connect?

    Hi, I've written a test Java client to connect to PeopleSoft (tools 8.52) using the psjoa.jar as detailed in Programming Component Interfaces in Java[1]. All good, except that this requires me to keep the user's password to use in the connect method.