Require coding logic

Hi,
I need a logic for the below requirement,
Internal table 1 will have around 13 fields ex: a, b, c, d,.. m
Interanal table 2 has a field called FIELD which will have the field name ex a,b,c,d.. (field name is nothin but the fields in the internal table 1 i.e a,b,c,d.. m)
if the internal table 2 entries are d,e,g,h,k then i need to sort the internal table 1 by fields d,e,g,h and k
if the internal table 2 entries are b,d,f,k.a the i need to sort the internal table 1 by fields b,d,f,k,a
So could some one please suggest me some logic for this, It would be good if I could get a sample code for the same
Thnx,
Nalina
Moderator Message: Asking for coding without any effort fron you is NOT allowed.
Edited by: kishan P on Feb 16, 2011 4:34 PM

<<code removed by moderator>>
Edited by: kishan P on Feb 16, 2011 4:35 PM

Similar Messages

  • Minimum requirements for logic pro 7

    what is the minimum requirements for logic 7,can i get away with 10.2.8 or does it have to be higher?

    mr d, a lot has happened since you moved to mars......recommend you use some of that martian dracma you've been hoarding to buy in on tiger.
    logic just loves a big fat tiger to chow on.
    seriously, d rock, where you been, man?

  • Some help required with logic for a dynamic sql query

    i have below code but not sure how to resolve this problem - what i need is to be able to dynamically
    the problem:
    i have a rabbge of paratmeters coming in from a form and need to be able to create a dynamic query string to go into a prepared statement object.
    the problem i have is there are 2 fields year range and year.
    if year range is none i need to create the query string as such :
    where the value of year can be serached on exactly
    str.append("VOLUME_YEAR = ? ");the probelm is if the year range is 5 or year range is 10 i dont know how to maipulate the query string to be able to set the string such that i can then place the year value in the place holder in preparedStatement.setInt(1, year)
    how can i create the intial query string ie.- what are the possible things that i can do. - i'm thinking of things like putting some type of between or such type query statement - but not at all sure how the syntax would go - ie. how would i use the year value and how would i create this dynamic part of the query string so that the JDBC regonises it?
    thanks for any help.
    public String setVolumeYearQuerySt(String year, String yearRange, StringBuffer str){
              String volumeYearQueryString = null;
              Sring doAction= null;
              if (yearRange.equals("None")){str.append("VOLUME_YEAR = ? ");}
              else if(yearRange.equals("5 Years")){doAction = "Nothing";}
              else if (yearRange.equals("10 Years")){doAction = "Nothing";}
              return volumeYearQueryString;
              }

    Saish - thanks a lot for the code example.
    Although, i think its far too advanced for me to understand and try to manipulate it and fit my problem. I'm pretty new to programming as you can probably see from my simple if else type statements. But i'm going to give it a try and see how it goes.
    could you please be kind enough to demonstrate how i could use the above syntax to do the following. --
    i have a year being entered in form .  in the database there is a column year volume which contains year in single year value format and also in a year range  value format - thus as in below - how could i do this -
    eg.
    user can enter a value in the year field a single value or a range value - then he can select +/-5 or 10 yrs range on that value - the DB holds the values as single values and ranges as below -
    one suggested apporach is as follows if a single user is alloweed to enter only a single value in the filed and select a query range +/- 5 etc..
    volume year of �1926-1928� and the user enters �1927�, the query has to find all records where
    look for records that are �less than or equal to� 1927.  It then has to check to see if it contains a range.  For those that it finds containing a range, it has to work out what the �upper� year is and check to see if that is �greater than or equal� to 1927.  If it is, then that is a possible matchanother approach that is suggested is to have a drop down with all years from databse and user is only llowed to select value from drop down and following logic is suggested :
    Because volumes can be received as ranges (e.g. 1964-1966), some extra coding is required where the user asks for a Year Range (such as + or � 5).
    Using the Year selected from the dropdown list, split it into 2 values, a low year and a high year. For example, if �1965-1968� is selected from the year dropdown, split it into �1965� and �1968� for the low year and high year respectively. If �1964� is selected from the year dropdown, split it into �1964� and �1964�. Now take the Year Range that the user has entered into account. For example, if the user has entered 5, subtract 5 from the low year and add 5 to the high year. Using these values, include the following search criteria in the query to the database:-
    (<low year>     BETWEEN
                 left (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1)
         AND     right (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1))
    OR     (<high year>     BETWEEN
                 left (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1)
         AND     right (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1))regards - i think if i could solve the first approach that would be something good as its most user freindly
    thanks

  • Beta Testers required for Logic Pro X Keyboard

    Hey
    We're the company behind the colour coded shortcut editing keyboards for Logic Pro 9.
    We're about to launch our new compatible keyboard for Logic Pro X, however before we do we requrie 5 Beta testers who can check all shortcuts for us.
    For your help, you'll get an entirely brand new Logic Pro X keyboard free of charge.
    We do only require 5 people, however any additional testers will also be given a 20% of voucher for their time.
    Please drop me an email and we can send the new PDF.
    Many Thanks
    Mark Brown
    Editors Keys
    Company Director

    Hey thanks!
    My email is mark.b (at) editorskeys (dot) com

  • Urgent : Help required for logical comparison of two 2GB files.

    Large files need to be compared depending on Business logic. No byte to byte comparison to be done. It would require reference of data written at the start of the file at some other later part of the file too while comparing two files. File needs to be stored in memory while comparison is done. Kindly suggest some way out which would give best performance. Memory limitations are 256 MB RAM.

    File needs to be stored in memory while comparison is done.
    Memory limitations are 256 MB RAM.You have 4 GB of data. You have 256 MB of RAM to put it in. Obviously one of those two assumptions has to be changed. By the way, what is the XML connection for this question?

  • Require coding for purchase requisation outstanding aging report

    Hi Gurus,
                    I got a requirment to develop  purchase requisation outstanding aging report.Please provide me the coding for purchase requisation outstanding aging report.
    Points will be rewarded  for every reply.
    Regards ,
    Sonali.

    Hi Sonali,
    You need to use EBAN, EBKN Tables.
    Regards,
    Satish

  • Minimum system requirements for logic pro 7?

    Alright, im looking for a birthday present for my brother in law. hes always been jealous of my apple computers and ive decided to hook him up with a new computer and logic pro 7 for his birthday.
    My question is this: What are the basic system requirements to run logic pro?
    Im trying to do this as economically as possible, so i'm thinking a macbook or imac. anyone have any suggestions as to what i should but, but will still be stable when running logic pro?

    Alright, im looking for a birthday present for my
    brother in law. hes always been jealous of my apple
    computers and ive decided to hook him up with a new
    computer and logic pro 7 for his birthday.
    Do you have another sister? I've always wanted an in law who would buy me computer and pro audio gear. LOL.
    My question is this: What are the basic system
    requirements to run logic pro?
    Macintosh computer with PowerPC G4, G5 or Intel Core processor required; Intel Core, G5 or dual G4 processors recommended
    512MB of RAM
    Logic Node applications require PowerPC G5 or Intel Core processor and Gigabit Ethernet connectivity
    Mac OS X v10.4.3 or later
    Quicktime 7.0.3 or later
    8GB of available hard drive space
    DVD drive for software installation
    Available USB port for XSKey (copy protection)
    Low-latency multi-I/O audio hardware and MIDI interface
    This was taken from apple stores web site.
    Cheers and great gift idea
    Dee

  • Required variable logic in BI 7.0

    we have two characters (posting _date & Netdue date )required the variables with one entry for the posting date,then it takes the same value for netduedate also.(aging buckets reports (AR).)
    please let me know ur suggestions

    Hi,
    Create an input variable for posting date ZPOSTINGDT and a user exit variable ZNETDT on the net due date.
    In the CMOD write the follwing code
    WHEN 'ZNETDT'.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZPOSTDT'.
        IF sy-subrc = 0.
          CLEAR: l_s_range.
          l_s_range-low = loc_var_range-low.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
      ENDLOOP.
    Once written then restrict the net due date with the variable ZNETDT and posting date with the vairable ZPOSTINGDT in the query.
    Now what ever value you will enter for posting date will go to net due date.
    Thanks
    Ajeet

  • Help required with logic

    Moderator message: pleause use a meaningful subject in future
    Hi,
    I have a custom table which has customer ID field and amount field.
    In the report I need to bucket data by amount and no. of customers in that bucket.
    For ex: for amount range 1.00 u2013 25.00 there are 100 customers and total amount $1000.00, 25.01 to 50.00 there are 34 customers  and total amount $20,000 and so on.
    What I am planning to do is fetch records from table into internal table using group by clause,
    SELECT CUSTOMER AMOUNT FROM CUSTOMER_FINES INTO TABLE LT_FINES GROUP BY CUSTOMER AMOUNT.
    This would bring me in the internal table all customers and their fine. Now what would be the best logic to separate them out into groups.
    Approach what I thought of is having two variables for each bucket no_of_customers and total_amount. Then loop through the internal table add If conditions on amount and then accordingly increment no_of_customers for that bucket and add amount to total_amount.
    But the internal table is likely to have a lot of records about half a million. Is this a good approach. Can you'll recommend what is the right way to achieve this.
    Thanks in advance,
    CD
    Edited by: Matt on Dec 17, 2009 10:02 AM

    Hi,
    do this.
    1. create counters for the no of ranges you have say 1.00 u2013 25.00 counter1 total_amt1, 25.01 to 50.00 counter2 total_amt2 etc
    2. loop at your internal table
    3. check which range the amount falls into using IF statement
    4. increment counter* by 1 and add amount to total_amt*
    You are done.
    Regards
    Prasenjit

  • Merge statement required with Logic

    Table Name: F_SCENARIO
    System : Dataware house
    Oracle version : 11g
    Record Count : 2 Million records
    Correct scenario records
    F_Key
    F_Bridge_key
    Record_type
    1
    1
    1
    2
    1
    2
    3
    1
    3
    Wrong scenario records
    F_Key
    F_Bridge_key
    Record_type
    1
    1
    1
    2
    -5
    2
    3
    -6
    3
    I want to write a Merge statment to update the nagative values into 1,  can you please help me to provide some suggestion and query
    Please let know if you any confusion in the above data's

    Hi Tubby,,
    I have 2 million records like above set of records
    you have hardcoded f_bridge_key = 1, it not always same values of 1, why because the f_bridge_key is sequnce number
    Merge statment required becasue client is expecting with merge statment, the below highleted bold color is one set of records
    Wrong scenario records
    F_Key
    F_Bridge_key
    Record_type
    1
    1
    1
    2
    -5
    2
    3
    -6
    3
    4
    4
    1
    5
    -8343
    2
    6
    -3534
    3

  • Coding logic

    Hi,
       In my program have written a code such that it fetches all the document numbers based on the company code and posting date.See based on this condition in a table it may contain N number of document numbers and each document number may have N number of line items.In my logic have to write the code such that if a document number consists of line items more than 10 then those document number has to be deleted.In my code have identified the document number based on the condition but dunno to write the logic to delete the document number if it has more line items.
    the code is
    LOOP AT gt_bsik.
            AT NEW lifnr.
              READ TABLE gt_lfb1 WITH KEY lifnr = gt_bsik-lifnr BINARY
              SEARCH.
              CLEAR lt_vendors.
              lt_vendors-lifnr = gt_lfb1-lifnr.
            ENDAT.
            AT NEW belnr.
              gv_new_invoice_ind = 'X'.
              gt_bsik_copy-lifnr = gt_bsik-lifnr.
              gt_bsik_copy-belnr = gt_bsik-belnr.
              gt_bsik_copy-gjahr = gt_bsik-gjahr.
              gt_bsik_copy-buzei = gt_bsik-buzei.
              gv_count = gv_count + gt_bsik-buzei .
            ENDAT.
            IF gv_new_invoice_ind = 'X'.
              ADD 1 TO lt_vendors-count.
            ENDIF.
            gv_new_invoice_ind = space.
            AT END OF lifnr.
              APPEND lt_vendors.
              APPEND gt_bsik_copy.
            ENDAT.
            IF gv_count > 10.
    *          DELETE gt_bsik where lifnr =
    *gt_bsik_copy-lifnr and belnr = gt_bsik_copy-belnr and
    *gjahr = gt_bsik_copy-gjahr  .
              DELETE gt_bsik WHERE lifnr =
    gt_bsik_copy-lifnr  .
            ENDIF.
          ENDLOOP.
        ENDIF.
    gt_bsik is the internal table.
    Please help me to write the logic.The above mentioned logic is not workin
    Edited by: Julius Bussche on Feb 2, 2009 4:47 PM
    Please use code tags and meaningfull subject titles

    HI
    Before the loop statement take a copy the internal table into another internal table of the same type.
    gt_bsik_2[] = gt_bsik[]
    sort gt_bsek_2 by BUKRS GJAHR BELNR BUZEI descending.
    LOOP AT gt_bsik.
    read table gt_bsek_2 with key bukrs = gt_bsik-belnr
                                                  gjahr = gt_bsik-gjahr
                                                  belnr = gt_bsik-belnr.
    if sy-subrc eq 0.
      if gt_bsik_2-buzei > 10.
        delete gt_bsik_2 where        bukrs = gt_bsik-belnr and
                                                  gjahr = gt_bsik-gjahr  and
                                                  belnr = gt_bsik-belnr.
    endif.
    endif.
    endloop.
    after the endloop  table gt_bsik_2 will will  have only document numbers which have line items less than 10.
    Hope the above code helps you

  • What operating system is required for Logic Pro 9?

    Just bought a Mac Pro with 10.7.5 Lion already installed. I want to know If I need to change the operating system to support Apple Logic Pro 9?
    I have'nt bought Logic Pro 9 yet, but I bought Pro Tools 10 and would like to have both Logic and Pro Tools on the same computer. There both picky about
    which operating system to use. Which operating system would support both?

    I think sticking with Lion 10.7x is your best bet, you will find easier going with both Protools & Logic. Some report problems with Mountain Lion and Logic.
    Check and make sure you don't need the 10.7.5 supplemental update, if you do, INSTALL it otherwise Logic won't recognize some AU plugins.
    http://support.apple.com/kb/dl1599

  • SYSTEM REQUIREMENTS FOR LOGIC STUDIO-upgrade from LOGIC PRO 7

    I have been using LOGIC PRO 7 on my G5 1.8ghz Power PC G5 with 768 MB DDR SDRAM with no problems. I'd LOVE to upgrade to the new 8. I notice it said minimum req is 1.25ghz and 1gig of ram.
    Will I be able to run this on my current system for basic recording, etc. Do I REALLY need the 1.25 and 1 gig of ram? If i'm doing no more than 8 tracks live at a time-live instruments?

    Hi Mikey, First off they mean a G4 1.25 or faster. Your G5 1.8 should be fine. Second, the 768MB of RAM will be an issue. Fortunately RAM for your machine isn't that expensive. If I were you I'd load up with as much as you can. It will help you in all aspects of your computing, not just Logic. Check out the link below for some options.
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?model=183&type=Memory&TI=0552&shoup grds=Show+Upgrades
    Stootka
    P.S. I am in no way affiliated with the retailer in the link, it's just the first place I thought of. You may want to search on a few more to shop for the best deal.

  • Convert decode oracle pl/sq to ms sql and help required on logic

    I have below oracle query need to converted to ms sql. I also want to add a record into journal table when a 
     insert portion is executed  "caseidinserted" and update portion executed then "caseidupdate".
    Update table1 target
    set curr =
    decode(
        select efforts from (
        select source.efforts efforts
          from
            SELECT     a.aid,a.efforts,ab.lcs
                FROM     CIP a, DC ab
                WHERE    a id = ab.id
                AND    a.id = @id
          ) source
          where target.caseid = @caseidupd
          and target.aid = source.aid
        ) tmp, 0, tmp.efforts, curr
    modi = getdate( )
    where exists
    select 1
    from table1 tgt
    where tgt.aid = target.aid
    and tgt.caseid = @caseidupd
    insert into table1 values(caseid, aid, modi)
        select @caseidupd, source.aid, getdate()
          from
            SELECT     a.aid,a.efforts,ab.lcs
                FROM     CIP a, DC ab
                WHERE    a id = ab.id
                AND    a.id = @id
          ) source
        where not exists
            select 1
            from table1 target
            where target.aid = source.aid
            and target.caseid = @caseidupd
    something like this...
    INSERT (caseid,aid,modi)
     select @caseidupd,'appupdated'+source.aid,getdate()
     INSERT (caseid,aid,modi)
      select (@caseidupd,'appinserted'+source.aid,getdate()

    Hello,
    I am not familiar with Oracle Function. If I understand correctly, you can MERGE to perform INSERT and UPDATE operations on a table in a single statement. Please refer to the following statements:
    MERGE INTO table1 AS Target
    USING (select @caseidupd, source.aid, getdate()
    from
    SELECT a.aid,a.efforts,ab.lcs
    FROM CIP a, DC ab
    WHERE a id = ab.id
    AND a.id = @id
    ) As Source (caseidupd,aid,date )
    ON Target.aid = source.aid and target.caseid =source.caseidupd
    WHEN MATCHED THEN
    UPDATE SET Target.curr=...,--query for get values
    Target.modi=getdate()
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (caseid,aid,modi) values (caseidupd,'appupdated'+source.aid,getdate())
    Reference:http://msdn.microsoft.com/en-us/library/bb510625.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Required small logic to pick data from p2006

    Please delete this thread
    Edited by: saslove sap on Apr 6, 2010 12:31 PM

    Hi shankara,
    1. Direct Select statement ,if used for cluster tables ,will cause performance issues
    U are right, but there is no option.
    2. EVEN if we use some standard FM,
       it will indirectly, use a select statement only.
    3. Hence, we cannot avoid using select statement.
    regards,
    amit m.

Maybe you are looking for