Help in building the Cacluclation

Hello,
I am trying to convert the below SQL into discoverer report.
In SQL I am getting exactly what I wanted from SQL plus output, but when I try to build calculation in Discoverer I am not getting any value in the calculated column.
select plan_id, END_DATE, SUM(usage), SUM(CASE WHEN STATUS = '2' THEN USAGE ELSE NULL END) from usg_TBL a, CUSTOMER b
where a.acct_id = b.acct_id GROUP BY PLAN_ID, END_DATE
I created calculation in Discoverer based on the following
SUM(CASE WHEN STATUS = 'NEW' THEN USAGE ELSE NULL END)
Please help me to find out where I am making the mistake.
Thanks in advance

Hi,
Maybe you want:
SUM(CASE WHEN STATUS = '2' THEN NVL(USAGE, 0) ELSE 0 END)
Rod West

Similar Messages

  • Help with building the JQuery UI Modal Dialog

    Version 4.1.1.00.23
    Hello,
    I have requirement to create validation on a manually created tabbed form to display a message to the user that they haven't entered values on 12 fields on the row.
    The message is to ask if they really want to save the record or not. If they want to save the record call apex.submit('SUBMIT') and if not call apex.submit('CANCEL2').
    I've have no experience with JQuery and my javascript isn't too strong either.
    I'm hoping someone can help me to get this working.
    The message I want to display, but I don't know how to add that to the dialog box is:
    "You have no time assigned to your Forecast. Do you want to save this Forecast without time entered?<br /><br />"Yes" to save the Forecast.<br /><br />"No" to return with no changes."
    My code so far is:
    [code]
    function confirmNoTimeSaved()
        if (html_GetElement('P11_CONFIRMNOTIMESAVED').value == '1')
            $(function()
                $( "#dialog-confirm" ).dialog({
                                                    resizable: false,
                                                    positon: {my: "center", at: "center", of: window},
                                                    title: "Confirm Saving With No Time",
                                                    height:140,
                                                    width:500,
                                                    modal: true,
                                                    autoOpen: false,
                                                    buttons: {"Yes": function(){apex.submit("SUBMIT");},"No": function(){apex.submit("CANCEL2");}};
        else
            apex.submit('SUBMIT');   
        $x_Value('P11_CONFIRMNOTIMESAVED',NULL);
    [/code]
    Please let me know if I need to explain something.
    Thanks,
    Joe

    pkpanda,
    Thanks for replying. Yeah I looked at the plugins and the problem with the one you referenced is that it's for 4.2 and we're on 4.1.
    Is there someone that can help me with this?
    Thanks,
    Joe

  • Help me build the perfect Macbook Pro for web design!

    I am a beginning web design student, and I'm planning to purchase a new MacBook Pro in the coming weeks. I need to be able to effectively run a few of the CS6 programs, including Photoshop and Dreamweaver. Which configuration should I have---I really don't want to spend more than $2000.00. Should I beef up on RAM and skimp on the processor?
    Or, would I be better off getting an iMac? While losing portability and processor speed, the screen real estate would be incredible.

    If it were up to me, I would choose the latter;
    2.3GHz i7 Quad Core
    With 8GB DDR3
    Simple really, for the program you'll be using, you'll benefit from the power of the quad core.  On a day to day usage however, you might feel that the 2.9GHz is faster.  That may very well be true for apps that don't call for quad processing.
    But for what you'll be using it for however, that quad core is your best bet.

  • PLEASE help me squeeze the price of this build!!

    Hi everyone-
    I have been working on a new computer build with heavy CS5 usage in mind, particularly After Effects and Premiere.  I have regular access to free cameras and gear, and I need an editing machine to facilitate a few personal projects  This machine will be the kernel of a home studio, but will also be used for more ordinary internet / bill-paying types of work as well.
    The help I need from you:
    The price on my build right now is $3,956.00.    Yikes!!  I need help squeezing the total pricetag of this rig to a more manageable number, hopefully under $3,000.  However, I know that I am purchasing literally everything in the system brand new, including things like monitors, speakers, the keyboard, etc, so my pricetag will be a bit higher than most builders in this forum.
    As you'll see, I just mostly went on Newegg and selected the highest-rated component that was in a comfortable price range for me.  I'm pretty sure that everything in my list will be able to play together nicely, but if there are ways that I can take steps down in price without affecting the quality of the system too drastically, those are the changes I want to know about. 
    TO SUM UP:  After reading this forum for awhile, I've put together the computer I think I WANT.  But I barely know what I'm doing with this stuff!  Can you help me build the computer I NEED?
    GUTS
    CPU- Intel i7 930 Bloomfield 2.8 Ghz
    $290 on Newegg
    GPU- PNY GTX 480
    $500 on Newegg
    RAM- 12 GB of CORSAIR XMS3(6x2)
    $329 on Newegg
    MOBO- ASUS P6X58D
    $230 on Newegg
                TOTAL PRICE FOR GUTS-  $1,349
    Add'l questions:
        -Any way to come down on the RAM price but keep speed and reliability?
    DRIVE SETUP
    RAID CONTROLLER- areca ARC-1222 PCIe x8
    $400 on Newegg
    BOOT DRIVE (PROGRAMS & OS)- WD Caviar Black WD6402AAEX 640GB
    $80 on Newegg
    SCRATCH & CACHE "WRITE" DRIVES- (2) WD Caviar Black WD1501FASS 1.5TB in RAID 0
    $220 on Newegg
    EXPORT DRIVE- Western Digital Caviar Black WD1002FAEX 1TB
    $100 on Newegg
    MEDIA & PROJECT FILE "READ" DRIVE-(6)Western Digital Caviar Blue WD3200AAKS 320GB in RAID3
    $300 on Newegg
                TOTAL PRICE FOR DRIVE SETUP-  $1,100
    Add'l questions:
        -Haarm sings the praises of areca controller cards, and RAID 3 is an attractive option for my Media storage.  But I can't afford to spend $700 or more on a RAID card.  If I skip the RAID card altogether, and use the MOBO's on-board RAID capabilities, I'll be sapping juice from the CPU.  Can anyone recommend a good mid-level RAID card for smaller arrays?  Is the money spent facilitating the RAID worth the gained performance, without going balls-to-the-wall with a $1200 card?
        -Does my drive setup make sense?  Can I save money either by going for cheaper drives, or by simplifying the entire setup?
    CASE AND POWER
    CASE- Antec Twelve Hundred Black Steel Case
    $150 on Newegg
    PSU- CORSAIR CMPSU-850TX 850W ATX12V 2.2 / EPS12V 2.91
    $130 on Newegg
    UPS- CYBER POWER CP1350AVRLCD 1350 VA UPS
    $155 on Newegg
    Add'l questions:
           -I picked the UPS and PSU pretty much based on price.  Did I make OK choices?  Could I afford to cut some of the budget in this area?
                TOTAL PRICE FOR CASE AND POWER-  $435
    SYSTEM COOLING
    CPU COOLING- Thermalright TRUE Black 120Rev.C CPU Cooler
    $60 on Newegg
    Arctic Silver 5 Thermal Compound
    $10 on Newegg
    RAM COOLING- (6) VANTEC ICEBERG DDR-A1C Heatsinks only
    $30 on Newegg
    GPU COOLING- ZALMAN VF900 – CU 2 Ball VGA Cooler
    $60 on Newegg
    CASE COOLING- (5) Scythe Gentle Typhoon 120mm 800rpm
    $90 on endpcnoise.com
    DRIVE COOLING- ????
                TOTAL PRICE FOR SYSTEM COOLING-  $250
    Add'l questions:
           -I had planned on replacing the stock case fans that come with the Antec 1200 with some different "quiet" fans.  Is this going overboard?
            -Do I need individual fans for each hard drive, or am I better off getting a few larger fans to cover the entire drive area? 
            -Is the cooling system that I've put together here overkill, or sensible?
    MEDIA R/W
    BLU-RAY R/W- Pioneer BDR-205BKS Blu-Ray RW
    $200 on Newegg
    DVD R/W- ASUS DRW-24B1ST/BLK/B/AS DVD RW
    $22 on Newegg
    MEDIA R/W- AFT XM-35U BLACK USB 2.0 Kiosk Card Reader
    $35 on Newegg
                TOTAL PRICE FOR MEDIA R/W-  $257
    Add'l questions:
           -In the age of Vimeo, is a Blu-ray burner really necessary right now?
    HUMAN I/O
    MONITORS- (2) ASUS VH236H Black 23"
    $400 on Newegg
    SPEAKERS- BEHRINGER MS16 16 W 2.0
    $60 on Newegg
    MOUSE- Microsoft BlueTrack Explorer Mini Mouse
    $50 on Newegg
    KEYBOARD- Logitech Comfort Wave 450 Black 104 Normal Keys USB Wired Ergonomic Keyboard
    $40 on Newegg.com
    Adobe Premiere keyboard stickers
    $15 on editorskeys.com
                TOTAL PRICE FOR HUMAN I/O-  $565
    Add'l questions:
           -Cheaper monitors that will get the job done?  I picked these sort of randomly..
            -Can anyone recommend a cheaper mouse that they like?  Corded options are OK.
            -What kind of speakers do you have in your home office setup?  I don't really need professional Studio Monitor quality at this phase in my career.  Is it smarter to invest in a decent pair of headphones instead?
                          TOTAL PRICE OVERALL- $ 3,956
    A little about me /my needs and usage:
    I went to film school.  I'm not an editor per se, but I did a number of experimental compositing and animation projects, things that I'd like to resurrect, polish up, and put in my reel.  I also plan to use this machine to digest projects that are not yet shot.  With this machine, I'll be making the switch from Apple systems to PC.  
    Formats I'd like to be working with in the future:
    -Sony SxS cards (XDCAM EX)
    -Many flavors of DV video (DVCPROHD, DV, AVCHD, HDV)
    -HDSLR footage (native H.264-based streams)
    -Maybe RED footage?
    I've never built a computer by myself before, but I have friends that have, who can help me.  The components I've selected for this build were based mostly on advice I'd read in this forum, particularly Haarm's many guides for newbies like me  
    I do NOT need to be the fastest kid on the block, but I do want to build a reliable system the RIGHT WAY.  I don't want to be cheap about cooling.  For the HDD system, I want optimized data throughput that is structured in a sensible way. 
    Many thanks in advance to anyone who bothers to read even 1/2 of all that stuff, let alone anyone who makes helpful suggestions on how I can bring down the price of this system. 
    Talk soon!!
    -Leo K

    Thanks to everyone for their helpful advice.  I've taken all of it into account, and I was able to shave almost $700 off of the price of my build!
    This is the result of my first major revision to my list.  Does anyone see major conflicts or poor decisions here?
    GUTS
    COMPONENT
    NEWEGG PRICE
    CPU
    Intel i7 930 Bloomfield 2.8 Ghz
    $290 on Newegg
    GPU
    PNY GTX 480
    $500 on Newegg
    MOBO
    ASUS P6X58D
    $230 on Newegg
    RAM
    (2 sets) CORSAIR XMS3 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Triple Channel Kit Desktop Memory Model TR3X6G1600C9
    $380 on Newegg
                TOTAL PRICE FOR GUTS-  $1,400
    DRIVE SETUP
    COMPONENT
    NEWEGG PRICE
    BOOT DRIVE
    Western Digital Caviar Black WD6401AALS 640GB
    $75 on Newegg
    SCRATCH DRIVES
    (2) WD Caviar Black WD1501FASS 1.5TB in RAID 0
    $220 on Newegg
    EXPORT DRIVE
    Western Digital Caviar Black WD1002FAEX 1TB
    $100 on Newegg
                TOTAL PRICE FOR DRIVE SETUP-  $395
    CASE AND POWER
    COMPONENT
    NEWEGG PRICE
    CASE
    Antec Twelve Hundred Black Steel Case
    $160 on Newegg
    PSU
    CORSAIR HX Series CMPSU-1000HX 1000W ATX12V 2.2
    $240 on Newegg
    UPS
    powercom KIN-2200AP 2200 VA 1320 Watts 6 Outlets UPS
    $234 on Newegg
                TOTAL PRICE FOR CASE AND POWER-  $634
    SYSTEM COOLING
    COMPONENT
    NEWEGG PRICE
    CPU COOLING
    Thermalright TRUE Black 120Rev.C CPU Cooler
    $60 on Newegg
    THERMAL COMPOUND
    Arctic Silver 5 Thermal Compound
    $10 on Newegg
    CASE COOLING
    (2) Scythe Gentle Typhoon 120mm 800rpm
    $36 on NEWEGG
                TOTAL PRICE FOR SYSTEM COOLING-  $106
    MEDIA R/W
    COMPONENT
    NEWEGG PRICE
    BLU RAY RW
    LG WH10LS30K 10X Blu-ray Burner
    $130 on Newegg
    MEDIA RW
    AFT XM-35U BLACK USB 2.0 Kiosk Card Reader
    $35 on Newegg
                TOTAL PRICE FOR MEDIA R/W-  $165
    HUMAN I/O
    COMPONENT
    NEWEGG PRICE
    MONITORS
    (2)- SAMSUNG 22"Height &Pivot Adjustable Stand Black Widescreen LCD Monitor
    $360 ON Newegg
    SPEAKERS
    PNY GTX 480
    $100 on Newegg
    MOUSE
    ASUS P6X58D
    $30 on Newegg
    KEYBOARD
    Logitech Comfort Wave 450 Black 104 Normal Keys USB Wired Ergonomic Keyboard
    $40 on Newegg.com
    TOTAL PRICE FOR HUMAN I/O-  $530
                          TOTAL PRICE OVERALL-  $ 3,230

  • I have tried another exercise, but again I will need help, here's the code

    hi,
    I have another problem. here's the question pluss the code.
    public interface Patient{
    public void doVisit(float hour);
    public boolean hospitalize();
    1. I will need to write a class name OrdinaryPatient which extends Patient.
    the class will include value int that his name age and another value that will be boolean
    of disease.
    I have to do two constructors. one that don't get values and give them default and the other one
    that does get values.
    another method name docVisit which get a visit to the doctor time visit and will print a message.
    the method hospitalize will hospitalize the patient (and if he will have disease he will get true).
    and for age I have to write methods of get and set.
    2. I will need to write a class of Hipochondriac that extends from OrdinaryPatient.
    I have to do two constructors. one that don't get values and make default and the other one that do get values.
    I will need to ade int by the name of numberOfHospitalize.
    I will need to move the method hospitalize that it will be possible to hospitalize the hypochondriac
    on with the value numberOfHospitalize that his small from 5 and if he will hospitalize he will return
    the value true.
    3. write class PatientClass which will be the method main.
    do 10 objects from OrdinaryPatient, 5 that don't get values and 5 will get randomaly age and
    chronic disease with true.
    do 10 objects from Hipochonidraic, 9 that don't get values and one get all of them.
    save all objects in value from Patinet.
    print for each of them their age.
    print for the OrdinaryPatient alone the method of Hospitalize.
    ok, here's what I did.
    1. OrdinaryPatient
    pbulic class OrdinaryPatient implements Patient{
    private int age;
    private boolean disease;
    public OrdinaryPatient(){
    this.disease=false;
    this.age=0;
    public OrdinaryPatient(int age,boolean ddisase){
    this.disease=disease;
    this.age=age;
    public int getAge(){
    return age;
    public void setDisease(boolean disease){
    this.disease=disease;
    public void setAge(int age){
    this.age=age;
    public void docVisit(){
    System.out.println("Patient's visit is one hour");
    public boolean hospitalize(){
    return false;
    2. public class Hipochondriac extends OrdinaryPatient{
    private = numberOfHospitalize;
    public Hipochondriac();
    super();
    numberOfHospitalize=0;
    public Hipochondriac(int age, boolean diseased, int numberOfHospitalize){
    super(age.diseased);
    setnumberOfHospitalize(numberofHospitalize);
    from here I don't know how to continue.
    3. public class PatientClass{
    public static void main(String args[]){
    patient patinets= new patient[20];
    for (int i=0; i<5; i++){
    patients= new OrdinaryPatient();
    from i'm stuck!!!
    if you can help me to improve it I will appriciate it...
    Einat

    here my result.
    1. public interface Patient{
         public void docVisit(float hour_;
         public boolean hospitalize();
    public class OrdinaryPatient extends Patient
         private int age;
         private boolean disease;
    //constructors
         public OrdinaryPatient(){
              age=20;
              disease=true;
         public OrdinaryPatient(int age, boolean disease) {
              setAge(age);
              this.disease=disease;
    //methods
         public int getAge() {
              return age;
         public void setAge(boolean disease) {
              if(age>0 && age<120)
                   this.age=age;
         //overriding methods.
         public void docVisit(float hour) {
              System.out.println("your visit turn is at "+hour");
         public boolean hospitalize(){
              System.out.println("go to hospital");
              if(disease)
                   return true;
              else
                   return false;
    2. public class Hipochondriac extends OrdinaryPatient{
         private int numberOfHospitalize;
    //constructors
         public Hipochondriac(){
         public Hipochondriac(int age, boolean disease, int numberOfHospipitalize){
              setAge(age);
              this.disease=disease;
              this.numberOfHospitalize=numberOfHospitalize
         //methods
         public int getNumberOfHospitalize(){
              return numberOfHospitalize;
         public void setNumberOfHospitalize(int numberOfHostpitalize){
              if(numberOfHospitalize>0)
                   this.numberOfHospitalize=numberOfHospitalize;
         public boolean hospitalize(){
              if(numberOfHospitalize<5)
                   System.out.println("go to hospital");
                   numberOfHospitalize++;
                   return true;
              else
                   return false;
    3. public class PatientClass
         //constructors
         private PatientClass(String[] args){
              //private methods helps to build the object.
              intialArr(args);
              printAge();
              gotHospital();
    //methods.
    private void intialArr(String[] args){
         int i;//array index
         for(i=0;i<arr.lents/2;i+=2)
              arr=new OrdinaryPatient();
              arr[i+1]=new OridnaryPatient((int)(Math.random()*121),true);
         for(;i<=arr.length-2;i++)
              arr[i]=new Hipochondriac();
         arr[i]=new Hipochondriac(Interget.parseINt(args[0]),
         private void printAge(){
              for(int i=0;i<arr.length;i++)
                   System.out.println(((OrdinaryPatient)arr[i]).getAge());
         private void gotoHospital(){
              for(int i=0;i<arr.length;i++)
    //checking for ordinarypatient objects only
                   if(!(arr[i] instanceof Hipochondriac))
                        //dont need casting
                        arr[i].hospitalize()[
         //main method
         public static void main(String[] args)
              //setting the commandLine array from the main to PatientClass object
              PatientClass pc=new PatientClass(args);
    let me know if it's seems logic to you.
    thank you, Einat     

  • I purchased CS6 2 years ago (or more) I now keep being asked to register, I also find Bridge is running slow in building the cache is this two problems or are they interrelated  - any help please.

    Hello could anyone advise me please:
    I purchased CS6 Student edition approx 2 years ago, and I have been using it pretty much on a daily basis.  Now it has suddenly started prompting me to register the software because the trial has ended. I did think about uninstalling and reinstalling but thought against this in view of the fact that CS6 is no longer available for purchase.
    I am also having problems with the speed of Bridge in building the cache it seems to take for ever - about 2 sec per image.
    Any help would be much appreciated.

    Sign in, activation, or connection errors | CC, CS6, CS5.5
    And for the Bridge cache simply flush it from the Bridge prefs and rebuild it - after doing disk maintenance liek defragmenting your drives.
    Mylenium

  • I am in the process of doing a Proof Of Concept / Evaluating products that can help us build a Java Application to Convert a PDF document to a Searchable PDF.   I wanted to check is there any simple JAVA API from Adobe to achive this ? Any direction in th

    I am in the process of doing a Proof Of Concept / Evaluating products that can help us build a Java Application to Convert a PDF document to a Searchable PDF. 
    I wanted to check is there any simple JAVA API from Adobe to achive this ? Any direction in this regard is greatly appreciated.@

    You can achieve this using LiveCycle PDF Generator JAVA API. You can find required code here:
    Adobe LiveCycle * Quick Start (SOAP mode): Converting a Microsoft Word document to a PDF document using the Java API
    In parameters:
    //Set createPDF2 parameter values
    String adobePDFSettings = "Standard";
    String securitySettings = "No Security";
    String fileTypeSettings = "Standard OCR";
    "Standard OCR" file type setting will run OCR on input pdf. In the code, instead of doc file provide a pdf file. Resultant pdf will be searchable PDF i.e OCRed PDF.
    Feel feel to ask any further questions.

  • Please help me to build the logic

    Hi All,
    Please help me to implement the following logic.
    The conditional statements should not only be executed in sequence, but also if any of them are true they should not be overridden by any subsequent conditional statements being true.
    When actual effort Accepted or Rejected for AST proposals and calculate a flag for “enhance to AST guideline” = Y/N as follows for each employee and display at the employee level
    1)If AST eligibility = N AND proposed AST % >0, then “N”
    2)Else If AST eligibility = N AND proposed AST % = 0 then “n/a”
    3)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST = 0 then “Y”
    4)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST >0 then “N”
    5)Else If AST eligibility = Y AND Act Rank = 2 AND proposed AST = 0 then “Y”
    6)Else If AST eligibility = Y AND AST % is greater than or equal to the AST guideline minimum AND less than or equal to the AST guideline maximum, then “Y”
    7)Else If AST eligibility = Y AND AST % is less than the minimum guideline OR greater than the maximum guideline, then “N”
    I tried the following code but I am not getting the expected result .
    Could you Please help me to build the logic.
    Your earliest response is very helpful to me.
    if (upper(P_stat)='ACCEPTED' or upper(P_stat) like 'REJECTED%') then
    else if NVL(P_elgi,'N') <> 'Y' AND P_prop > '0' then
    P_flag := 'N';
    else if(NVL(P_elgi,'N') <> 'Y' AND P_prop = '0') then
    P_flag := 'N/A';
    else if ((NVL(P_elgi,'N')='Y') AND P_rank = '3' AND P_prop = '0') then
    P_flag := 'Y';
    else if((NVL(P_elgi,'N')='Y') AND P_rank = '3' AND P_prop > '0') then
    P_flag := 'N';
    else if((NVL(P_elgi,'N')='Y') AND P_rank = '2' AND P_prop = '0') then
    P_flag := 'Y';
    Else if (P_prop >=ast_min_guide AND P_prop <= ast_max_guide ) then
    P_flag := 'Y';
    else
    ((P_prop < ast_min_guide) OR (P_prop > ast_max_guide)) then
    P_flag := 'N';
    end if;
    end if;

    Thanks for ur quick responce .
    When actual effort Accepted or Rejected for AST proposals and calculate a flag for “enhance to AST guideline” = Y/N
    Once the above condition is satisfied we have to check for remaing conditions
    if (upper(P_stat)='ACCEPTED' or upper(P_stat) like 'REJECTED%') then
    once it is satisfies then we have to go for remaing conditions.
    how can we do it in CASE statement.
    1)If AST eligibility = N AND proposed AST % >0, then “N”
    2)Else If AST eligibility = N AND proposed AST % = 0 then “n/a”
    3)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST = 0 then “Y”
    4)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST >0 then “N”
    5)Else If AST eligibility = Y AND Act Rank = 2 AND proposed AST = 0 then “Y”
    6)Else If AST eligibility = Y AND AST % is greater than or equal to the AST guideline minimum AND less than or equal to the AST guideline maximum, then “Y”
    7)Else If AST eligibility = Y AND AST % is less than the minimum guideline OR greater than the maximum guideline, then “N”
    I tried the following code but I am not getting the expected result .

  • Help me to build the logic

    Hi experts,
    i want to build the logic as follows.
    the give fields in the ITAB are.
    F1    F2 F3
    123  546
    222  788
    222  277
    222  666
    345  431
    345  888
    777  888
    F1 AND F2 are the given fields i want to out put f3 as follow.
    F1    F2  F3
    123  546  10
    222  788  10
    222  277  20 
    222  666  30
    345  431  10
    345  888  20
    345  888  20
    if f1 abd f2 repeats the f3 will be same number.
    if f1 repeats and f2 is diff then sequence will be incremented every time by 10.
    when f1 starts with diff number then f3 starts with number 10 as above shown.
    Please build me the logic by using Internal table.
    Please help me

    Hi Ramesh,
    Please see the following test program..
    <b>REPORT ZSRITEST44 .
    DATA: BEGIN OF gt_data OCCURS 0,
            f1 TYPE i,
            f2 TYPE i,
            f3 TYPE i,
          END OF gt_data,
          BEGIN OF gt_datac OCCURS 0,
            f1(10),
            f2(10),
            f3 TYPE i,
          END OF gt_datac,
          gv_counter TYPE i.
    gt_data-f1 = 123.
    gt_data-f2 = 546.
    APPEND gt_data.
    gt_data-f1 = 222.
    gt_data-f2 = 546.
    APPEND gt_data.
    gt_data-f1 = 222.
    gt_data-f2 = 277.
    APPEND gt_data.
    gt_data-f1 = 222.
    gt_data-f2 = 666.
    APPEND gt_data.
    gt_data-f1 = 345.
    gt_data-f2 = 431.
    APPEND gt_data.
    gt_data-f1 = 345.
    gt_data-f2 = 888.
    APPEND gt_data.
    gt_data-f1 = 345.
    gt_data-f2 = 888.
    APPEND gt_data.
    gt_data-f1 = 777.
    gt_data-f2 = 888.
    APPEND gt_data.
    SORT gt_data BY f1 f2.
    LOOP AT gt_data.
      AT NEW f2.
        ADD 10 TO gv_counter.
      ENDAT.
      AT NEW f1.
        CLEAR gv_counter.
      ENDAT.
      IF gt_datac-f1 EQ gt_data-f1
      AND gt_datac-f2 EQ gt_data-f2.
        IF gv_counter GT 0.
          gv_counter = -1 * gv_counter.
        ENDIF.
      ENDIF.
      gt_datac-f1 = gt_data-f1.
      gt_datac-f2 = gt_data-f2.
      gt_datac-f3 = gv_counter + 10.
      COLLECT gt_datac.
      IF gv_counter LT 0.
        CLEAR gv_counter.
      ENDIF.
    ENDLOOP.
    LOOP AT gt_datac.
      gt_data-f3 = gt_datac-f3.
      MODIFY gt_data TRANSPORTING f3
      WHERE f1 = gt_datac-f1 AND f2 = gt_datac-f2.
    ENDLOOP.
    LOOP AT gt_data.
      WRITE: / gt_data-f1, sy-vline, gt_data-f2, sy-vline, gt_data-f3.
    ENDLOOP.</b>
    Hope this helps..
    Sri

  • Building the swing tree  -- GR8 JAVARIANS PLEASE HELP

    I need to create a swing tree where i have set of co-ordinates in a array.
    My array contains the following value
    1.1.1.2
    1.1.3
    1.2.3
    2.6.2
    Based on this array i need to create the tree structure
    in the above co ordinates
         1.1.1.2 ->First level - First node (parent)
         1.1.3 --> should be the child node for 1.1.1.2 since this the only coordinate which is in the next level (child for      1.1.1.2)
         1.2.3- This should be the next level (2nd level)
         2.6.2- This should be the 3rd level
    My array is dynamic how to build the tree using co-ordinates?.. is there any algorithm ? API ?
    HELP NEEDED !!!!

    I'm glad you recognise that an API is what you need. You'll find one by clicking on the link on the left labelled APIs.

  • Classpath error while building the web dynpro project

    Hi
    I have created an application in which on clicking the button on one view , next view opens and data is displayed in the tables. This data i am giving as static, and for that i have created a java file. this java file is located in the subfolder i have created in the package path i have given. While building the application, i get these two errors :
    1) The project was not built due to classpath errors (incomplete or involved in cycle).
    2) Missing required source folder 'BPOutageTable/BPOT'
    BPOutageTable is the application name, and BPOT is the subfolder in which java file is present.
    This application is similar to "The Master/Detail Viewer Application" example in the tutorials.
    Can anybody please help in this?
    Thanks & regards,
    Anupreet

    Hi,
       You have give your classpath in your "lib" folder of the Dynpro application.
       check your lib folder shows exact class path or not.
    if you wish to add any jar files import it to your lib folder so you will not have compilation problem.
    Hope it helps.If it is then close this thread.
    Regards,
    Guru

  • Need help to build Portal Insert URL in OAM..

    Hi All,
    I have a requirement to customize the user Manager screen in such a way that i need to get only the search criteria tab(but not any of the tabs or links) and the search results.
    To achieve this i have builded below Portal URL.
    http://training.orademo.com/identity/oblix/apps/userservcenter/bin/userservcenter.cgi?program=search&comp=true
    By using this above URL i am able to hide all the tabs in the browser but i need to have that search criteria to be displayed in the screen.
    Can any one please suggest me the solution to achieve this.
    Its bit urgent requirement.
    Thanks in advance.
    Siva Pokuri.

    Hi Colin,
    Thanks for your quick response.
    URL that i posted will search the users in OAM. But my requirement is like i have to select the attribute and search type and search value from that page(in that Page i should not have UserManager, GroupManager, Org Manager, Identity SYstem Console tab and My Profile , reports ...etc links should not be appear) i sould be able to select the attribute that i would like to search only. so the search functionality should be there.
    Based on this req i have to build the URL.
    Please help me.
    Thanks & Regards,
    Siva Pokuri.

  • Need help to build a navigation from billing component BEABDS_BILLDOC to sales order component BT115H_SLSO on follow up create action

    Hello Experts,
    I have been assigned to a CRM-UI Object which is basically to create follow-up action i.e. creating debit/credit memos with reference of one/multiple billing documents.
    SAP has already provided an option to create the follow-up action for 1 billing document at a time, but the requirement is to create follow-up action for multiple billing documents at a time. For example, There are 2 invoices raised against a dealer "DEL" and due to some reason the dealer wants to send back the products.
    Now the dealer wants to create only 1 claim/return for those 2 invoices, Which Standard SAP doesn't provide.
    I did some of the development and added the 'Follow-up create' Button to the search result work area of the billing search. But could not able to build the link between the Billing and Sales order Components.
    It would be really a great favor if you can guide me to build this navigation link.
    Please let me know if any further information required.
    Please find the attachment for step-by-step process.
    Codes and Configs:
    Method DO_PREPARE_OUTPUT to provide the “Follow-up Create” Button
    method DO_PREPARE_OUTPUT.
    CALL METHOD SUPER->DO_PREPARE_OUTPUT .
    DATA:
    lr_coco                  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
    ls_button                TYPE crmt_thtmlb_button,
    lv_usage                  TYPE string,
    lv_info                  TYPE string,
    lv_info_transfert        TYPE string,
    lv_show_btn_transfer      TYPE boolean VALUE abap_false,
    lv_show_btn_cancel        TYPE boolean VALUE abap_false,
    lv_show_btn_split        TYPE boolean VALUE abap_false,
    lv_show_btn_create      TYPE boolean VALUE abap_false,
    lr_col                    TYPE REF TO if_bol_bo_col,
    lv_show_separator        TYPE abap_bool,
    lv_num_marked            TYPE i,
    lr_entity                TYPE REF TO if_bol_bo_property_access,
    lv_appl                  TYPE bea_appl_ubd.
    lr_coco ?= comp_controller.
    lr_col  = me->typed_context->ubdheader->collection_wrapper->get_marked( ).
    lv_num_marked = lr_col->size( ).
    * Decide based on the usage which buttons should appear, others are not shown by default
    CALL METHOD lr_coco->get_env_info
    IMPORTING
    ev_usage          = lv_usage
    ev_info          = lv_info
    ev_info_transfert = lv_info_transfert.
    CASE  lv_usage.
    WHEN cl_beabds_b_bspwdcomponen_impl=>gc_usage_search_result.
    IF lv_info_transfert = cl_beabds_b_bspwdcomponen_impl=>gc_inf_trans_search_result.
    lv_show_btn_create = abap_true.
    lv_show_separator = abap_true.
    ENDIF.
    ENDCASE.
    if  lv_show_btn_create  = abap_true.
    *  Separator between two buttons if needed
    IF lv_show_separator = abap_true.
    CLEAR ls_button.
    ls_button-type = cl_thtmlb_util=>gc_separator.
    APPEND ls_button TO gt_buttons.
    lv_show_separator = abap_false.
    ENDIF.
    CLEAR ls_button.
    IF lv_num_marked > 0.
    ls_button-enabled = abap_true.
    ELSE.
    ls_button-enabled = abap_false.
    ENDIF.
    ls_button-text      = text-001.
    ls_button-id        = 'BTN_CREATE'.                    "#EC NOTEXT
    ls_button-on_click  = 'CREATE'.                        "#EC NOTEXT
    APPEND ls_button TO gt_buttons.
    lv_show_separator = abap_true.
    ENDIF.
    endmethod.
    METHOD eh_oncreate.
    * Added by wizard: Handler for event 'CREATE'
    TYPES: BEGIN OF ty_trans,
    process_type      TYPE crmt_process_type,
    proc_type_descr_20 TYPE crmt_description_20,
    subobject_category TYPE crmt_subobject_category,
    subob_cat_descr_20 TYPE crmt_description_20,
    END OF ty_trans.
    DATA: lt_trans      TYPE STANDARD TABLE OF ty_trans ,
    ls_trans      TYPE ty_trans ,
    lv_ref_struct TYPE REF TO  ty_trans.
    DATA:
    lv_struct_ref TYPE REF TO crmt_extbt_il_header_ref,
    lv_value_node TYPE REF TO cl_bsp_wd_value_node,
    lr_ent        TYPE REF TO if_bol_bo_property_access,
    lv_bo_coll    TYPE REF TO if_bol_bo_col,
    ls_ref_header TYPE crmt_extbt_il_header_ref,
    lv_title      TYPE string,
    lr_comp_ctrl  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
    lr_cw        TYPE REF TO cl_bsp_wd_collection_wrapper,
    lr_col        TYPE REF TO if_bol_bo_col,
    lr_col_proc  TYPE REF TO if_bol_bo_col,
    lr_bo        TYPE REF TO cl_crm_bol_entity.
    IF gv_fu_popup IS NOT BOUND.
    lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/FOLLOW_UP' ).
    gv_fu_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'MainWindow'
    iv_usage_name          = 'UCBTEXTFOLLOWUP'
    iv_title              = lv_title ).
    ENDIF.
    CREATE OBJECT lv_bo_coll TYPE cl_crm_bol_bo_col.
    lr_comp_ctrl ?= me->comp_controller.
    lr_cw = lr_comp_ctrl->typed_context->ubdheader->collection_wrapper.
    lr_col  = lr_cw->get_marked( ).
    CREATE DATA lv_struct_ref.
    CREATE OBJECT lv_value_node
    EXPORTING
    iv_data_ref = lv_struct_ref.
    CHECK lr_col IS BOUND AND lr_col->size( ) > 0.
    CREATE OBJECT lr_col_proc TYPE cl_crm_bol_bo_col.
    lr_bo ?= lr_col->get_first( ).
    WHILE lr_bo IS BOUND AND lr_bo IS NOT INITIAL.
    lr_bo->get_property_as_value(
    EXPORTING
    iv_attr_name    = 'HEADNO_EXT'
    IMPORTING
    ev_result      = ls_ref_header-object_id  ).
    ls_ref_header-object_type = 'BILLDO'.                  "#EC NOTEXT
    lv_value_node->set_properties( ls_ref_header ).
    lv_bo_coll->add( lv_value_node ).
    lr_bo ?= lr_col->get_next( ).
    ENDWHILE.
    gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
    gv_fu_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
    gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUP' iv_collection = lv_bo_coll ).
    ENDMETHOD.
    method EH_ONFOLLOWUP_SEL_CLOSED.
    * Added by wizard: Handler for event 'FOLLOWUP_SEL_CLOSED'
    DATA:
    lr_context_node  TYPE REF TO cl_bsp_wd_context_node,
    lr_current      TYPE REF TO cl_crm_bol_entity,
    lr_col          TYPE REF TO if_bol_entity_col,
    lr_wdw          TYPE REF TO cl_bsp_wd_window.
    IF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVE'. "# EC NOTEXT
    lr_context_node = gv_fu_popup->get_context_node( iv_cnode_name = 'BTORDER' ). "# EC NOTEXT
    CHECK lr_context_node IS BOUND.
    lr_current ?= lr_context_node->collection_wrapper->get_current( ).
    CHECK lr_current IS BOUND.
    CREATE OBJECT lr_col
    TYPE
    cl_crm_bol_entity_col.
    lr_col->add( lr_current ).
    lr_wdw = me->comp_controller->if_bsp_wd_window_manager~get_window( 'MainWindow' ).
    lr_wdw->call_outbound_plug( iv_outbound_plug = 'NAVIGATE_CREATE' iv_data_collection = lr_col ). "#EC NOTEXT
    ELSEIF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVEPROCTYPE'. "# EC NOTEXT
    gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
    gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUPITEMS' ).
    ENDIF.
    endmethod.
    method OP_NAVIGATE_CREATE.
    * Added by wizard: Outbound plug 'NAVIGATE_CREATE'
    DATA:
    lr_window TYPE REF TO cl_bsp_wd_window.
    lr_window = me->view_manager->get_window_controller( ).
    lr_window->call_outbound_plug( iv_outbound_plug  = 'NAVIGATE_CREATE'
    iv_data_collection = iv_data_collection ).
    endmethod.
    Thanks,
    Subhash.

    Hi Srikanth,
    I believe You are trying to implement dynamic navigation..
    lv_data_collection->add( lv_descriptor_object ).
    I can see lv_data_collection is not having the actual entity just the descriptor object details you are adding in the lv_data_collection..
    If you don't have the context node binding between source and destination component, add the required data to lv_data_collection
    , in the target component inbound plug retrieve the same data entity and set it on the relevant context node.
    To get an idea, check standard component for where dynamic navigation is implemented.
    Hope this helps..
    Cheers,
    Sumit Mittal

  • How to use ant1.3 in Wndows ME to build the examples in J2EE Tutorial?

    When I tried to build the examples bundled with j2ee tutorial in the ..\j2eetutorial\examples directory using the ant 1.3 on Wndows ME I get the following exception.Anybody please help me.Is there any other build tool available for download?
    StringIndexOutOfboundsException
    D:\JAVATUTORIAL\J2EE\j2eetutorial\examples> ant -verbose all
    Ant version 1.3 compiled on March 2 2001
    Buildfile: build.xml
    Detected Java Version: 1.3
    Detected OS: Windows Me
    parsing buildfile D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml with URI
    = file:D:/JAVATUTORIAL/J2EE/j2eetutorial/examples/build.xml
    Project base dir set to: D:\JAVATUTORIAL\J2EE\j2eetutorial\examples
    Build sequence for target `all' is [init, savingsaccount, bank, cart, checker, c
    onfirmer, converter, enroller, order, salesrep, storagebin, teller, htmlreader,
    warehouse, simplemessage, cmproster, ejb, date, hello1, hello2, bookstore1, web-
    ejb, bookstore2, bookstore3, web, all]
    Complete build sequence is [init, savingsaccount, bank, cart, checker, confirmer
    , converter, enroller, order, salesrep, storagebin, teller, htmlreader, warehous
    e, simplemessage, cmproster, ejb, date, hello1, hello2, bookstore1, web-ejb, boo
    kstore2, bookstore3, web, all, create-storagebin-table, get-cci-jar, procs, cci,
    connector, create-salesrep-table, create-procs-alias, create-coffee-table, abou
    t, create-enroller-table, create-savingsaccount-table, create-web-db, create-war
    ehouse-table, create-bank-table, clean, create-order-table, create-teller-table,
    prepare, create-ejb-db]
    init:
    [property] Loading Environment myenv.
    BUILD FAILED
    D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml:19: D:\JAVATUTORIAL\J2EE\j2
    eetutorial\examples\build.xml:19: java.lang.StringIndexOutOfBoundsException: Str
    ing index out of range: -1
    --- Nested Exception ---
    D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml:19: java.lang.StringIndexOu
    tOfBoundsException: String index out of range: -1
    --- Nested Exception ---
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1476)
    at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
    248)
    at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    at org.apache.tools.ant.Main.runBuild(Main.java:421)
    at org.apache.tools.ant.Main.main(Main.java:149)
    Total time: 2 seconds
    D:\JAVATUTORIAL\J2EE\j2eetutorial\examples>
    *********************************************************************

    Please Help Me

  • How do I tell the installer to put my html help files in the helpdir symbolic location?

    I used the File>>Print function to create an HTML help file for my application and specified in the VI Properties for the app to use <helpdir>:\ApplicationHelp.HTML as the Help Path. This should pop up the help file when a user selects "Help for This VI" from my custom menu. It works from my development directory because I installed the help files into the help directory manually, but I can't figure out how the get the installer to put the files in the correct location on the target system.  I tried putting them in [LabVIEW 2010 Help] in the Destination View for the Source Files category, but that didn't work.  Anyone know the right way to do this?

    kgarrett88 wrote:
    Hey MrSmith, 
    In LabVIEW 2010 SP1, if open the Project and right click My Computer, you can add the help file as a source. After you have added this file, you can then create an installer. Under the Destination header, you can add your desired destination path. After you have done that, you can go to the Source Files header and add the help file to that destination you created. 
    Hope this helps. Good luck with your application!
    ~kgarrett
    Thank you for the reply! I had already done the steps you suggested, so let me put up some screen shots that should help you understand my issue better. First, I specified the path to the help information on the Documentation screen of the applications Properties:
    Next I had added all the help files (DetectorFT.html and all the .png files) to the source in a virtual folder I named Resources.
    Next, for the release build I specified the files to be Always Included on the Source Files header.
    Next I created a Resource Directory as a destination for the release build.
    Then I specified the Resource directory as the destination for the files for the Release build.
    After creating the Release build, I created an Installer build and told it on the SOurce Files screen to put the help files into the [LabVIEW 2010 Help] directory.
    I had assumed that putting the files in the [LabVIEW 2010 Help] destination would put them into the correct directory when the installer ran.  When I ran the installer on the target system, the ran the application I tried to select the "Help for This VI" tab on the menu, but it was grayed out indicating it could not find the file in the proper location.  So the question I have is, what IS the proper location for the files to be installed to so the the application will find the Help files when it is looking for them at the <helpdir> Symbolic Path location? Thanks again!
    Jim Smith

Maybe you are looking for