Drop down list item to select date

I am using oracle form 6i, i want to use drop down list item to select date
I was able to manipulate my codes to get values for the three drop down list items year, month and day
but at when list change trigger on month to populate day , it populated accordingly but at point if I selected other month, it added the days of the new month selected to
the days of already selected month. And delete list_element command failed to provide solution..
Can any one help me out -- <email address removed by moderator so that you won't get spammed for all Eternity>

1976 as year and march as month
declare
last_date date;
nDays number;
cursor days(v_last_date in date,vnDays in number) is
select first_day(v_last_date)+rownum-1 sdate from dual
connect by rownum<vnDays+1;
begin
select last_day(to_date(monthITEM||yearITEM,'MonthYYYY')) from dual;
// the month is in the monthITEM
// the year is in the yearITEM
// last_day will have the last day of that month.
//now you have to find the no. of days.
select to_char(last_Date,'dd') into nDays from dual;
for dates in days
loop
add_list_element(listname,dates.sdate,dates.sdate,1);
end loop;
end;

Similar Messages

  • Drop Down list in table with data from database table

    Hi,
    I have created an interactive form in WD ABAP.
    In Context tab I have created the nodes as follows:
    ZSOHEADER node with cardinality 1..1
    |-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
    I am fetching data from MARA table into an internal table IT_MARA.
    The node MATERIAL is bound to internal table IT_MARA.
    I have created a table with property ' Body rows vary depending on data ' .
    I have only one row in table. The first cell of the row is a drop down field.
    I have bind the field to the node MATERIAL->DATA->MAKTX.
    Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
    I want only one row with the drop down list containing all values of the internal table.
    Kindly suggest what to do.
    Regards,
    Vinod

    Hi,
    In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    TEXT TYPE SOMETYPE,
    VALUE TYPE SOMETYPE,
    END OF TY_UOM.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
    WA_TABLE TYPE TY_TABLE.
    SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And in the Adobe Form Layout
    Go to Menu of the Adobe LiveCycle Designer:
    Tools>Options..>DataBinding
    In that window you just check the Show Dynamic properties Check Box.
    Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
    OR
    From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
    OR
    We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
    Regards
    Pradeep Goli

  • Can a drop down list item be multi line?

    got (another) problem.
    Client has asked me to add a new drop down list of reference codes. Some of these codes are very long - the biggest one reaching 3 lines A4 width.
    So testing it as a pdf I notice that anything that goes beyond the visual area of the dropdown shows as a pop-up box for the user to select - which is nice - at least they can see the entire content. Unfortunately, when they select this item it cuts off most of the content and the same happens when the form is printed.
    Ideally, if the entry is selected it would be great for it to appear in multi lined format so it can be entirely visible/printed - is this possible?
    If not, any other ideas. The list is about 20 entries deep and although I could just have it as a list with checkboxes I'd rather keep the form as succinct as possible.
    Thanks,
    Sunil

    Hi radzmar,
    Your links sounds like it's the right answer for me. Unfortunately, the correct answer has a link to a file that keeps bouncing me to the adobe.com from page so I can't see the code or any other information apart from the lo res screen shot. Can you help me any further?
    Many thanks,
    Sunil

  • Drop Down List in Query Selection Screen Takes Long Time.

    I open a report, refresh the query and get a selection screen. But when clicked on the drop down list it takes 4- 5 mins for displaying the drop down options.
    How can I speed up the displaying of drop down list in selection screen?
    Could any one please help regarding the setting to enable this?
    Thanks.

    Hi,
    I guess there is a setting to look up the master data tables or use the dimension,which would speed up the time that it takes to display the drop down selections
    Do you have any idea about the setting?
    Thanks.

  • Web Service with Drop Down Lists for database selections

    Hello,
    I want to define a Web Service with the JDeveloper which can do the following.
    I´ve got a database table with several columns which represents a customer adress and name.
    On a WebSite I like to have three Drop Down Lists to search in that table. The first list should include the field "name". When I select a name there the second list should show all streets (field "street") where people with the selected name live. When I select the street the third list should show me the house numbers (field "hn") of the customers with the selected name and street.
    What have I to do to define a application, a project and so on?
    Many Thanks!

    Hello,
    This question is not directly related to Web Services, since in this case you can consider that the Web Service is your "model" providing data to your view (JSP). One of the question I would like to ask you is: why do you want to use a Web Service to do that? and how you want to deploy this?
    In a general manner, if you use Web Service it is to be able to reuse the business logic in other projects, so based on this statement I would create a specific project that will contain you "model" so all your services.
    The to consume it from your JSP you have different ways:
    - create a Java proxy, or use @WebServiceRef to call the client
    - use Javascript to call the service directly from the HTML page, take a look to the Oracle Web Service endpoint page, where you can see some Javascript stub links.
    Please give more details about your project and needs and I will try to give you a proper answer.
    Regards
    Tugdual Grall

  • Help with multipule drop down lists in a select query

    Hi I am trying to design a search query using 5 drop down lists coming from tables.  the front end looks like this
    I have the selections going to variables then by $_POST into the msqyl query my other code is
    MY CODE FOR THE FORM IS
      <form action="horse-events-devon.php?url_countyid=<?php echo  urlencode ($url_countyid ['url_countyid'])  ; ?>&go" method="POST">
        <table id="searchtable">
          <tr>
            <th>Find By Discipline</th>
            <th>Find By Venue</th>
            <th>Find By Championship</th>
            <th>Find By Organiser</th>
            <th>Equine Association</th>
            <th>Submit Your Selections</th>
            </tr>
          <tr>
            <td><select name="dis_id">
                                        <?php
                                            $upcomingdis = upcomingdis($url_countyid);
                                            $upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_dis_bycounty ['dis_id']; ?>" >
                                        <?php echo $upcoming_dis_bycounty ['dis_description']; ?></option>
                                        <?php
                                        } while ($upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis));
                                        ?></select></td>
            <td><select name="ven_id">
                                        <?php
                                            $upvenbycounty_set = upcoming_venevents_bycounty($url_countyid);
                                            $upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_ven_bycounty ['ven_id']; ?>" >
                                        <?php echo $upcoming_ven_bycounty ['ven_name']; ?></option>
                                        <?php
                                        } while ($upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set));
                                        ?></select></td>
            <td><select name="champ_id">
                                        <?php
                                            $championship_set = findchampionships();
                                            $champlist = mysql_fetch_assoc ($championship_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $champlist ['champ_id']; ?>" >
                                        <?php echo $champlist ['champ_description']; ?></option>
                                        <?php
                                        } while ($champlist = mysql_fetch_assoc ($championship_set));
                                        ?></select></td>
            <td>
            <select name="org_id">
                            <?php
                                $uporgbycounty_set = upcoming_organevents_bycounty($url_countyid);
                                $upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set);
                            ?>
                            <?php
                            do {
                            ?>   <option value="<?php echo $upcoming_org_bycounty ['org_id']; ?>" ><?php echo $upcoming_org_bycounty ['org_name']; ?></option>
                            <?php
                            } while ($upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set));
                            ?></select>
            </td>
            <td><select name="***_id">
                                        <?php
                                            $upassbycounty_set = upcoming_assevents_bycounty($url_countyid);
                                            $upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $upcoming_assbycounty ['***_id']; ?>" >
                                        <?php echo $upcoming_assbycounty ['***_description']; ?></option>
                                        <?php
                                        } while ($upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set));
                                        ?></select></td>
              <td><input name="submit" type="submit" /><input name="countyid" type="hidden" value="<?php echo $url_countyid ['url_countyid']; ?>" /></td>
            </tr>
          </table>
      </form>
      <?php
    if (isset($_POST['submit'])){
        if (isset($_GET['go'])){
        $countyid = $_POST['countyid'];
        $ven_id = $_POST['ven_id'];
        $dis_id = $_POST['dis_id'];
        $champ_id = $_POST['champ_id'];
        $org_id = $_POST['org_id'];
        $event_id = $row['event_id'];
            $sql = "SELECT DATE_FORMAT (events.startdate, '%a, %d, %b')
                       AS stdate, events.event_id, events.title, events.ven_id, events.org_id,
                       venue.county_id, venue.ven_id, eventdisciplines.event_id, eventdisciplines.dis_id, county.county_id, discipline.dis_id \n"
                . "FROM events \n"
                . "LEFT OUTER JOIN eventdisciplines \n"
                . "ON events.event_id = eventdisciplines.event_id \n"
                . "LEFT OUTER JOIN discipline \n"
                . "ON eventdisciplines.dis_id = discipline.dis_id \n"
                . "LEFT OUTER JOIN venue \n"
                . "ON events.ven_id = venue.ven_id \n"
                . "LEFT OUTER JOIN county \n"
                . "ON venue.county_id = county.county_id \n"
                . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n"
                . "AND events.startdate > NOW()\n"
                . "AND venue.county_id = {$countyid}  \n"
                . "ORDER BY startdate ASC";
        $result = mysql_query ($sql, $connection);
    ?>
    My problem is at the WHERE point,  how do I code for single and multipule selections,  The       . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n" throws and error.
    How am I best programing this type of query,  ??  Should it be with php ??

    The best thing is to dynamically build your where clause based on the user selection. Test the values of all form fields and if the user does not make a selection, do not include that in the where clause.
    Trying to build a single, static where clause that accounts for all possible user input permutations is extremely difficult.

  • How to populate active directory users in to drop down list items dynamically in Share point 2010 ?

    Hi My self Arun in my current project i have a task on that active directory user  need to automatically populate in share point list drop down  please help me.  is that any out of box feature in share point 2010 ?   
    Thanking You 
    Arun 

    Arun,
    If you plan to implement the "Querying the Active Directory" based on my code snippet,
    and if you do not have permission [your account must be the part of domain admin] to do so,
    Then still you can do it in least effort through code,
    string usersInXml = SPContext.Current.Web.AllUsers.Xml;your xml string look like this.
    <Users><User ID="2" Sid="" Name="Administrator"
    LoginName="i:0#.w|murugesan\administrator" Email="" Notes="" IsSiteAdmin="True" IsDomainGroup="False" Flags="0" /><User ID="1" Sid="" Name="Murugesa Pandian" LoginName="i:0#.w|murugesan\murugesan" Email="" Notes="" IsSiteAdmin="True" IsDomainGroup="False" Flags="0" /><User ID="1073741823" Sid="S-1-0-0" Name="System Account" LoginName="SHAREPOINT\system" Email="" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" /></Users>
    You can user Linq to XML to filter the "LoginName,Name and Email and then populate your drop down list.
    * User must be logged into the site at least once.
    Murugesa Pandian.,MCTS|App.Devleopment|Configure

  • Drop down list in selection screen.

    hello there,
    How to get a drop down list box in selection screen and in module pools.
    explain also, how to populate some data into that.

    *& Report  ZSREE_DROP                                                  *
    REPORT  ZSREE_DROP                    .
    TABLES : LFA1,EKKO,EKPO.
    TYPE-POOLS : VRM.
    DATA I1 TYPE I VALUE 0.
    DATA  : BEGIN OF WA_LFA1,
            LIFNR TYPE LIFNR,
            NAME1 TYPE NAME1,
            END OF WA_LFA1.
    DATA IT_LFA1 LIKE TABLE OF WA_LFA1.
    DATA : BEGIN OF WA_EKKO,
           EBELN TYPE EBELN,
           END OF WA_EKKO.
    DATA IT_EKKO LIKE TABLE OF WA_EKKO.
    DATA : BEGIN OF WA_EKPO,
           EBELP TYPE EBELP,
           END OF WA_EKPO.
    DATA IT_EKPO LIKE TABLE OF WA_EKPO.
    DATA : BEGIN OF WA_VRM,
           KEY(40) TYPE C,
           TEXT(80) TYPE C,
           END OF WA_VRM.
    DATA IT_VRM LIKE TABLE OF WA_VRM.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'PDOC'. "fctcode for first list box
    CLEAR IT_EKKO.
    SELECT EBELN INTO TABLE IT_EKKO FROM EKKO WHERE LIFNR = LFA1-LIFNR.
    CLEAR IT_VRM.
    LOOP AT IT_EKKO INTO WA_EKKO.
    WA_VRM-KEY = WA_EKKO-EBELN.
       WA_VRM-TEXT = WA_EKKO-EBELN.
       APPEND WA_VRM TO IT_VRM.
    CLEAR WA_VRM.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'EKKO-EBELN'
        VALUES                = IT_VRM
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 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.
    WHEN 'PITEM'. "fctcode second listbox
    CLEAR IT_EKKO.
    SELECT EBELP INTO TABLE IT_EKPO FROM EKPO WHERE EBELN = EKKO-EBELN.
    CLEAR IT_VRM.
    LOOP AT IT_EKPO INTO WA_EKPO.
    WA_VRM-KEY = WA_EKPO-EBELP.
       WA_VRM-TEXT = WA_EKPO-EBELP.
       APPEND WA_VRM TO IT_VRM.
    CLEAR WA_VRM.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = 'EKPO-EBELP'
        VALUES                = IT_VRM
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 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.
    ENDCASE.
    endmodule.                 " USER_COMMAND_0100  INPUT
    **&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
      SET PF-STATUS 'ZSREE'.
      SET TITLEBAR 'ZSREE'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  SELECT_LIST  OUTPUT
          text
    module SELECT_LIST output.
    CLEAR IT_LFA1.
    SELECT LIFNR NAME1 INTO TABLE IT_LFA1 FROM LFA1.
    CLEAR IT_VRM.
    LOOP AT IT_LFA1 INTO WA_LFA1.
       WA_VRM-KEY = WA_LFA1-LIFNR.
       WA_VRM-TEXT = WA_LFA1-LIFNR.
       APPEND WA_VRM TO IT_VRM.
    CLEAR WA_VRM.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = 'LFA1-LIFNR'
        values                = IT_VRM
    EXCEPTIONS
      ID_ILLEGAL_NAME       = 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.
    endmodule.                 " SELECT_LIST  OUTPUT
    Bye Murthy

  • Value need to select from the drop down list & should be save under Variant

    Hi,
    My requirement is that i need to display two values in drop down list of a selection screen. Between two values , one value will be display as a default value. During program execution user can choose any value from drop down list as per requirement and
    he can save this in a Variant.
    Next time if he choose data from Variant, but still he will be able to select any value from drop down list.
    For that i am using FM VRM_SET_VALUES. How can i make the changes to meet my requirement using this function module or any other suggestions will be highly appreciated.
    Thanks & Regards,
    Tutun
    Edited by: tutun nandy on Nov 19, 2010 12:21 PM

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How can I select from drop-down list and jumping to selected subform?

    I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
    drop-down list...A (jump to subform1)
                             B (jump to subform2)
                             C (jump to subform3)
    subform1
    subform2
    subform3
    ....end of form

    Hi,
    you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
    From a dropdowns exit event the script will look this way:
    switch (this.rawValue) {
              case "A" : xfa.host.setFocus("form1.page2.field1"); break;
              case "B" : xfa.host.setFocus("form1.page2.field1"); break;

  • Display look up column as drop down list in a web part in SharePoint 2013

    Hi,
    I have a look up column in SharePoint 2013 calendar list.I want to show that field with values in the page as drop down list to filter the data based in selected value.
    Is it possible through OOB or javascript.
    Please help .
    Thank you.

    Hi  ,
    According to your description, my understanding is that you want to  filter a calendar based a look up column in SharePoint 2013.
    Calendar View not support OOTB filters connection. it is disabled for calendar view, you need to change view(not calendar view) so OOTB filters works and get connected to your view.
    You can achieve this using combination of jQuery and SharePoint OOB techniques.
    For jQuery filters refer to the  blog: enter SharePoint List Filters using jQuery
    Also you can filter Calendar View Web Part using JQuery and SPServices:
    http://blogs.visigo.com/chriscoulson/filter-a-sharepoint-calendar-list-with-a-date-picker/
    http://joshmccarty.com/2011/11/sharepoint-jquery-and-fullcalendar%E2%80%94now-with-spservices/
    http://spservices.codeplex.com/discussions/258846
    Another  way, you can have a look at the SPFilterCalendar :
    http://www.aasoftech.com/SitePages/How%20to%20Filter%20SharePoint%20Calendar%20Dynamically.aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Dynamic drop down list in jsp

    Hi -
    I have written a piece of code to dynamically include data in the drop down list after querying the data base. I can print the values using out.print().. but they do not show up in the drop down list. Below is the code -
    Please lemme know the mistake i am committing. Thanks you!
    <form name="browse" method = "POST">
    <select name="uid">
    <%
    //out.write("before vec");
    unit.setCid(user.getCid());
         Vector unitNumbers = unit.getUnitNumbers();
         ListIterator iter1 = unitNumbers.listIterator();
              while ( iter1.hasNext() ){
                   Integer num = (Integer)iter1.next();
    //               out.print(num.intValue());
    //               out.print("Hellooooooooo");
    %>
    <options> <%= num.intValue() %>
    <% }
    %>
    </select>
    </form>

    The correct tag should be <option value="val">Val</option>, like this:
    <form name="browse" method = "POST">
      <select name="uid">
        <%
          unit.setCid(user.getCid());
          Vector unitNumbers = unit.getUnitNumbers();
          ListIterator iter1 = unitNumbers.listIterator();
          while ( iter1.hasNext() )
            Integer num = (Integer)iter1.next();
        %>
        <option value="<%= num.intValue() %>"><%= num.intValue() %></option>
        <% } %>
      </select>
    </form>

  • Drop Down list in BPC Input Schedule

    Hi all,
    In an input schedule I need to have some values "controlled", and allow to give a value only among a list of specific values. So I came up on the idea to builld it using cell "validation" feature of native Excel, just like I have been able to find in [this thread|Re: Regarding the Function.......] (by the way, great the hint about using name's ranges for being able to define the list in a different sheet than where it is being used).
    So, I need to achieve one more thing. Let's say that the values I must include in the list are not numerical values, but alphanumerical, so I must combine in the schedule the alphanumerical value with the numerical value it represents. I have played around with excel and BPC formulas for quite a while already but cannot get it to work. Anybody has implented it?
    Regards,
    Rafael
    PS: I get to define the drop down list of values in a cell and get it to write the corresponding numerical value in another cell referenced by a EvSND, but this only works in one direction (the cell does not get updated when I change the current view for example).

    Hi Rafael,
    I've done something similar.
    In one cell I've put a drop down list, using Excel's data validation. The members in the list are human-readable text values, so the user can select one of these descriptive values.
    In a second cell, these text values are transcoded into numeric values, thanks to function VLOOLUP. This cell is in the data range of an EvDRE expansion area, so when the user saves data the numeric value gets written to the back-end.
    In a 3rd cell I fetch the numeric value currently saved on the server, via an EvGET.
    In a 4th cell, I transcode that value into the corresponding text value, using another VLOOKUP function.
    Finally, I've used function AFTER_REFRESH to read the content of the 4th cell, and set the value of the drop-down cell to that value. The VBA instruction to do the latter thing is something similar to:
    ActiveCell.FormulaR1C1 = <the value of the 4th cell>
    This way, the drop-down entry selected by default after refreshing data is the value currently stored on the server.
    However I still miss something. I've set the Excel validation only in the 1st cell of the 1st row, and I want that the EvDRE expansion copies the validation to all other cells in all rows resulting from expansion. But this does not happen! Validation is not copied during expasion.
    How's that? Everything else is copied--values, formats, formulas. Why validation is not copied?
    * UPDATE
    I've solved this issue. The solution is described here:
    http://scn.sap.com/thread/3209213
    Rafael Moreno wrote:
    Hi Ethan,
    yes, you are right, with VLOOKUP you get the information I want, but only in ONE direction. By "one direction" I mean that I can get in the cell with the VLOOKUP the text I want by reading a (numerical) value from a different referenced cell. But I would also need to be able of changing value in that same cell (by picking up one of those text values from a drop down list) and having the corresponding numerical value written on the referenced cell. Can you see the difference?
    In few words, I would need a cell to read and write a value (just as the raw EvSND allows), but converting the numerical value into its corresponding text value.
    Regards,
    Rafael
    Message was edited by: Davide Cavallari

  • Drop down list in ALV grid

    Dear Expert,
    I am new to OOPS ,
    I want to display drop down list for a particular field in my output, so I am using OOPS but in my below code
    I am facing problem in displaying the output as I am getting the error message
    Field catalog not found...
    Also advice me how to display drop down list in a particular field.
    Please advice
    MODULE pbo OUTPUT.
      SET PF-STATUS 'ZTEST'.
      IF g_custom_container IS INITIAL.
        DATA: lt_exclude TYPE ui_functions,
              lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
        CREATE OBJECT g_custom_container
          EXPORTING
            container_name = g_container.
        CREATE OBJECT g_grid
          EXPORTING
            i_parent = g_custom_container.
        PERFORM field_catalog TABLES it_lvc_t_fcat
           USING: 'S_FINAL' 'MATNR' ' ' 'Part Number' ' ' ' ',
                       'S_FINAL' 'MAKTX' ' ' 'Part Description' ' ' ' ',
                       'S_FINAL' 'MBLNR' ' ' 'Document No' ' ' ' ',
                       'S_FINAL' 'BLDAT' ' ' 'Document date' ' ' ' ',
                       'S_FINAL' 'LIFNR' ' ' 'Vendor Number' ' ' ' ',
                       'S_FINAL' 'STATUS' ' ' 'Acknowledgement' ' ' 'X',
                       'S_FINAL' 'REMARKS' ' ' 'Remarks' ' ' 'X'.
        CALL METHOD g_grid->set_table_for_first_display
           EXPORTING
    *    I_STRUCTURE_NAME              =
         is_layout                                =   it_lvc_s_layo
           CHANGING
             it_outtab                        =   i_final
         it_fieldcatalog                =   it_lvc_t_fcat
      ENDIF.
    ENDMODULE.                 " PBO  OUTPUT
    FORM field_catalog  TABLES t_field_catalog STRUCTURE wt_lvc_s_fcat
    USING fp_tabname TYPE any
    fp_fieldname TYPE any
    fp_key TYPE any
    fp_text TYPE any
    fp_do_sum TYPE any
    fp_edit TYPE any.
      t_field_catalog-tabname = fp_tabname.
      t_field_catalog-fieldname = fp_fieldname.
      t_field_catalog-key = fp_key.
      t_field_catalog-seltext = fp_text.
      t_field_catalog-do_sum = fp_do_sum .
      t_field_catalog-edit = fp_edit .
    ENDFORM.                    "field_catalog
    Edited by: Karthik R on Mar 15, 2010 6:11 PM

    Hi Karthik,
    Below mentioned  is a Simple code for creating dropdown lists for columns in ALV grid output
    REPORT z_alv_dropdown.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container, ALV grid,  Field catalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.
    *INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    *initialisation event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    *Call to ALV
      CALL SCREEN 600.
    *On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
    set pf-status 'xxx'.
    set titlebar 'MAIN100'.
    Subroutine to display the output in alv
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
    PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes and
    based on the user command we can do the coding.
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
      DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'SLART'.
    *drdn-hndl = '1' is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    *drdn-hndl = '2' is the second list box
          WHEN 'ABART'.
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .
    *Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.
    ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.
    *Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Pink'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Yellow'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Green'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Black'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 White'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 Blue'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Colors'.
      APPEND ls_dropdown TO lt_dropdown.
    *method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.
    ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .
      gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.
    ENDFORM.                    " build_layout
    Hope it is helpful,
    Regards,
    Soundarya.

  • Beginner Problems - How to sum drop down lists in a table

    Hi,
    Please forgive my newness but I'm creating a table with 10+ rows and columns and need to sum the colums. The user is expected to select a number from a drop down list and I would like to sum those nbumbers up at the bottom of the column, seems simple enough...
    I have named each cell in the bindings tab but can't seem to find the right sum script. I just started using livecycle and have had a good experience up until now.
    I wish it was like excel where you just need to click or highlight the cells you want to sum and be done with it but I can't seem to find the easy button...
    Cant you just highlight a column, name it and then use that name in a sum script?
    Thanks so much for any help and I've looked around but can't get a grip on this one so I apologize if it's been asked before.
    Go easy on me.

    One last thing.
    I can manage this one on my own but it's taking so long to do it the way I'm going at it.
    Basically, I've overpopulated most of my drop down list items, some by over 100 and I'd like to restrict the results that can be chosen by the user.
    Right now, I'm deleting each value in the List Item field in the cell tab one by one but I have a lot more to go and this could take a few hours at this rate. Is there no way for me to just highlight a large chunk and remove it that way or do I have to go one by one clicking the delete button? I can't find any option to delete more than one at a time which seems odd.
    Sorry if I'm not clear enough.
    Thanks again either way.
    ~OK~
    I just ended up copying a new cell to each overpopulated cell and rename. Seems to have worked and definitely saved some time, kind of obvious I suppose... but would be nice to be able to delete more than one item at once in the list item field.

Maybe you are looking for

  • Reg : Viewing Opening and Closing remarks in the document

    Dear All, In any document (Sales Quotation, Sales order etc), while right click we can see Opening and Closing Remarks. I have entered Opening and closing remarks. But am not able view in the screen. Where i can view the same in the respective docume

  • Have a 3350 and would like to add it to my network. Do I need to make IOS changes?

    In my home network I have a number of netgear gigabit unmanaged switches.  My Firewall/Router acts as DHCP and DNS. I would like to add a Cisco 3550 to segment the network and put all of my Tivo IPTV equipment on for fastest throughput. Not Vlan, jus

  • NEW INFERIOR HP LASERJET 4630 PRINTER

    The printer works for a little while, then it goes crazy.  It is no longer seen by computer.  New problem, when set to print with the correct printer selected, it switches to a different printer.  The whole thing is just plain crazy.  So sorry I purc

  • Restarting with a script

    I am working up an ARD script to cause computers to update themselves using SoftwareUpdate, and as a last step I want them to restart. On the face of this it seems rather easy: 'shutdown -r +1' and I should be done. But when I do this the remote comp

  • The requested page contains stale data Error

    Hi All, I have two table in the back end. VikCountry(country_code PK,country_name). VikCities(country_code FK,city_name).I have created two EO's and TWo VO's for them and the AssociationObject. In the UI ,I have two messageTextInput fields, one for t