How to display data with the same text and key in the drop down list?

Hi All,
Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
REPORT ZTESTING.
TYPE-POOLS: VRM.
DATA: NAME  TYPE VRM_ID,
      LIST  TYPE VRM_VALUES,
      VALUE LIKE LINE OF LIST,
      c(20) type c.
*      c = 'select any'.
data:begin of itab occurs 0,
      kunnr like kna1-kunnr,
      name1 like kna1-name1,
     end of itab.
data:begin of jtab occurs 0,
      kunnr like kna1-kunnr,
      land1 like kna1-land1,
     end of jtab.
PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
                          default 'SELECT'.
AT SELECTION-SCREEN OUTPUT.
NAME = 'p_list'.
VALUE-KEY = 'Name'.     "---> Data for key is the same with text
VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Country'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
start-of-selection.
select kunnr name1 up to 20 rows from kna1 into table itab.
select kunnr land1 up to 20 rows from kna1 into table jtab.
case p_list.
when '1'.
loop at itab.
write:/ itab-kunnr,itab-name1.
endloop.
when '2'.
loop at jtab.
write:/ jtab-kunnr,jtab-land1.
endloop.
endcase.
<Added code tags>
Moderator Message: Please use the "code" tags to format your code snippet.
Edited by: Suhas Saha on Nov 17, 2011 11:19 AM

shawnTan wrote:
Hi All,
>
> Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
>
>
REPORT ZTESTING.
>
> TYPE-POOLS: VRM.
>
> DATA: NAME  TYPE VRM_ID,
>       LIST  TYPE VRM_VALUES,
>       VALUE LIKE LINE OF LIST,
>       c(20) type c.
>
> *      c = 'select any'.
>
> data:begin of itab occurs 0,
>       kunnr like kna1-kunnr,
>       name1 like kna1-name1,
>      end of itab.
>
> data:begin of jtab occurs 0,
>       kunnr like kna1-kunnr,
>       land1 like kna1-land1,
>      end of jtab.
>
> PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
>                           default 'SELECT'.
>
> AT SELECTION-SCREEN OUTPUT.
>
> NAME = 'p_list'.
>
> VALUE-KEY = 'Name'.     "---> Data for key is the same with text
> VALUE-TEXT = 'Name'.    "--> Data for text is the same with key
> APPEND VALUE TO LIST.
>
> VALUE-KEY = '2'.
> VALUE-TEXT = 'Country'.
> APPEND VALUE TO LIST.
>
> CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
>
> start-of-selection.
> select kunnr name1 up to 20 rows from kna1 into table itab.
> select kunnr land1 up to 20 rows from kna1 into table jtab.
>
> case p_list.
> when '1'.
> loop at itab.
> write:/ itab-kunnr,itab-name1.
> endloop.
>
> when '2'.
> loop at jtab.
> write:/ jtab-kunnr,jtab-land1.
> endloop.
> endcase.
>
> <Added code tags>
>
> Moderator Message: Please use the "code" tags to format your code snippet.
>
> Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
This surely seems to be a bug to me(if not by design),  did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
-Rajesh.

Similar Messages

  • Dynamically populating data for the drop down lists

    Hi,
    I am trying to have a mutually dependent drop down lists in my page.
    This is what I am trying to do -
    Lets consider there are 3 drop down lists (Choice - Select Many). A simple example lists are - Country, State, County. Now users selects country from drop down, I need to get all the states for that country as the data for the "State" drop down list. Then user selects a state, I need to populate data for the "County" drop down list.
    I am trying to do this. I added a ValueChangeListener method in the backing bean and tried to add this on the "Select Many Choice" component. But the method is never fired. I tried to change few other properties like - "immediate", "Auto Submit". but method is not fired.The method in backing bean is as shown below -
    public void onRegionSelect(ValueChangeEvent event) {
        System.out.println("Value changed ==>> "+event.getNewValue().toString());
    Need some help on how to do this.
    JDev: Version 11.1.2.3
    Thanks.

    Hi,
    I am trying to have a mutually dependent drop down lists in my page.
    This is what I am trying to do -
    Lets consider there are 3 drop down lists (Choice - Select Many). A simple example lists are - Country, State, County. Now users selects country from drop down, I need to get all the states for that country as the data for the "State" drop down list. Then user selects a state, I need to populate data for the "County" drop down list.
    I am trying to do this. I added a ValueChangeListener method in the backing bean and tried to add this on the "Select Many Choice" component. But the method is never fired. I tried to change few other properties like - "immediate", "Auto Submit". but method is not fired.The method in backing bean is as shown below -
    public void onRegionSelect(ValueChangeEvent event) {
        System.out.println("Value changed ==>> "+event.getNewValue().toString());
    Need some help on how to do this.
    JDev: Version 11.1.2.3
    Thanks.

  • How to display more than 4 websites on my address bar's drop down list?

    I want to display more than 4 websites on my drop-down menu (URL bar).
    I know previous Firefox's you can have a lot more but now there's only 4 addresses and i want atleast 8 address as it saves me time typing...

    This issue is caused by the FastestFox extension
    Location bar 4 websites: FastestFox Options > General, uncheck "Enhance Awesomebar"<br />
    See image 10 in the image gallery: https://addons.mozilla.org/firefox/addon/9825
    * https://addons.mozilla.org/img/uploads/previews/full/37/37975.png

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create a button with the drop-down menu?

    I want to create a button with the drop-down menu, which is like the 'back' on the tollbar in IE. I heard JPopupMenu can reach the certain result, but the button hadn't a down arrow. Who can help me?

    i have made something like this :
    //======================================================================
    package com.ju.guiutils
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.util.Vector;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.plaf.basic.BasicComboBoxUI;
    * @version 1.0 14/04/02
    * @author Syed Arshad Ali <br> [email protected]<br>
    * <B>Usage : </B> ButtonsCombo basically performs function button + JComboBox, if we have different options for
    * <BR>same button then we can use this ButtonsCombo.
    *<BR> By the way there is no button at all in <I>ButtonsCombo</I>
    public class ButtonsCombo extends JComboBox {
    //===================================================================================
    * Create ButtonsCombo with default combobox model
    public ButtonsCombo () {
    super ();
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that takes it's items from an existing ComboBoxModel.
    public ButtonsCombo ( ComboBoxModel model ) {
    super ( model );
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that contains the elements in the specified array.
    public ButtonsCombo ( Object [] items ) {
    super ( items );
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that contains the elements in the specified Vector.
    public ButtonsCombo ( Vector items ) {
    super ( items );
    init ();
    //===================================================================================
    private void init () {
    setBorder ( BorderFactory.createBevelBorder ( BevelBorder.RAISED ) );
    setRenderer ( new ComboRenderer() );
    setUI ( new ComboUI() );
    addMouseListener ( new ComboMouseListener() );
    //===================================================================================
    * Set items for ButtonsCombo in the specified array
    public void setItems ( Object [] items ) {
    setModel ( new DefaultComboBoxModel( items ) );
    //```````````````````````````````````````````````````````````````````````````````````
    * Set items for ButtonsCombo in the specified Vector
    public void setItems ( Vector items ) {
    setModel ( new DefaultComboBoxModel( items ) );
    //```````````````````````````````````````````````````````````````````````````````````
    * Get current items in a array
    public Object [] getItemsArray () {
    ComboBoxModel model = this.getModel ();
    if ( model != null ) {
    int size = model.getSize ();
    if ( size > 0 ) {
    Object [] items = new Object[ size ];
    for ( int i = 0; i < size; i++ ) {
    items[ i ] = model.getElementAt ( i );
    return items;
    return null;
    //```````````````````````````````````````````````````````````````````````````````````
    * Get current items in a Vector
    public Vector getItemsVector () {
    ComboBoxModel model = this.getModel ();
    if ( model != null ) {
    int size = model.getSize ();
    if ( size > 0 ) {
    Vector itemsVec = new Vector();
    for ( int i = 0; i < size; i++ ) {
    itemsVec.addElement ( model.getElementAt ( i ) );
    return itemsVec;
    return null;
    //===================================================================================
    class ComboMouseListener extends MouseAdapter {
    public void mouseClicked ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    public void mousePressed ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    ButtonsCombo.this.setBorder ( BorderFactory.createBevelBorder ( BevelBorder.LOWERED ) );
    public void mouseReleased ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    ButtonsCombo.this.setBorder ( BorderFactory.createBevelBorder ( BevelBorder.RAISED ) );
    //===================================================================================
    class ComboRenderer extends JLabel implements ListCellRenderer {
    //````````````````````````````````````````````````
    public ComboRenderer () {
    setOpaque ( true );
    //````````````````````````````````````````````````
    public Component getListCellRendererComponent ( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) {
    setBackground ( isSelected ? Color.cyan : Color.white );
    setForeground ( isSelected ? Color.red : Color.black );
    setText ( ( String )value );
    return this;
    //````````````````````````````````````````````````
    //===================================================================================
    // We have to use this class, otherwise we cannot stop JComboBox's popup to go down
    class ComboUI extends BasicComboBoxUI {
    public JButton createArrowButton () throws NullPointerException {
    try {
    URL url = getClass ().getResource ( "/images/comboarrow.gif" );
    JButton b = new JButton( new ImageIcon( url ) );
    b.addActionListener ( new ActionListener() {
    public void actionPerformed ( ActionEvent ae ) {
    return b;
    } catch ( NullPointerException npe ) {
    throw new NullPointerException( "/images/comboarrow.gif not found or /images folder not in classpath" );
    catch ( Exception e ) {
    e.printStackTrace ();
    return null;
    //======================================================================
    you can cutomize this according to your requirement , okie ;)

  • Display pages that reacts to different values in the drop down list.

    I currently did up a simple drop down list that stores values retrieved from the database. I would like the program to display pages that reacts to the selected value without the press of any button, which means, if I select any value from the drop down list, the page will be displayed according to the value selected.
    Below are the codes that I did for the retrieval of data from the database.
    <%
            String username = "test";
            String password = "test";
            String thinConn = "jdbc:oracle:thin:@dbdev:1521:ORCL";
            Connection conn;
            Statement stm;
            ResultSet rs;
            String baseQuery ="SELECT DISTINCT ID FROM STAFF ORDER BY ID ASC";
            try {
                conn = DriverManager.getConnection(thinConn,username,password);
                stm = conn.createStatement();
                rs = stm.executeQuery(baseQuery);
    %>
    <strong>Retrieve ID from Database</strong>
        <select size="1" name="dropdown">
        <%
        while (rs.next()) {
            String id = rs.getString("ID");
            out.write("<option value=\"" + id + "\">" + "level " + id + "</option>");
                    conn.close();
                } catch (SQLException e) {
        %>
        </select>Would appreciate if someone might offer some help to what I have to do next
    Edited by: wyndsor on Jun 26, 2008 7:34 PM

    cotton.m wrote:
    [_An instant classic_|http://www.webdeveloper.com/forum/showthread.php?t=184937]
    Sometimes I find myself wondering why people think they won't get caught with their cross forum cross posting. Then I realize that if they knew about Google they wouldn't have needed to ask the question in the first place.
    It's kind of funny in an ironic sort of way.

  • Create a fragment with web service to populate the drop down list

    Hello,
    Can any one please advise/suggest on how to create a fragment in LiveCycle Designer ES with web service to populate the drop down list so I can re-use it for another form. I already have a drop down list to populate the data from the web serivice but need some advise on how to create a fragment for this drop down list so I can start to embed it in other forms as well.
    Thanks in advance,
    HD

    Did you follow the instructions and have a specific question?  Have you also looked at the documentation http://help.adobe.com/en_US/livecycle/9.0/lcdesigner_qs_fragments.pdf

  • How can I change the order in the drop down list of the teamviewer

    HI all
    If I can change the order in the drop down list of the teamviewer?
    example the default is "Direct Reports",I want to change it to the "Employees in Organizational Structure".
    Best Regards

    Cui,
    It is based on OADP. goto SPRo - Integration with other mySAP.com components - business packages/functional packages- manager self services()-Object and data provider-
    Thanks
    Bala Duvvuri

  • How to increase the width of the drop down list box in SSRS multi value parameter

    Hi,
    I am using SSRS 2012. I have a parameter, which accepts multi value.
    The width of the drop down list box is very small, and the user need to scroll to the right to view the complete view of the content in the list box. But, if I don't use multi value then the length is good.  Kindly suggest how to I increase the width
    of the list box when it set to multi value parameter.
    Thanks in advance,
    Mahalengam Arumugam

    Hi Mahalengam,
    After testing the issue in my local environment, I can reproduce it. When the values for a single parameter are too long, the drop-down list of the parameter will automatically enlarge to an appropriate size. While the values for a multiple parameter are
    too long, we need to scroll to the right to view the complete view of the content in the list box in SSRS 2008. But in SSRS 2008R2 and SSRS 2012, we can directly drag the black control at the bottom of the list box to control the size.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Hi Katherine,
    Thanks for your reply. I understood we need to drag the list box to a maximum size to view the contents.
    But, this seems an additional task, i know this is a limitation in the current version of SSRS and hope it will be resolved in the next versions.
    Thanks for your efforts,
    Mahalengam Arumugam

  • In email, when entering address, the drop down list contains old email addresses. How do I remove them?

    In email on my IPAD, when typing an address into the to: field, the drop down list which appears has old email addresses. How do I remove them?

    Removing addresses from the Contacts list will not solve this. Apparently it will take time for such addresses to be pushed off the drop down list.

  • Clicking on the downward arrow at the right end of the location bar no longer displays the drop-down list of sites visited, bookmarks and addresses typed in location bar

    Since I upgraded to Firefox version 3.6.10, clicking on the downward arrow at the right end of the location bar no longer displays the drop-down list of sites visited, bookmarks and addresses typed in location bar. My Tools > Options > privacy setting is to save history, and if I start typing a previously accessed website's address in the location bar, then the full address appears as a drop-down item. But not when I just click at the right end of the bar.

    You can try "Reset all user preferences to Firefox defaults" on the [[Safe mode]] start window.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • How do I delete names from the drop down list when I login to gmail and facebook?

    When I login to gmail and facebook several login names used in the past show up in a drop down list. I want to remove some of these names. How do I do that?

    On Mac you need to use Shift+Delete
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *Firefox > Preferences > Security: Passwords: "Saved Passwords" > "Show Passwords"
    *https://support.mozilla.com/kb/make-firefox-remember-usernames-and-passwords

  • How to change the drop down list "Category" in the Risk page (PWA 2013)

    Hello,
    How to change the drop down list "Category" in the Risk page of a Project Site. I need to change the list of elements.
    Thanks

    Hi Robert,
    You actually cannot edit the current template.
    The process is as follow: 
    create a brand new project site from the existing template,
    edit the site configuration (list, column, webparts, image, logo, theme...),
    save it as a template,
    associate it to an EPT.
    See reference below:
    http://blogs.msdn.com/b/brismith/archive/2010/03/15/customizing-the-project-site-in-project-server-2010.aspx
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • How to populate the values in the drop down list form the xml file ?

    I want to populate the drop down list values from a seperate xml file called ReferenceData. I created this file, which consists of a mapping entry in the form of ( key,value ) pair. Am mapping this xml file in to form by using rule named as getAppReferenceData.
    But the values are not getting populated in the form. And I have a doubt of, where should we keep that xml file? (under which path / folder ).

    what would help is if you showed what you do in the rule, either the code or a express trace of the rule.
    The other thing you need to know is where you want to get the file from. Yes java can read a file from anywhere on the system but there is a security layer in there which might prevent the file being opened. Have you allowed acces to the file via the security policy settings via java.io.FilePermission?
    WilfredS

  • In Firefox 4, how do I get back the context menu for the drop down list of the Location Bar so I can Open Link in New Tab, which I did often in FF 3?

    Firefox 3 has a context menu for the drop down list of
    the Location Bar. One option on this menu I used often
    is "Open Link in New Tab" -- quite convenient.
    This context menu has disappeared in Firefox 4.
    Can I get it back?

    See also:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The "Use custom settings for history" setting allows to see the current history and cookie settings, but selecting that setting doesn't make any changes to history and cookie settings.<br />
    Firefox shows the "Use custom settings for history" setting as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.<br />
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".<br />

Maybe you are looking for

  • LSMW upload of vendor line items

    Hi I have prepared a template for vendor line item upload. For payments as well as invoice. Now when i upload, i want that it should automatically get knocked off. For example: There is a vendor invoice - Rs.100 Advance - Rs.40 Now when i upload both

  • Authorization check based on item category on sales order (VA01 or VA02)

    I want to be able to restrict authorization of users based on item category. We only want certain users to be able to select a certain item category.  I know I'm going to have to check one of the userexits in MV45AFZZ. The issue I'm having is the aut

  • IPod stuck skipping at the beginning of every song

    My iPod isn't frozen, but it won't play any songs past the first second. My touch wheel isn't working properly for some reason so I can't reset it. Any advice on how to proceed? Updating it through iTunes isn't working either.

  • I want to delete all old Apple IDs.

    These  old Apple IDs are linked to old email addresses that don't exist any more. When i try to delete old Apple ID it requests a password. I forgot that password. What do I do. The reason why I want to do this is because my iphone 4 cant be synced t

  • 8.1.7.0 functionality

    May I ask the limited 8.1.7.0 functionality when I uses SQL Developper?