How to fill the drop down menu in screen programming

Hi, Experts,
I have a drop down menu on the screen I want to fill that drop down menu with different values how can I do that I think that there are to ways
Value List      from     dist/flow logic
                      A from program
Please help me out in this way.
Kind regards,
Faisal.

Hi Faisal,
  VRM_SET_VALUES function module is used to display drop down values in the screen.
Use the following code
* Selection screen elements                                            *
SELECTION-SCREEN BEGIN OF BLOCK BLC1 WITH FRAME
                                    TITLE TEXT-000.
PARAMETERS:
  P_BUKRS  TYPE BKPF-BUKRS OBLIGATORY  " Company code
           DEFAULT '1000',
  P_WERKS  TYPE VBRP-WERKS OBLIGATORY. " Plant
SELECTION-SCREEN SKIP.
PARAMETERS:
  P_GJAHR TYPE BKPF-GJAHR OBLIGATORY,  " Fiscal Year
  P_QUAT  TYPE CHAR20                  " Quarter
            AS LISTBOX VISIBLE LENGTH 30
            LOWER CASE OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BLC1.
Data:
* To hold quarter details, these details are used to display in list box of
* the parameter called Quarter in the selection screen.
  T_QUARTERS TYPE VRM_VALUES.
*              AT SELECTION-SCREEN ON VALUE-REQUEST                    *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_QUAT.
* To fill quarters......................................................
  PERFORM FILL_QUARTERS.
* To display quarters in dropdown box...................................
  PERFORM DISPLAY_QUARTERS.
* FORM DISPLAY_QUARTERS                                                *
* This subroutine is used to display quarters in the dropdown box.     *
* There are no interface parameters to be passed to this subroutine.   *
FORM DISPLAY_QUARTERS .
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = 'P_QUAT'
      VALUES          = T_QUARTERS[]
    EXCEPTIONS
      ID_ILLEGAL_NAME = 1
      OTHERS          = 2.
  IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.                               " F SY-SUBRC NE 0.
ENDFORM.                               " DISPLAY_QUARTERS
* FORM FILL_QUARTERS                                                   *
* This subroutine is used to fill quarters.                            *
* There are no interface parameters to be passed to this subroutine.   *
FORM FILL_QUARTERS .
* Local field string declaration........................................
  DATA:
* Field string to fill quarters in the year.
    LFS_QUARTERS TYPE LINE OF VRM_VALUES.
  REFRESH T_QUARTERS.
  LFS_QUARTERS-KEY  = '1'.
  LFS_QUARTERS-TEXT = TEXT-QU1.
  APPEND LFS_QUARTERS TO T_QUARTERS.
  LFS_QUARTERS-KEY  = '2'.
  LFS_QUARTERS-TEXT = TEXT-QU2.
  APPEND LFS_QUARTERS TO T_QUARTERS.
  LFS_QUARTERS-KEY  = '3'.
  LFS_QUARTERS-TEXT = TEXT-QU3.
  APPEND LFS_QUARTERS TO T_QUARTERS.
  LFS_QUARTERS-KEY  = '4'.
  LFS_QUARTERS-TEXT = TEXT-QU4.
  APPEND LFS_QUARTERS TO T_QUARTERS.
ENDFORM.                               " FILL_QUARTERS
Regards,
Mahi.

Similar Messages

  • How to access the drop down menu on mobile Firefox

    I need to able to print from my browser

    You press the menu button on the device or the 3 dot button near the address bar.
    However Android does not have very many printing options. Firefox for Android supports printing a webpage to a pdf. You would then need to open that pdf on a desktop computer to print.

  • Bookmarks toolbar changed from the right side of the drop-down menu to the left. How can I change it back on Firefox 4.0.1 for Mac?

    I just updated to Firefox 4.0.1. Some changes I don't like, especially that the Bookmarks toolbar opens to the left of the drop-down menu instead of the right. How can I change it?

    You may have bookmarks that have long title. Firefox 4 shows the full text of the bookmark name, so if it doesn't fit with opening to the right side the Firefox will open to the left side. You can scroll through the list and make the bookmarks with a long name shorter.
    * [[How do I use bookmarks?]]

  • How can I restore my iphone to a backup that's not listed in the drop down menu

    I updated my iphone and everything was removed. I attempted to restore it however the only backups that are available when I have the iphone logged into itunes is the one from today. How can I apply an older backup say 1 to 2 days ago to the drop down menu of the restore button? Right now the only thing that's showing up is the one for today and that's abslolutely not the one I want or need. And before the question is asked no I didn't save it to icloud.

    iTunes only keeps one normal backup, per device. Thus, there are no previous backups from 1 or 2 days ago unless you restored your phone & backed up before you restored. Restore point backups are time/date stamped & are not overwritten.

  • I want to name individual photos in the album but I am unable to select view sort in the drop down menu How can I overcome this?

    I want to name individual photos in the album but I am unable to select view>sort in the drop down menu How can I overcome this?

    Great to hear, but what was the solution?

  • How do I find the drop down menu on Safari?

    I'm a total novice so apologies right now.  I've only had my Mac for a couple of weeks and already I can't sign into ebay which (on my old pc) meant I had to clear my cache.  I've searched and seen that I have to use the drop down menu but er, I have no idea what that is, where I can find it or how.   Many thanks in advance!

    Like I said, apologies!   Obviously, I didn't make myself clear at all!  Bodycalming, I can confirm that it isn't always possible to successfully sign into ebay.  Especially if you need to clear your cookies.
    Thank you Carolyn, I actually laughed when I read your reply and I'm sorry to have wasted your time.  I've been on ebay since 2003 so I know how to sign in there, I was just being bounced back to the sign in page each time I tried.  As I said, I knew how to deal with it on my old pc but was at a loss on my shiny new Mac. 
    shdr2thewheel, thank you for those links, I've had a quick look and they seem really useful.  I've already implemented a few changes!  I found the drop down menu now and have cleared my cookies and it seems to be working just fine.
    Thank you!

  • How can I get the drop down menu on the internet to work, which shows most visited websites? It was working on Firefox, and now doesn't.

    On the internet when using Firefox, the drop down menu on recently visited sites (where you type in web addresses), does not work. How can I get it drop down and show websites that I recently visited, so I can click on them there instead of retyping them every time?

    Make sure that the Location Bar is not set to "Nothing":
    * Firefox (Tools) > Options > Privacy > Location Bar: When using the location bar, suggest: History, Bookmarks, History and Bookmarks
    Another possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • In iphoto11when I go to advanced preferences to choose an external editor (PSE11), the drop down menu just shows iPhoto and DSCF0586, which if chosen takes me to the desktop. How do I get rid of DSCF0586 and insert Adobe Elements11?

    In iphoto11when I go to advanced preferences to choose an external editor (PSE11), the drop down menu just shows iPhoto and DSCF0586, which if chosen takes me to the desktop. How do I get rid of DSCF0586 and insert Adobe Elements11?

    Click on DSCF0586 and then navigate to the PSE 11 application and select it.
    Be sure to select the right PSE 11 file, the one in the Support Files folder:
    OT

  • How do I un-delete a website from the drop down menu?

    I deleted a website from the awesome bar before. Now I want that website to appear on the drop down menu again. I visit it almost everyday but I cannot see it on the awesome bar. How can I fix this?

    Hi thankyou,
    If it was removed it may no longer be listed, however if you have visited the site again I am guessing two things are happening if it does not show up:
    #The settings for your url bar have changed, check to make sure that history is checked in the Location bar settings about:preferences#privacy
    #[[Remove websites from the Awesome Bar suggestions]]
    Did this help?

  • How to make chooser drop down menu, Example i want choices 1 or 2 or 3 from the drop down menu or Location , Egypt , USA , Canda

    how to make chooser drop down menu, Example i want choices 1 or 2 or 3 from the drop down menu or Location , Egypt , USA , Canda

    Hello,
    Where do you want to insert it in Muse. Do you want to add this in Muse Form widget then you can use the widget mentioned in the link below.
    Forms+ Bundle Widget – Widgets.Mu
    If you want to insert it anywhere else in Muse and if you have the HTML codes for that then you can insert its codes in page from Object > Insert HTML.
    You may also require to use some java scripts to make them working as expected.
    How to Make JavaScript Dropdown List - YouTube
    Regards
    Vivek

  • How do I clear the "drop down menu" of past titles I have searched for?

    How do I clear the drop down menu of titles that have been searched for in the past? Example; If I type in a word such as craig, then craigslist appears in the drop down menu, how do I clear this?

    Use these steps to remove saved (form) data from a drop-down list:
    #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.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries

  • How do I set the border preferences when formatting cells in Numbers?  After I make my selections and close the drop down menu, nothing happens.

    How do I set border preferences when formatting cells in Numbers?  When I use the drop down menu under Inspector, and set the preferences I want, a blue line shows up in the appropriate cell or cells to which I want to apply a border.  When I close the menu, the blue line goes away and there is no border.

    Jerry,
    I'm sorry for the intrusion on this thread. I had only made a simple comment, and then others responded. It was not my intention, especially since the original question was marked as answered. I will direct responses to any comments I make in fture postings that deviate from the OP's question to a newly created topic if I need a response, if not, I will just add a statement at the end of my comments to please not respond.
    As to your diagram, it is the ability to select the non-contiguous cells, and then be able to simulataneously select a specific part of the border edge, and then be able to change them all at once that I was after. That is something that is not possible in Numbers. It seems that in your diagram the "before", was attained by selecting each cell one at a time, and changing its border edge, one at a time. Then, in the "after", selecting the non-contiguous cells and changing the "Stroke" settings for the lines was attained simultaneously since that is possible in Numbers.
    If I am correct in how you attained the results in your diagram, that wasn't really what I was trying to achieve, since if the option were not grayed out, it would only select the same border edge on all selected cells. If I am incorrect, then I would like to have your input.
    Once again, sorry for allowing my comment to develop as it did.
    In God's Harmony

  • How do I double space a document using Pages There is NO Line Spacing control in the drop down menu in the format bar

    How do I double space a document in Pages. The instruction say to use the Line Spacing control in the format bar, but there is NO Line Spacing control in the drop down menu under Format. I'm writing a novel and I am having to manually double space after every line. It is **** when I am trying to edit my work.

    The computer is not too old (and neither are you ).   It may be better if you could upgrade it from 10.5.8 to 10.6 ... but that would not solve this problem.
    As both Paul and I have advised ... get yourself on Pages > go to the View menu and halfway down is the option 'Show Inspector'.   You'll end up with a panel like Paul showed you in his post of 08:42.   Let's see what you can do from there.

  • In Mail 3.6 how can I delete address from the drop down menu?

    When I update an email address in the Address Book, the drop down menu in a new email is still the old address.

    I think I figured it out. I have to click on the arrow beside the smart address in a new email and delete it there. I tried removing previous recipients but without success. I'm not sure what the name of my software is. Maybe snow leopard. How can I find that?
    Thanks for the suggestion and it probably helped a lot of other users and would have helped me if I knew the software.

  • How do I add more than 10 options to the drop down menu?

    Presently, I'm only able to give ten options but many of my items have 20-30 options.How do I add more than ten options to the drop down menu?

    BrazenChick wrote:
    Presently, I'm only able to give ten options but many of my items have 20-30 options.How do I add more than ten options to the drop down menu?
    It depends on the type of option. If each option has a separate price, then I don't know of a way to add more than 10 options since those options with the prices are encoded into the button id. (Well, you could encode the information yourself with PayPal's API, but that is way more involved than I've been willing to tackle.) If you have more than 10 options such as color, scent, etc that don't affect the price, then you can edit the code you have added to your website to add additional items in the list. For example, suppose you had options "red" and "green", the relevant part of the code would look something like this: <select name="os0">
    <option value="red">red </option>
    <option value="green">green </option></select> If you want to add the option "blue", you would insert the line : <option value="blue">blue </option> before the closing </select> tag. More than 10 options won't be saved in the PayPal button creator, but it will work just fine in your website since this type of option isn't encoded in the id.

Maybe you are looking for