Can you "combine" criteria for 2 or more fields on a Selection Screen?

Good day everyone,
Here's my question:  I understand that I can put fields on a Selection Screen and pre-fill them with data values.  In this particular case, I want to pre-fill a couple of hidden fields with data values that will be used as criteria when I read data from the database; however, I need to pull back records that have this COMBINATION of data.  For example:
WERKS     BTRTL
Z002      Z001
Z002      Z002
Z003      Z001
Z003      Z002
So in my SQL, if I say "werks IN s_werks" and "btrtl IN s_brtrl", true, it will still work.  But really, I need to say "if werks = 'z002' and btrtl = 'z001', or werks = 'z002' and btrtl = 'z002', etc.  I can't rely on the simple "IN" functionality because it's possible a new value could be added in the future:
WERKS     BTRTL
Z003      Z003
So if I use the "IN" logic and the record has werks = 'Z002' and btrtl = 'Z003', it would be returned.  But I really don't want it returned, since a combination of werks = 'Z002' and btrtl = 'Z003' doesn't exist in my table of valid combinations.
Is this even possible to do in a Selection Screen?  Do I go ahead and populate the fields separately, use the "IN" functionality, then spin through my resulting internal table and delete anything that doesn't match my "table" of valid combinations?  Do I skip putting these on a Selection Screen completely and check the values in my SQL statement?
Thanks in advance -- points, as always, will be given.

Hi
Yuo can try to use FOR ALL ENTRIES option.
IF you have:
WERKS BTRTL
Z002 Z001
Z002 Z002
Z003 Z001
Z003 Z002
You should do something like that:
DATA: BEGIN OF <TAB_SEL> OCCURS 1,
       WERKS TYPE WERKS,
       BTRTL TYPE BTRTL,
      END   OF <TAB_SEL>.
WERKS BTRTL
<TAB_SEL>-WERKS = 'Z002'. <TAB_SEL>-BTRTL = 'Z001'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z002'. <TAB_SEL>-BTRTL = 'Z002'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z003'. <TAB_SEL>-BTRTL = 'Z001'.
APPEND <TAB_SEL>.
<TAB_SEL>-WERKS = 'Z003'. <TAB_SEL>-BTRTL = 'Z002'.
APPEND <TAB_SEL>.
SELECT * FROM <TABLE> INTO TABLE ITAB
   FOR ALL ENTRIES IN <TAB_SEL>
                   WHERE WERKS = <TAB_SEL>-WERKS
                      AND BTRTL = <TAB_SEL>-BTRTL.
In this case you need to fill correctly the internal table <TAB_SEL> with the all combinations.
Max

Similar Messages

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • Need to add more field in the selection screen in tcode crm_dno_monitor

    Hi,
    In the transaction code crm_dno_monitor, i need to add extra fields in selection screen. Do we have any way to add fields in the standard tcode crm_dno_monitor.
    Thanks
    Prasad

    If you need to add 5 fields on ticket screen then use EEWB enhancement.
    The ticket screen transaction is crmd_order which even opens up after you double click the ticket no from crm_dno_monitor report list.
    for crm_dno_monitor you can have the BADI CRM_DNO_MONITOR which will add later the column for the fields which you can add using EEWB
    Check the following blog which guide you for custom field creation using EEWB
    /people/bruyneel.guillaume/blog/2008/06/13/service-desk-implementation-guide-part-ii

  • Can you output a multicam video (more than one angle on screen)

    I'm trying to output some video for an engineering project and I need to be able to show four angles of the same intersection on one video. It is possible to do this? If so, how?

    I am not sure if I have your question correct but yes it is possible.
    Place a video on a track with another on the track above, a third on the track above the second.  You can stack as many as you want on top of each other.
    Then with the clip on the highest numbered track highlight the clip and then in the effects panel resize and reposition the clip, repeat going down the tracks
    Col

  • F4 Help in BSP for a input field in the Selection Screen...Urgent

    Hi ,
    Can anyone possible tell me how to put F4 help in a BSP
    Regards...

    Hi Pavan,
    It's a reccurring question in BSP forum that cannot be solved that easily...
    You will find some examples of how it can be handled in demo BSP :
    <b>bsp_valuehelp</b>
    <b>bsp_vhelp</b>     (this one is MVC-oriented)
    To go further, you should have a look at the following blog :
    /people/thomas.jung3/blog/2004/09/17/bsp-150-a-developer146s-journal-part-xii-150-value-input-help-popups
    /people/thomas.jung3/blog/2004/11/01/bsp-value-input-help-popups-version-20-part-1
    Hope it helps.
    Best regards,
    Guillaume

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • I´m doing a design for presale, where I will need a router what support PAT for 500 or a little more of users, it not need any more features only static routing and dhcp pool for 500 users, can you help me for know what router recommend?

    I´m doing a design for presale, where  I will  need a router what support PAT for 500 or a little more of users, it  not need any more features only static routing and dhcp pool for 500 users, can you help me for know what router recommend?

    What is your WAN speed currently and projected WAN speed in the next 3 years?

  • Can you install logic express on more than one computer

    can you install logic express on more than one computer ?

    Be sure to read the End User Licensing Agreement for questions of this nature. You are allowed to install Logic on two computers that you own, for example an iMac and a MacBook Pro. You cannot, however, use the two computers at the same time if they are on the same network. You can use one computer as a Logic Node to shift some of the processing load (which you would likely do with an ethernet cable) but you don't need to have a full installation of Logic on the Node  machine, just the Logic Node installation. The idea of allowing two installations is so that you might take advantage of a portable  computer in the field for on-site recording then later transfer those files to a desktop studio set up for further editing.

  • How can you get audio for  books on the kindle

    how can you get audio for  books on the kindle

    The audio inputs on Macs are line level inputs and not mic inputs.  You need a mic with a built in preamp (battery powered) or more conveniently a USB mic or bluetooth headset.

  • Can you make captions for a slideshow?

    can you make captions for a slideshow? otherwise how can i rename the photo so that i can select view titles in the slideshow and use it as a caption?

    Jim lo:
    Welcome to the Apple Discussions. You can't make captions with iPhoto. You can edit the title of a photo by selecting it and then going to the Info window at the bottom of the Source pane, the "i" button, clicking on the title field and enter what text you'd like.
    If you plan on using the slideshow in iDVD then those titles will not show as they will be lost in the "overscan" area that is common to all movies played on TV. You can create the slideshow in iMovie and have lots of control over titles and subtitles and greater control of the audio track, cut, fade in/out, etc.
    Do you Twango?

  • Can you purchase iMatch for an iPod classic?

    Can you purchase iMatch for and iPod Classic? It doesn't make that clear when reading the advertisement for the service.
    Thanks for your help!

    The iTunes Match service is attached to your iTunes library, not the device itself. Hopefully the tracks on your device are also all in your library, and the backup of it, however iTunes Match might still be an additional backup and remote access service if it suits your needs. It has more use to owners of iOS devices who can download any of their matched tracks from iCloud to their device on demand.
    tt2

  • My iPod speaker is broken, i bought it one year ago, can you fix that for free?

    my iPod speaker is broken, i bought it one year ago, can you fix that for free?

    You are not address ing Apple here, we are all just users like yourself.
    If the headphones work but not the speaker:
    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so. There is a little switch in the headphone jack that disconnects the speaker when the headphone jack is inserted.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    If the speaker still does not work, make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack.
    Apple Retail Store - Genius Bar
    If not under warranty Apple will exchange your iPod for a refurbished one for this price. They do not fix yours. The Apple warranty is for one year unless you purchased the optional Applecare extended warranty
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • Can you get iChat for windows or is it just for macs???

    Is iChat just for mac's or can you get it for windows?? and if so how?

    Hi
    AIM 5.9 is here
    They do need to be using XP
    They do need to "tune" the camera and mic to the AIM Application
    They need to allow the application as an exception through the XP firewall
    http://www.ralphjohnsuk.dsl.pipex.com/page12.html#_Service
    This site says it in a lot more detail
    http://www.mvldesign.com/videoconferencetutorial.html
    If you really want to make this work.
    Page 5 on my site lists other options of Mac to PC video chats including the Skype option
    10:21 PM Wednesday; February 14, 2007

  • HT201272 Can you access paid for apps/movies from iTunes on another device if you have not synced? I need to delete movies from my iPad to make space but don't want to forfeit the purchase as have not synced movies to another device yet.

    Can you access paid for apps/movies from iTunes on another device if you have not synced? I purchased movies on my new iPad, but need to delete some off as have no space left. I have not synced the movies I have purchased on my iPad to any other devices as yet and want to know if I can retrieve the movies from iTunes later if I removed them now without syncing first? I do not want to forfeit my purchases.. Please help!

    Welcome to the Apple Community.
    You can re-download content purchased from the iTunes store (availability varies depending on location) using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the iTunes store (availability varies depending on location) using the purchased option which is revealed in the iTunes app on your iOS device by tapping the more button at the bottom of the screen.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.
    Try deleting the problematic book (electing to remove original file if/when prompted) and then re-downloading the file from the iBook store.
    You can re-download content purchased from the iBook store (availability varies depending on location) using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the iBook store (availability varies depending on location) using the purchased option at the bottom of the screen after you tap the store button in the top corner of the iBook app on your iOS device.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.
    You can re-download content purchased from the app store using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the app store using the purchased option which is revealed by tapping the updates option at the bottom of the screen of the App store app on your iOS device.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.

  • Can you combine different icloud accounts?

    CAn you combine different icloud accounts?  For some reason, my new iphone 6 keeps on popping up an old email address for icloud.

    When you delete the account from your device, you will be given the opportunity to save Safari data, reminders, calendars and contacts to your device, which you can later merge with the other account once you login.
    You won't be able to save your photo stream photos in the same way, so if you have any photo stream photos that are not already in your camera roll, you should move them there before you delete your account.
    Your iWork documents can be saved to iTunes on your device, but if you have them on a Mac they would be much easier to save to your desktop there. You can move them back after you switch.
    Notes can be shared to messages or mail and copy and pasted back after the switch. Although if you have a Mac, you may find it easier to do there. You could also use a temporary secondary account (see last item) to log into both accounts and copy and paste directly into your other account.
    You can set up Mail forwarding at iCloud.com mail preferences (little gear icon-bottom left) to receive mail from your old address to your new one.
    As an alternative to just switching, you might consider switching and adding your previous account back as a secondary account at settings > mail, contacts, calendars. You would still need to move your photos and iWork documents and save your safari data, but you'd have access to your old mail, contacts, calendars, reminders and notes.

Maybe you are looking for

  • How many times can I attempt my restriction code

    How many times can I attempt my restriction code

  • How to programatically get a Java version (Not default one) ?

    Hi, Java Guru, Does anyone know how to programatically get a Java verstion through its full path ? For example, there are 5 JVM installed on a user's machine: JRE1 JRE2 JRE3 JRE4 JRE5 How do you know the Java version under JRE3 ? From command line, y

  • Zen microphoto firmware probl

    I have a zen mircophoto and it said it had firmware problems and i did the reload firmware but didnt have a computer with me. now when i pulg it into the computer to try to reload the firmware it says it doesnt detect the player but it charges and sa

  • Problems downloading CS4 upgrade

    I just purchased CS4 upgrade from Adobe. I am using their download manager to download the files. There are 2 files that apparently need to be downloaded. One is 834mb and seems to download just fine but can't be opened. The other is a 1.17 mb file t

  • System Not sleeping as required

    My systems; that always slept and hibernated perfectly no longer do so since I updated to 8.1.  Looking around the web it seems that a great many people are having the same problem.  I have tried all the solutions that I can find to no avail! All I n