My select select statement seems not to work...

Hello experts,
I am having trouble with my select statement below. Here is what I need to do:
1. loop at itab it_equz.
2. get single asset number(ANLNR) and description(SHTXT) from table ITOB where EQUNR =_equz-equnr.
3. get single asset number(ANLN1), asset subclass(ANLN2 and subnumber(ORD42 from table ANLA where its asset(anln1) equals to the asset fetched by ITOB. (no. 2 step) and DEAKT eq '00000000'
4. Now, I would get all fields(select single) in table ANLC where ANLN1 equals to asset fetched by ANLA and ANLN2 equals to ANLN2 fetched by ANLA and AFABE eq '01'.
5.endloop.
Now, the problem is that I can't seem to get the right values in table ANLC. Now, my boss said that the values that I must get in ANLC must not be deactivated. So I did that by getting the required fields(no 3 step) in table ANLA where its DEAKT is equal to '00000000'.
Now, my select statement for ANLC seems not to work properly since I have the proper where conditions. Anyway, below is my select statement that I did:
LOOP AT it_equz.  "no 1 step
SELECT SINGLE anlnr shtxt FROM itob   "no 2 step
          INTO (it_itob-anlnr, it_itob-shtxt)
          WHERE equnr = it_equz_dum1-hequi.
MOVE it_itob-anlnr TO it_finaltab-asset_dum.
            MOVE it_itob-anlnr TO it_finaltab-asset.
            MOVE it_itob-shtxt TO it_finaltab-description.
SELECT SINGLE bukrs anln1 anln2 ord42   "no 3 step
            FROM anla                                  
            INTO (it_anla-bukrs, it_anla-anln1, it_anla-anln2,
                  it_anla-ord42)
            WHERE anln1 = it_finaltab-asset
              AND bukrs IN r_iwerk
              AND deakt = '00000000'.
MOVE it_anla-ord42 TO it_finaltab-asset_sub.
              WRITE it_finaltab-asset TO v_asset.
              CONCATENATE v_asset '-' it_anla-anln2
              INTO it_finaltab-asset_subnum.
SELECT SINGLE bukrs anln1 gjahr afabe knafa kansw  "no 4 step
                          answl kaafa nafal aafav aafag
                          nafap aafap nafav nafag FROM anlc
                      INTO (it_anlc-bukrs, it_anlc-anln1, it_anlc-gjahr,
                            it_anlc-afabe, it_anlc-knafa, it_anlc-kansw,
                           it_anlc-answl, it_anlc-kaafa, it_anlc-nafal,
                           it_anlc-aafav, it_anlc-aafag, it_anlc-nafap,
                           it_anlc-aafap, it_anlc-nafav, it_anlc-nafag)
                        WHERE anln1 EQ it_finaltab-asset
                          AND anln2 EQ it_anla-anln2
                          AND bukrs EQ it_anla-bukrs
                          AND afabe EQ '01'.
it_finaltab-accq_cost = it_anlc-kansw + it_anlc-answl.
            IF p_posdep = 'X'.
              it_finaltab-acc_dep = it_anlc-knafa +
                                    it_anlc-nafav +
                                    it_anlc-nafag +
                                    it_anlc-kaafa +
                                    it_anlc-aafav +
                                    it_anlc-aafag.
            ELSE.
              it_finaltab-acc_dep = it_anlc-knafa +
                                    it_anlc-nafav +
                                    it_anlc-nafag +
                                    it_anlc-kaafa +
                                    it_anlc-aafav +
                                    it_anlc-aafag +
                                    it_anlc-nafap +
                                    it_anlc-aafap.
            ENDIF.
APPEND it_finaltab. CLEAR it_finaltab.
          APPEND it_equz_dum2. CLEAR it_equz_dum2.
          CLEAR it_itob. CLEAR it_anla. CLEAR it_anlc.
endloop.

Hi,
  Please avoid selection in loop. it will lead to major performance issue.
avoid move statements ; instead use assignment.
1st :- select the entire data into internal table
eg:-
SELECT anlnr shtxt FROM itob
INTO table it_itob
for all entries in it_equz
WHERE equnr = it_equz-hequi.
1st select
2nd select.
2nd :- now loop on ur internal table to get the desired result.
it is good to work with internal table rather than select statements in loop.
Regards

Similar Messages

  • I downloaded iMovie 11 butit seems not to work with IDVD6. Do I need to get the Newest IDVD? Which IDVD is the latest and where do i download it from?

    I downloaded iMovie11 but it seems not to work with iDVD6. Do I need to down load the latest IDVD?

    Where do I download it from?
    You need to use iDVD 09 or iDVD 11.  These are only available on disk.
    IDVD is a wonderful piece of software and well worth the low cost of $40.
    http://www.amazon.com/Apple-MC623Z-A-iLife-VERSION/dp/B003XKRZES/ref=sr_1_1?ie=U
    If you live in a state where Amazon collects sales tax you may prefer the link below.
    http://dealmac.com/lw/artclick.html?1,527850,1872219

  • The function AirDrop on my Mac BookAir seems not to work, not detect my iPad. How to fix this?

    The function AirDrop on my Mac BookAir seems not to work, not detect my iPad. How to fix this?

    AirDrop on iOS devices (iPads, iPhones, iPod touches) can only AirDrop things with other iOS devices. AirDrop on Mac can only AirDrop things with other Macs.
    I hope this solves your question.
    Austin

  • Can the new garageband open files from the previous garageband? in my case it seems not to work and I would like to know if it is possible at all...

    Can the new garageband open files from the previous garageband? in my case it seems not to work and I would like to know if it is possible at all...

    No.
    I find it extremely frustrating that Apple does not care for such an obvious bug affecting one of the basic funcionalities of AirPlay. Unless, of course, if there's something I don't know - but I've done some research and it seems that plenty of people have same issue and no solution is settled.

  • HT4437 Is it possible to zoom in photos when using airplay? It seems not to work at all. I can only zoom in if i use mirroring and even then i have to reconnect mirroring each time I chage an albumor even go from the photo to the album level.

    Is it possible to zoom in photos when using airplay? It seems not to work at all. I can only zoom in if i use mirroring and even then i have to reconnect mirroring each time I chage an albumor even go from the photo to the album level.

    No.
    I find it extremely frustrating that Apple does not care for such an obvious bug affecting one of the basic funcionalities of AirPlay. Unless, of course, if there's something I don't know - but I've done some research and it seems that plenty of people have same issue and no solution is settled.

  • Dropped my iphone and now home button doesnt work and will not charge.lower third of it seems not to work.i assume it's had it.what will i lose off it?

    dropped my iphone and now home button doesnt work and will not charge.lower third of it seems not to work.i assume it's had it.what will i lose off it?

    rbrook0113 wrote:
    I know any device could malfucntion but if it costs $40,000 to buy you could at least warn someone of the possible malfuctions. It makes the company look bad when a large amount of your devices act up and you "cant help them" if they dont pay extra. Im just saying.
    Sorry but that makes no sense at all.  How can they possible know what things will possible malfunction on your device?  Anything that they think is highly likely to malfunction they would have addressed in desiging and manufacturing the device in the first place, during development.  They've made and sold many millions of iPhones, and many of them have lasted years without any problems (I know, I've owned such iPhones personally).  So how could they possible know if yours was any more likely to develop any issues than any of those other trouble free ones?
    It's hardware - stuff sometimes breaks randomly.  No amout of money ever guarantees or even reduces the likelyhood of random product failures.
    Take it in to Apple and see about getting it fixed.

  • My quick selection tool seems not to work on my mac.

    it also shows different options in the tool bar than those described on adobe pse help.  i discovered it works sort of like stretching and tacking a rubber band.  i also discovered that the the magic wand tool works and has the same options as are described in pse help... anyone else have this problem?  i have a macbook pro OS X 10.6.8  both these tools are awesome once you learn to use them!
    Message was edited by: sleah_in_norcal

    Can you post a screenshot of what you see in the tool options?

  • Quick Select algorithm - implementation seems not to function- why?

    Hello! I have to work out a essay about the Quick Select algorithm. For this I found a book with implementation code.
    But if I implement it in java it does not work.
    Here is the code, could you please tell me what's wrong with it?
    public class QuickS {
    public static void main(String[] args) {
              int [] int_array = {4,0,6,5,3,9,8,2,1,7};
                    System.out.println("\n"+quickselect(int_array,9,2));
    } //endmethod main
    public static int quickselect (int [] array, int len, int k)
              int pivot = len - 1;
              pivot = partition(array, 0, len -1, pivot);
              int rank = pivot + 1;
              if (k == rank)
              {           for (int m= 0; m < array.length; m++)
                        System.out.print(array[m]+" ");
                   return pivot;
              if (k < rank)
                   return quickselect(array, rank - 1, k);
              else
                   return pivot + 1 + quickselect(partArr(array, pivot+1), len - rank, k - rank);
         }  //endmethod quickselect
         public static int partition(int [] array, int l, int r, int pivot)
          int i = l-1;
          int j = r;
          swap(array, pivot, r);
          pivot = r;
          while(i < j)
               do i++; while ((i < j) && (array[i] < array[pivot]));
               do j--; while ((j > i) && (array[j] > array[pivot]));
               if (i >= j)
                    swap(array, i, pivot);
               else
                    swap(array, i, j);
          } //endwhile
          return i;
       } //endmethod partition
         public static int [] swap(int [] arr, int index1, int index2)
              int tmp = arr[index2];
              arr[index2] = arr[index1];
              arr[index1] = tmp;
              return arr;
         } //endmethod swap
         public static int [] partArr(int [] arr, int index)
              int [] newArr = new int [arr.length-index];
              for (int i = 0, j = index; i < newArr.length; i++, j++)
              newArr[i] = arr[j];
              return newArr;
         } //endmethod partArr
    } //endclass QuickS  Please help me! What do you think is sense of the quickselect method? I thought to find out the index of a searched value? e.g. in this case k=2 and the returned value has to be 2 then. But this doesn't work...

    Oracle9i Database Concepts
    Release 1 (9.0.1)
    Part Number A88856-02
    PL/SQL Blocks and Roles
    The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and whether it executes with definer rights or invoker rights.
    Named Blocks with Definer Rights
    All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer rights. Roles are not used for privilege checking and you cannot set roles within a definer-rights procedure.
    The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that executes with definer rights queries SESSION_ROLES, the query does not return any rows.
    Anonymous Blocks with Invoker Rights
    Named PL/SQL blocks that execute with invoker rights and anonymous PL/SQL blocks are executed based on privileges granted through enabled roles. Current roles are used for privilege checking within an invoker-rights PL/SQL block, and you can use dynamic SQL to set a role in the session.

  • AUS auto populate device seems not to work.

    I'm running CSM 4.0.1 and followed the instructions on how to use CSM to update an ASA5540 filewall through AUS. I created a policy in CSM with the AUS IP address and credentials and chose 'Device' to deploy to.
    On page 1-3 of "Getting Started with AUS" it states: When you use Security Manager to deploy configurations to a device through AUS, the device is automatically added to the AUS inventory after the device successfully contacts AUS and retrieces the configuration. This is the normal method for adding devices."
    The AUS fails the attempt with this error message:
    CALLHOME-DB-DEVICE_NOT_FOUND: Record for device with ID Remote-ASA-1 could not be found. Action: Please ensure the device was added to the AUS and that the device config contains the correct device ID.
    And the ASA device (8.4.1) with debug turned on, displays this error msg:
    Remote-ASA-1# Auto-update client: Sent DeviceDetails to /autoupdate/AutoUpdateServlet of server 164.72.44.162
    Auto-update client: Processing UpdateInfo from server 164.72.44.162
    Auto-update client: Failed to contact: https://164.72.44.162/autoupdate/AutoUpdateServlet, reason: ErrorList error code: CALLHOME-DB-DEVICE_NOT_FOUND, description: Record for device with ID Remote-ASA-1 could not be found.
    It's complaining the the device ID is not found. But the hostname of the ASA is the same as the device ID in CSM.
    Is there something I'm missing or not doing for this to work?

    Hello Jeff,
    there are few things to make the AUS work, let's try to list it and make sure we have everything in place.
    1- we need to configure the device for AUS. Let do it via CSM:
    in the Device View select your firewall and configure your AUS server via
    Device Admin ->Server Access->AUS
    The ip address will be the same as CSM and credential the same you use to login in the CSM Server
    2- deploy to the ASA to make sure it has teh AUS config. The config deployed should look like:
    auto-update device-id hostname
    auto-update server https://*@/autoupdate/AutoUpdateServlet source
    3- make sure that the hostname of the device is THE SAME as the display name in CSM (you can check that by right clicking on the device and click on device properties)
    4- we are now ready to setup the AUS server. Right click on the device and select Device Properties. In the Autoupdate section (at the bottom)
    complete the fields by putting all the needed info. The server name and ip address should be the same as the CSM (AUS is running on the same server)
    and the credentials are the same used to login in the CSM gui and used at point 1
    5- Once this is setup, you are ready for the first deployment. It is important to deploy just after because the CSM needs to create the right configuration file on the AUS server. After the first deployment you should be able to see the device listed in the AUS portal (under devices)
    Let me know if it worked.
    Stefano

  • The usb ports on my mac book air seem not to work

    So, they do but it seems selective. On my 2008 iMac I would plug in my thumb drive and it was near instant but on my MBA ill plug it in on the right side and it rarely works but my mouse works fine there. On the left side it takes a few seconds then it works but it seems longer than my older macs. This computer isn't old about a week old, so ideas. Its not a mounting issue it dosen't show up in the disk utility, until it works.

      Reset SMC.     http://support.apple.com/kb/HT3964
      Choose the appropriate method.
      "Resetting SMC on portables with a battery you should not remove on your own".
    You can return a new Mac within 14 days of purchase.
    Return it and get another one.
    A new Mac is in warranty for 1 year from the date of purchase.
    A new Mac comes with 90 days of free tech support from AppleCare.
    AppleCare: 1-800-275-2273
    Genius Bar reservation
    http://www.apple.com/retail/geniusbar/
    Best.

  • I tried to copy a formula from one field (max of a, b) to another (min of a,b). Paste seems not to work.

    Hello,
    I am creating a form from a PdF file. In this form, there is a lot of calculated fields with formulas adressing the same fields (ie : max of a,b,c,d and min of a,b,c,d).
    As the process to select the fields you use for the formula is a rather slow one, I tried to copy the selected fiels from one field to another (select the fields in the properties window, right clic, then copy). I couldn't paste what I copied.
    I work with Acrobat X pro, in win 7.
    Thanks for your help

    Good day!
    A simple Paste does not work for you?
    It should place the clipboard content as a new Layer which you can then move around.
    If there is any chance that the elements need to be scaled, rotated etc. I would prefer to place them as Smart Objects (File > Place …) and do the masking that is specific to the images themselves in those.
    Regards,
    Pfaffenbichler

  • XSQL and insertion in temporary table: seems not to work

    Using XSQL 9.0.2.0.0 and 9i Database.
    XSQL does not really inserts rows in temporary table.
    Given a regular table and a temporary table:
    create table toto (id number, name varchar2(30));
    create global temporary table toto_tmp
    on commit delete rows as
    select * from toto where 1=2;
    -- XSQL database connection is set to <autocommit>false</autocommit> in XSQLConfig.xml
    -- XSQL insertion in regular toto table:
    -- with commit-batch-size="0" xsql:insert-request does not issue commit:
    <xsql:insert-request commit-batch-size="0" table="toto" transform="params.xsl"/>
    <xsql:dml>
    begin
    -- PL/SQL processing
    commit;
    end;
    </xsql:dml>
    -- Data inserted in table TOTO are "seen" from the XSQL:DML block
    But if inserting in temporary table TOTO_TMP using:
    <xsql:insert-request commit-batch-size="0" table="toto_tmp" transform="params.xsl"/>
    the XSQL:DML do not see the inserted rows !
    This works as if commit-batch-size="0" had no effect when using temporary table!
    Thank you for help.

    Hi Subhash,
    thanks for your help.
    We are on AIX on our database sever and using Oracle 11.
    Our app servers are using on Linux.
    Best regards
    Carlos

  • Infra Red seems not to work on my device

    Dear all,
    I just install the SDK on my Windows 8 machine runing on a Dell Precision M6000 with :
    - Intel core I7,3Hz CPUn 16 Ram
    When I run the sample from browser SDK, and select the Infrared Basic WPF demo, my Kinect screen is completly black.
    Running all Other sample is woring ok, seems just the infrared.
    I just would like to be sure my device is ok or not based on those test sample
    What could be the problem, the room has too much light ?
    thanks for advise
    regards
    serge

    It sounds like you may need to update your graphics card drivers from the NVidia/AMD/Intel site manually.
    Brekel

  • HT1522 I have a mid 2011 iMac running Lion, and the remote seems not to work at all!

    Have been trying to pair my Apple Remote with my mid 2011 imac.
    Nothing doing, although if I go and try same remote with an older macbook, it works fine.Battery all fine too, have been checking via digital camera. Something on my iMac is preventing this remote form being seen (and yes I have disabled ir receiving on the laptom after testing it)
    any ideas?
    thanks for your time!!

    Ok, sounds like the safe mode boot worked... You probably don't want to always be in safe mode though (some reduced functionality) so does it do a normal boot now? If not, you should then reboot into safe mode and run Disk Utility. Then select Macintosh HD on the left hand side, and click the Verify Disk button. If needed, it will ask you to Repair Disk. If there are errors found, Repair Disk again until there are none. Then try another normal boot and reply with result, wether good or bad.

  • Why does the highlight feature seem not to work about 1/2 the time in various ibooks.  I'm trying to take notes and about 50 pages into a book the highlight feature stopped working.

    I've long noted that the highlight feature in ibooks is clunky and fairly limited in it's note-taking features, but the last two books I've read I've had trouble getting the highlight feature to work at all.  I click and drag over text and nothing happens.  I try with command depressed and nothing happens.  If I double click a bunch it will eventually highlight one word, but nothing more.  What gives?
    Also, not to be snarky, but why can't I seem to find a button that would read text to speach for me?  How do blind people use this service, or illiterate, or dyslexic, or people like myself who can learn far more from hearing then from reading. 
    And why does the text of a book often render so that it's haf cut off of the page?

    There is a button for speech within the iBooks menu. Edit > Speech. You might be better off buying Audiobooks. You can get them from the iTunes Store or Audible.com

Maybe you are looking for

  • How to make reformat

    how to make reformat for my macbook pro

  • Questions on Named Query

    We have a few questions about named query. According to the Toplink documentation, we can register the named query in 2 places. 1. Register the name query in the “query manager” in a Session level - The documentation said that these are for “GLOBAL”

  • Updating Swing components from a different class

    I would like to use the JTextArea component in a JFrame to display fast updating text from my application. My application is very simple. When the app launches the GUI is created then my application engine would start processing and displaying text d

  • Does JaxB support inported schemas?

    hi i'm trying to compile the CD_DataBase.xsd schema (using the JaxB that I got from the JWSDP found at Sun's site) which references to an Album element in Album.xsd For some reason, my xjc task falls when trying to read the imported schema. here are

  • Lens correction for Hasselblad V series lenses

    Lightroom does not provide lens correction for Hasselbald V series lenses, e.g. Carl Zeiss Planar 2,8/80. Hasselblad Phocus program does but Lightroom ignores Phocus metadata in FFF files imports. Is there any posssibility to achieve lens correction