How should I change the following SELECT QUERY?

Requirement:
There are checks in the program for material group 2, z93 AND z94 which should be skipped if the sales org = 'JP40'.
sales organisation is taken from the layout(SE51) dictionary fields (MODULE POOL PROGRAM)
The select query is:
select single matnr
                  into t_mvke-matnr  "dummy
                  from mvke
                  where matnr = t_9000-matnr
                    and vkorg = vbak-vkorg
                    and vtweg = vbak-vtweg
                    and mvgr2 in (c_z93,c_z94).
How should I skip the material group c_z93, c_z94 only for JP40(vbak-vkorg) sales organisation, except JP40 material group should be there for other sales org. but for JP40 material group should be skipped.
What would be the select query or should I give any kind of IF conditions before select query.
Please help me out.

Hi Rani K
You can try like
IF VBAK-VKORG = 'JP40'.
select single matnr
into t_mvke-matnr "dummy
from mvke
where matnr = t_9000-matnr
and vkorg = vbak-vkorg
and vtweg = vbak-vtweg.
ELSE.
select single matnr
into t_mvke-matnr "dummy
from mvke
where matnr = t_9000-matnr
and vkorg = vbak-vkorg
and vtweg = vbak-vtweg
and mvgr2 in (c_z93,c_z94).
ENDIF.
Thanks
Gaurav

Similar Messages

  • How do I change the image selected for the finalized movies pane in all events?

    How do I change the image selected for the finalized movies pane in all events? I made a movie some time ago in iMovie, and a still from this now appears as the image for Finalized Movies in the All Events pane (as well as showing up if I then click on this pane to take me to Finalized Movies). Anyone know how to change or delete this image, please?

    Unfortunately, the suggested solution in that thread does not work and the thread appears to be closed to replies.  That is, even though I am logged in the Reply|Quote|Mark as answer|Report as abuse items are missing.
    The suggested solution is:
    First, I found I had "img100.png" in  C:\Windows\Web\Screen  and
    C:\Windows\WinSxS\x86_microsoft-windows-themeui-client_31bf3856ad364e35_6.2.9200.16384_none_69ee3fa2269e545e
    1. Belonging to the Administrators Group, I replaced file Owner TrustedInstaller with my Username on both "img100.png" files
    2. After resizing the image I wanted to see on the Login screen to the resolution of "img100.png" file,
    I copied and pasted it to both "img100.png" files keeping this way the format (extension) and resolution of the original "img100.png" file,
    which I permanently deleted.
    However, I have not been able to replace the img100.pgn in C:\Windows\Web\Screen even after taking ownership of it and setting the permissions for my userid to All.  I edit it with mspaint and then try to save it. The save starts that then says the
    save was interrupted.
    The appears to be some additional protection besides the standard acls.
    http://www.saberman.com

  • How do I change the row selection by mouse movement

    How do I change the row selection on a jtable by mouse over events?
    Thanks, Randy

    got it thanks...

  • How can i change the default text "Query by Example"

    Studio Edition Version 11.1.1.3.0
    how can i change the default text *"Query by Example"* in a Panel Collection
    Thx

    Hi thieto,
    The label you are looking for is af_panelCollection.LABEL_MENUITEM_QBE*
    I'm currently writing a blogpost on this issue. In short, you will have to create a skin resource bundle.
    In the skin definition, refer to this bundle class.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <skins xmlns="http://myfaces.apache.org/trinidad/skin">
      <skin>
        <id>mySkin.desktop</id>
        <family>MySkin</family>
        <extends>blafplus-rich.desktop</extends>
        <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
        <style-sheet-name>skins/MySkin.css</style-sheet-name>
        <bundle-name>com.blogspot.lucbors.view.bundles.MySkinBundle </bundle-name>
      </skin>
    </skins>In this class, adjust the label text to your needs.
    package com.blogspot.lucbors.view.bundles;
    import java.util.ListResourceBundle;
    public class MySkinBundle extends ListResourceBundle {
      public MySkinBundle() {
        super();
    @Override
      public Object[][] getContents() {
        return _CONTENTS;
    static private final Object[][] _CONTENTS = {
         {"af_panelCollection.LABEL_MENUITEM_QBE","the text that you want"}
    }More in the blogpost
    Good luck
    Luc Bors
    Edited by: lucbors on Jul 26, 2010 11:39 AM (blogpost finished - URL added)

  • I am trying to update my phone software and it says there is no enough space to update, how do i change the default selected drive on windows?

    when trying to update my iPhone, i get a message that i have a full drive and i should delete some data, which i assume iTunes is using by default my C drive which is in fact full, how can I change the save directory to be able to save and change and update my iPhone? thank you

    What does the message say exactly? Are you sure it's not telling you the phone has no more space?

  • How can i change the record selection criteria via SDK?

    Hi,
    I wanna change the record selection criteria  in rpt file in java program, What API is required?
    Thanks.
    Forest

    Hi,
    You can use RAS API to change record selection formula at runtime. Go to
    https://www.sdn.sap.com/irj/boc/index?rid=/webcontent/uuid/f0aea666-5384-2b10-ffb0-a6facef1d5e5
    and look for Report Application Server Java SDK Feature Samples. It contains the record selection change code.
    Thanks
    Aasavari

  • How can you change the thumbnail selected for an Album in Photos?

    I'm having difficulty changing the photo that is automatically selected as the thumbnail on an iPad Air and iPad Mini.  How can I change this, and what parameter governs which photo is selected?
    There are a number of threads about changing the name, the creation date, the modified date, and none of those have worked for me.  After changing these various parameters, I have unsynced and resynced photos, and at this point, it is becoming an obsession of mine to change this. :-)
    I would appreciate any input if you've been able to do this in iOS7 and Maverics.  Thanks in advance!
    - Robert

    Okay, now it is working. I had to save the XLSX-file into the older XLS format, but that seems to work quite well.
    But I won't ever understand why InDesign loses its backward compatibility from one version to the other.
    Thank you, -hans-.

  • How do you change the following settings...

    I am an adult education teacher who needs to scan a large amout of material for my students. I scan them to the computer as pdf files. I foumd some old scans in my My Documents folder but I cannot find the ones I just scanned two minutes ago.
    Is there a way I can change:
    1. The default directory that scans are sent to
    2. The scan prefix so they don't all say "scan" at the beginning of the file name.
    Here are my specs
    I use the OfficeJet 6700 Premium on Windows 7 and the printer is being used wirelessly.
    I just have to say how much I love this printer! It prints faster than the 7200 I had previously and is much easier to use! The scan cover is also lighter and I can lift it up myself even with my weak arms and hands due to my splastic cerebral palsy. Thanks for making a great product!

    Hi @cparissi ,
    Thank you for taking the time to post on the HP Forums today! Hope you enjoy the experience.
    First off, very happy to hear you love the product, it truly is a great one! I understand you are having trouble with the whole scanning portion of the printer.
    Here is a document that will help you learn to scan from the software not the hardware. Scan from Windows 7 With the Full Feature HP Software for HP Multifunction Printers
    Let me know if this helps you understand the software scanning process better. Look forward to hearing back from you.
    I worked for HP.

  • How do I change the metadata select options presented in Bridge (Select Value)

    Is there a way to set value options on the IPTC metadata? There are preset options that exist on the "Minor Model Age Description" etc, can I set my own values somehow?
    Thank you all
    Tom

    Can I create my own value options for metadata fields? As an example for the IPTC Core/Copyright Status metadata field there are by default three pre-configured options (Unknown, Public Domain, Copyrighted). Can I change these three pre-configured options to say for instance (1 year, Unknown, Unlimited)?
    No, you can't.
    At least not that I know of in an easy way. And to my opinion you also should not be able to. IPTC is a world standard and many applications use the fields and preset values for search criteria.
    If you and others were able to recreate this to personalized versions there would be no standard possible and a lot of applications and/or users/buyers can't find the info anymore
    What you might do to add the specialized info about for instance copyright is add this to the other related copyright fields like rights usage terms or even in the copyrights notice (but actually this last field would not be the correct place although it might spring to attention).
    Same about age, you can add under or above to the editable model age field.

  • Giving computer to new user- how should I change the email settings?

    I bought a new MacBook Pro and want to give my husband my old one. How do I reset Mail so that it defaults to my husband's account, which is a .mac family member account attached to mine; the primary .mac account? We're also giving his MacBook to a co-worker and want to ensure that ALL personal information (banking, credit cards, emails, etc.) is erased permanently without erasing the applications.

    If you want to remove your email accounts from the Mail.app on this Mac, you can delete your accounts from within Mail, which will erase all account mailboxes and messages for your account or accounts. Then create your husband's email account.
    We're also giving his MacBook to a co-worker and want to ensure that ALL personal information (banking, credit cards, emails, etc.) is erased permanently without erasing the applications.
    The only way to ensure all data is completely erased and not recoverable by any means (simply deleting data from the hard drive does not prevent the deleted data from being recovered from the hard drive with a data recovery utility), is by reformatting the hard drive, and then re-install the OS and all included applications included with the install package that shipped with this Mac.
    Disk Utility provides several options for a secure erase of all data on the hard drive.

  • Need help for the following select query-- illegal character

    select product_group_id from product_group where description like '%%'
    I am not able to identify this character.
    When I try to type this character at
    SQL prompt, it does not accepts it.
    This character is in the description field and I have to replace it with NULL..
    Any suggestions..
    Thanks in advance
    null

    I'm not sure about the character you are talking about. But if you find this character in the ASCII character set, you can do all the operation against it with the help of CHR() function.

  • How could I change the name of Short Name?

    I have some trouble on name creation on 10.4. I am a computer admin in my company. Everytime we bought new Mac, I will give a Short Name to the computer which is a part of new system setting. My difficulity is, I need to change the name frequently when the machine swap to a new user. How should I change the Short Name instead of reinstall the system?
    Thanks a lot for your help!
    Felix

    To change an account's short name, log in from an administrator account and then open the NetInfo Manager application in the /Applications/Utilities/ folder. Change the old name to the new name in the admin group, as well as that user account's name and home properties; don't alter or delete any other accounts, groups, or properties. Next, open the /Users/ folder in the Finder and rename that account's home folder so that it has the new short name. Log out and back in.
    (11684)

  • In the Menu Bar, under File, then Open File, how do I change the selections?

    I have Firefox 11.0 and Windows 5.1 (2007). In Firefox, I click on FILE in the Menu Bar, then OPEN FILE (Ctrl+O), and I see a small box; it says Look in: Mozilla Firefox. Below is a selection of files within the folder Mozilla Firefox. To the left is a column of four other folders: Downloads, My Computer, John, Lori. The last two are obviously two of the folders I've created on my computer, using Windows. But I don't know how they got here! I have no recollection of customizing this particular Firefox menu option by adding those folders, nor can I figure out what to do in order to further customize it. Can anyone tell me: (1) how can I change the original "Look in" option so that it opens with something other than "Mozilla Firefox" (which, after all, I never need to access)? (2) how can I add/delete/change the choices offered in the column on the left, so that different folders are listed? (Currently, if I want to access my Windows folders/files, I first have to minimize the Firefox screen; this seems to me a nice shortcut, but I'd like it to include shortcuts to the folders I use the most, which does not include "Mozilla Firefox"!) (3) Is this actually a Firefox feature, or is it a Windows feature? It does look like Windows (Windows style, Windows folders), but it appears only in the Firefox Menu Bar, along with Bookmarks, Tools, etc. Thanks!

    This sounds like a Windows thing ( You can post a photo and I can tell you for certain). Those folders are Windows system created folders that your computer has had since it was installed, all Firefox does is use the Windows File picker, which is what you see when you open that window. So, to customize you'd have to do that from Windows Explorer (not Firefox).
    The Window should however remember what folder you were in last.

  • How do i change the default hand tool to select tool when a document opens?  also how do i get it to open in a single page view instead of 2 pages side by side

         how do i change the default hand tool to the select tool when i open a document.
    how do i change the view from 2 pages to a single page?

    Try setting the check boxes in Edit>Preferences>General for the following:
    - Make Hand tool select text & images
    - Make Hand tool read articles
    - Make Hand tool use mouse-wheel zooming
    Adjust these as needed but does it make any difference?

  • Hi! How can I change the shipping address for the program of replacement of the 1 generation ipod nano? I've already received the empty box and now I should send back the old ipod but I'd like to receive the new one to another address. Thank you.

    Hi! How can I change the shipping address for the program of replacement of the 1 generation ipod nano? I've already received the empty box and now I should send back the old ipod but I'd like to receive the new one to another address. Thank you.

    I would contact Apple directly and have them work with to get the iPod shipped to a new/different address.
    http://www.apple.com/contact/
    B-rock

Maybe you are looking for

  • Regarding EOS cameras, which would you recommend?

    I've had a Canon T1i for almost four years now & I have someone who wants to buy it from me, so I with that in mind, i'm thinking about upgrading now. I guess I would say that i'm an intermediate photographer and I usually take landscape photos. I'm

  • Sort an array of Application Class with respect to property

    class MyClass property string myProgram; property string myType; property string Description; end-class; Local array of MyClass &myProgArray; &myProgArray.Sort("D"); I want to sort the Array in descending Order with respect to "myType". How to provid

  • DVD Problems XP/P25-S507

    Last week I got the first Transformers DVD from NetFlix (stupid movie), popped it in and it played fine.  I was using Roxio 2010 CinePlayer (with the latest updates).  Later that day, I went to watch the newest Star Trek and I couldn't get it to play

  • Extraction from Oracle

    Hello Experts, As some of might already know that I'm new to complex extractions. Hence, the question: What are basic steps/tools needed to extract from Oracle. and What are the main challenges? I would really appreciate if someone could share some e

  • Unable to Sync or Backup

    When I try and Sync or Backup my iPad, I am getting an error message "The iPad "..." cannot be synced. An error occured while writing to the device". Any suggestions?