How to create a Drop down with values in Module Pool for a screen field.

Hi all,
I have created a Screen on which one field is created Say Bank Name. I would like to give some spcific value for this fileld where user can select only seeing in drop down cann't enter.
Can anyone tell how can we do it ?

Hi,
The selected value key will be stored in the parameter.
eg: Refer below code. Here if i select Vinod then po_name will be 1. After this read i_values WITH this key and get the actual value.
PARAMETERS: po_name(30) TYPE c VISIBLE LENGTH 20 AS LISTBOX.
TYPE-POOLS: VRM.
DATA: i_values TYPE vrm_values,
      wa_values LIKE LINE OF i_values.
AT SELECTION-SCREEN OUTPUT.
  wa_values-key = '1'.
  wa_values-text = 'Vinod'.
  APPEND wa_values TO  i_values.
  wa_values-key = '2'.
  wa_values-text = 'Kumar'.
  APPEND wa_values  TO i_values.
  wa_values-key = '3'.
  wa_values-text = 'Reddy'.
  APPEND wa_values  TO i_values.
  CALL FUNCTION 'VRM_SET_VALUES'
       EXPORTING
            id              = 'PO_NAME'
            values          = i_values
       EXCEPTIONS
            id_illegal_name = 1
            OTHERS          = 2.
START-OF-SELECTION.
READ TABLE i_values INTO wa_values WITH KEY key = po_name.
MOVE wa_values-text TO w_name. " This will be ur actual value.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Jul 8, 2008 4:16 PM

Similar Messages

  • How to create a drop down box values on design time?

    Hello,
    I have a drop down box that I would like to edit on design time to have the valus 1 to 10.
    Is it possible to doo it on design it or do I have to create a loop in the code to do that?

    See go to LocalDictionary->Data Type-> SimpleType Right Click and create a Simple Type giving some Package Name
    Once u have created
    There u will see Enumeration Tab and give Key Value Pairs by pressing New Button
    Now Create a Context Attr and at Type property select that three dots
    Then go to Dictionary Simple Type and select the Package u have given
    then select the Simple type u have created
    Then assign the context Attr to the UI Element
    Message was edited by: krish kanth

  • How to create conditional drop-down lists

    I would like to create a form that utilizes conditional drop-down selection boxes like at http://blogs.office.com/b/microsoft-excel/archive/2009/11/24/create-conditional-drop-down- lists.aspx
    How can I create a form that contains fields like this?
    Is there a sample I can download?

    I have downloaded the AcroForm version (ListProgramming_Part1_AcroForm.pdf).
    I'm not able to consistently recreate.  I was first playing with the form by selecting values in the drop down.  At one point I went to Document Javascripts and select "Example1".  I chose to edit.  Make no changes and select "OK" I get "SyntaxError: missing } in compound statement 39 at line 40"
    The sec ion of code is:
    function SetPartEntries()
       // Only run this code on when the selection is commited.  
       if(event.willCommit)
          // There are 3 rows in the order form so in order to use other fields in 
          // the same row we first have to acquire the name of the row
          // we are operating on.  This is part of the List field's name, so we 
          // just have to split it off 
          var cRowName = event.target.name.split(".").shift();
          // Now get the new parts list from the Master List
          // Since the selection is being committed, event.value contains the selection text
          var lst = oAssemblyParts[event.value];
          // If an entry is selected that we don't have a parts list for, then
          // the parts list is just cleared. 
          if( (lst != null) && (lst.length > 0) )
             this.getField(cRowName + ".PartSelect").setItems(lst);
          else
             this.getField(cRowName + ".PartSelect").clearItems();
          // We have a new parts lists and the first entry is 
          // is a non-selection.  so clear the price field.
          this.getField(cRowName + ".Price").value = 0;
    I am not able to recreate if I select "Edit all Javascripts" only when I use document javascripts.

  • How to create a drop down box and text box in screen painter?

    Hi i am totally new to this concept of screen painter..please can any tell me
    how to create drop down box in screen painter?
    How to create or display default date and time values?
    How to create text box for giving comments?
    How to store the records that we are entering in a table?
    Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.

    Hi,
    Check all these.
    1.how to create drop down box in screen painter?
    To get Drop Drown Box on screen .
    Follow these steps.
    1.
    Go to T.Code SE51 and Select Laypout for the Screen.
    2.
    Double click on the field for which u want Dropdown box.
    3.
    Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
    4.
    Save and Activate ur screen .
    5.
    Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
    6.
    The following code should be written under PROCESS BEFORE EVENT in the MODULE.
    TYPE-POOLS :vrm.
    DATA:
      i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
      w_natio LIKE LINE OF i_natio.
    DATA:
    BEGIN OF i_t005t OCCURS 0,
        land1 TYPE t005t-land1,
        natio TYPE t005t-natio,
    END OF i_t005t.
    IF i_t005t[] IS INITIAL.
      SELECT land1 natio
         FROM t005t
           INTO TABLE i_t005t
       WHERE spras = sy-langu.
      IF sy-subrc = 0.
      LOOP AT i_t005t .
          w_natio-key = i_t005t-land1.
          w_natio-text = i_t005t-natio.
          APPEND w_natio TO i_natio.
          CLEAR w_natio.
      ENDLOOP.
      ENDIF.
    ENDIF.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
                          id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
                    values = i_natio
    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.
    2.1.How to create or display default date and time values?
    1.
    create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
    2.
    Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
    3.How to create text box for giving comments?
    1.
    Define one variable in the TOP include with type STRING means Global variable.
    2.
    Create one input field by giving screen field name which u have defined in the above step.
    4.How to store the records that we are entering in a table?
    For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
    Check the following steps to handle Table control.
    1).
    U should take one variable in your internal table or in structure which
    is used for table control fields
    ex :
    data :
    begin of itab occurs 0 ,
        mark type c , "This is to select the record.
        matnr like mara-matnr ,
        matkl like mara-matkl,
        maktx like makt-maktx,
    end of itab .
    Controls: TABC types TABLEVIEW using screen 100.
    2).
    This mark variable should be given in Table control properties.
    follow the path
    double click on the table control-->attributes .->select
    w/SelColumn and in that itab-mark. Check in the figure.
    [Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
    3).
    After that. Take this example.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL tabc
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    LOOP AT ITAB.
       Module read_table_control.
    ENDLOOP.
    module user_command_0100.
    In this Module read_table_control, You should write the following code
    MODULE read_table_control INPUT.
    MODIFY itab INDEX tabc-current_line."( This will update the
    "ITAB table MARK field with 'X ' whatever we have selected
    "on table control.)
    ENDMODULE.
    4)
    If you want to Delete some of the records from Table control
    follow this code …Create one pushbutton and give Fucnction code to that
    and write below code
    CASE OKCODE.
    WHEN 'CREATE'.
    LOOP AT itab WHERE mark = 'X'.
    "Use UPDATE statement to create new record.
    ENDLOOP.
    ENDCASE.
    I hope that you will get something.
    Regards,
    Venkat.O

  • How to create Dynamic Drop down list ?

    Hi experts
    I want to create a Dynamic Drop down list that should be an Editable,after editing that i need to save.
    thanks,
    vikram.c.

    Hello,
    Please go through this link:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/linking%2bdrop-down%2blists
    If useful reward.
    Vasanth

  • How to create a drop down menu

    Is it possible to create a dropdown menu when a button is clicked or rollover? However, what i need is a dropdown menu and not a popup menu... hope to get some response... thank you

    sounds like he needs an uneditable ComboBox, cant say much unless he gives us more details.
    asrar

  • How do I create a drop down menu with Code Snippets and Flash CS5?

    Hi
    I am wondering how to create a drop down menu using the Code Snippets and CS5?
    There are some older tutorials out there and it would be nice if someone could create an updated drop down menu tutorial, and it might be me doing this after I have figured out the best and easiest way to create one, but before that I need some pointers.
    Thanks!
    Have a great day!
    Paal Joachim

    You can use panel widget to create manual menu where set to show target on rollover.
    Something like this :
    http://muse.adobe.com/exchange-library/menu-vertical-accordion-widget-1
    http://muse.adobe.com/exchange-library/tiptop-navigation-menu
    Thanks,
    Sanjit

  • Creating a drop down list and linking it to Excel files

    How to create a drop down list and when i select any row in the dropdown list, it must open designated MS- Excel file? Can anyone help me in this with an example code?
    Thanks
    Anu

    Try this in 7.0 format.
    Attachments:
    Listbox for excel files.vi ‏15 KB

  • Is there a way to create interactive drop downs?

    I have a product form that I am trying to create a warranty list that allows the user to be able to select specific warranties based on the products they are using.
    For example, If the form user selects from a drop down that they are using Product # 1, it will give them another drop down with a list of options for warranties available for that Product. If they choose Product #2, it will give them different warranty options that are available for that product.
    If this is possible, is it also able to do more than one level of options. I would like to add a color option in there and warranty length as well.
    I know this can be done in Livecycle, but can it be done using the Adobe form tools? My company primarily uses IPads with the PDF Expert app and this is one form that they want accessible.
    I am also a beginner with java and form creation so a dumbed down version of an answer would be appreciated.

    Yes, it's possible with an acroform. I'd have to check to see if PDF Expert supports the JavaScript that you'd need to use before saying it will work there. It has decent support for JavaScript, but it's not complete as is Reader for Windows/Mac. Unfortunately, Adobe Reader for iOS doesn't support it at all. Here's a link to a series of tutorials that should get you started: http://acrobatusers.com/tutorials/js_list_combo_livecycle1

  • How do I create a drop down menu with multiple items in Adobe Acrobat 9?

    I am trying to create a drop down menu with four items within a field box.  When I try to do this
    the font is too big and it just doesn't fit.

    You can use panel widget to create manual menu where set to show target on rollover.
    Something like this :
    http://muse.adobe.com/exchange-library/menu-vertical-accordion-widget-1
    http://muse.adobe.com/exchange-library/tiptop-navigation-menu
    Thanks,
    Sanjit

  • How can i create a drop down menu for set qty in my store?

    I'm wondering how i can create a drop down menu for the qty module that sits on the individual product page. My client sells in quantities of 6 packs. I currently have the minimum order at 6 but i would like to give consumers the option for 6,12,18...and so forth. I was told that it could be accomplished? Hopefully someone can help me.

    Hi Chris -
    Thank you for your reply! I had seen your article before, and just now again attempted to follow it, but I get stuck. There are two things that I'm confused by.
    First off, toward the top, referring to the initial button, you say to add this interaction:
    ON CLICK; Play Transition to comboBox: selected
    ON ROLL OUT; Play Transition to comboBox normal if comboBox is in over state
    ON ROLL OVER; Play Transition to comboBox over if comboBox is in normal
    However, I do not see these transition options. When I select the button, the only interactions I have are to Play transistion to state, Play action sequence, Go to URL, and two for videos. So that's the first roadblock for me.
    But, trying to get passed that, I went down to the portion of the article that refers to adding interaction to the dataset items. Again, I don't get it, as I see no way to add interaction to a dataset item. When I open my design-time data menu, I do see the items, and am able to rename each item, add additional rows, and change the shape of the datalist layout. However, I see no way to add an interaction to a dataset item. I must be missing a step ... Can you help with this?
    Again, thank you!
    Amy

  • How to modify drop down list values of a screen field in UDM_DISPUTE?

    Hi All,
    I have a requirement wherein i need to modify the drop down list for a screen field depending on the value of the other screen field in transaction UDM_DISPUTE. 
    Please suggest how this can be achived.
    Any BADI 's or any other approach is available?
    Thanks in advance,
    Srilakshmi.

    Hi,
    At what time do you want to modify the drop down list, while creating or after creating the dispute case. There are some BADI's where we can change the attribute drop down list values.
    Thanks,
    Sunil

  • Is there a way to create a drop down menu with an automatic answer dependent on what is chosen?

    Is there a way to create a drop down menu with an automatic answer dependent on what is chosen? An if-then statement perhaps?  I am looking to add over 100 drop down options and would like to have a message automatically pop up depending one which option they chose.  Thank you.

    Hi,
    You would use the skip logic to conditionally show form items based on the selection within the drop-down menu. Here's a link to a description of the feature in our help documentation:
    http://help.adobe.com/en_US/formscentral/using/WSd789abd336388b1642c7fce012da94afe4f-8000. html#WS0faeceb8c23f5d60-774f03e3131ddc76d7d-8000
    Regards,
    Brian

  • How do I create a drop down list to e-mail a form for signature.

    The desired workflow is for
    1)      Firefighter 1 to complete the top portion of the Agreement
    section, sign in the Firefighter 1 signature field (which locks the top
    portion of the Agreement Section), then select Firefighter 2 from the
    e-mail drop down list and e-mail the PDF form to Firefighter 2;
    2)      Firefighter 2 opens the e-mail and the PDF attachment,
    completes the second portion of the Agreement Section, sign in the
    Firefighter 2 signature field (which locks the bottom portion of the
    Agreement Section), select Lieutenant 1 from the e-mail drop down list
    and e-mail the PDF form to Lieutenant 1;
    3)      Lieutenant 1 opens the e-mail and the PDF attachment, checks
    the approved box, signs the Lieutenant 1 signature field, select
    Lieutenant 2 from the e-mail drop down list and e-mail the PDF form to
    Lieutenant 2;
    4)      Step three continues through Lieutenant 2, Battalion Chief 1
    and Battalion Chief 2
    5)      Battalion Chief 2 sends the fully completed form back to
    Firefighter 1 who copies the completed form to Firefighter 2
    Note: if any of the officers disapprove the agreement the disapproved
    form is immediately sent back to Firefighter 1

    katiesandell wrote:
    how can i create a drop down menu so that when i click on the arrow in the cell i can select from the menu that appears
    Hi Katie,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Numbers vocabulary for this feature is a "Pop-up Menu". It's available as a Cell Format, and is set and edited in the Cell Format Inspector.
    See "Using a Checkbox, Slider, Stepper, or Pop-Up Menu in Table Cells" starting on page 96 of the Numbers '09 User Guide.
    This guide, and the equally useful iWork Formulas and Functions User Guide are available for download through the Help menu in Numbers.
    Regards,
    Barry

  • How do i create a drop-down menu in SharePoint that redirects to a new page?..

    Helly everyone, i have a question and really hope someone can help me out here:)
    In SharePoint i want to create a drop-down menu that has the possibelty to redirect to other websites.
    I fount the code below and it works but just not in SharePoint:(
    It only shows the drop-down list but it doesn't redirect you to another website if you click on a site.
    Can someone please help me out because it's really getting frustrating.
    <form method="post" action="" name="">
    <select name="select15" onChange="window.open(this.options[this.selectedIndex].value,'_parent')">
    <option selected>Please Select Site to Visit</option>
    <option>---------------------------------------------------</option>
    <option value="http://leedssocialclubs.co.uk">Leeds Social Clubs </option>
    <option value="http://yahoo.co.uk">Yahoo </option>
    <option value="http://msn.com">MSN </option>
    <option value="http://Moonfruit.com">Moonfruit </option>
    <option value="http://burystaffhire.moonfruit.com/#/home/4548482603">Bury Staff Hire</option>
    </select>
    </form>

    <form>
    <select name="URL" onchange="window.location.href=this.form.URL.options[this.form.URL.selectedIndex].value">
    <option value="">Choose a site</option>
    <option value="http://webdesign.about.com/">Web Design Front Page</option>
    <option value="http://webdesign.about.com/library/beginning/bl_begin.htm">
    Beginning HTML</option>
    <option value="http://webdesign.about.com/od/javascript/">JavaScript Help</option>
    </select>
    </form>
    Demo url
    http://webdesign.about.com/od/examples/l/blfaqddredirect.htm
    script url
    http://webdesign.about.com/od/javascript/a/aa050701a.htm
    For me it is working fine

Maybe you are looking for