Need code for the problem

have to create a instance of class if that is the first instance ... successive call to create the instance should return the first instance of the class....i need the code for this pls help me .... even if the code is in C++ its ok

abhinay.is2006 wrote:
actually this was the question asked for me in a interview .... i am just a beginner to java and i am not able to get the solution ..My reply actually was a hint: google for "singleton" and you know all.
kind regards,
Jos

Similar Messages

  • Need code for the following chess game..plz help me out

    Hi,
    Problem:Move the chess piece "KNIGHT" from any location on a "3 x 3" Chess Board and make it go to the far right hand bottom corner.Chess Board in the problem is not the usual Chess Board of 8 x 8.KNIGHT starting position may be any position on board.Program should exit when knight moves to 3 x 3 corner.Here is how my Chess board looks.
    |.... |.... |.... |
    |.... |.... |.... |
    |.... |.... |Queen |<<--The Queen should reach this position
    Remember: KNIGHT moves in specific way such as 2 steps in one direction and 1 step left/right.If the KNIGHT starts are position (2,2) then it cannot move further and you have to throw exception with some error message.
    Run command: "java <some class> x y", where x is x-coordinate and y is y-coordinate(starting position of Knight) on the chess board. For this problem x & y could be 1(min) and 3(max) values and any value(2) in between.
    Deliver : 1) Send me the java code for above problem.
    2) Java code should compile and run.
    3) I will be interested in "Object Oriented Design" thaught process.
    4) Your coding style
    5) Javadoc
    6) Makefile
    I would be more interested in your class design, interface design and error handling.
    please mail the solution to [email protected]
    thanks n regards
    Chinu

    Hi, Here Knight moves like horse. Queen doesn't
    exist. If knight moves to (3,3). Game will be over.
    I am facing problem to move knight from one point
    to another point. And also i have some confussion on
    selecting interfaces and classes.<font size="10000">do your own homework</font>

  • Am I able to find my iTunes serial number? I need it for the problem solving as my problem is solely bad on my iTunes.

    For the Apple problem solving section I need a serial number, my issue is that my problem regards missing contents within my iTunes. Do I have an iTunes serial number? And if so, where can I locate it? If there is not a serial number for iTunes, advice on what to do next is much appreciated.

    iTunes has no serial number. If you are trying to get to Apple phone support, that is linked to the purchase of Apple hardware, so you need to enter in the serial number of an Apple device. Otherwise, for assistance with problems with iTunes itself you would need to call Apple Support and they would almost certainly charge for the call. I would instead suggest you post the issue you're trying to address here in detail. Someone here can probably offer suggestions.
    If your issue is with the iTunes Store, not the iTunes application, go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report your issue to the iTunes Store.
    Regards.

  • HT1414 My iPhone has crashed during a sync and now I can't restore from backup as it is asking for password to load the backup yet neither the lock code for the phone or my iTunes Password are working... I have no other password to all upon and need the r

    My iPhone has crashed during a sync and now I can't restore from backup as it is asking for password to load the backup yet neither the lock code for the phone or my iTunes Password are working... I have no other password to call upon and need the restore to retrieve info onto my phone, I am a real novice to this...... please help, !!!!

    If anyone else is looking for a solution to this same problem, I was able to get it working looking through several older discussions.
    The solution was to use the password that I had on my iTunes account the very first time I set up the iPhone about a year ago.  I changed my iTunes password about 10 months ago;  but apparently, the backups continue to use the password that existed when the phone was first set up.
    A couple of troubling things with this are that 1) I didn't apply a password when I did the backup this afternoon so I don't understand why it was required when I did the restore a few hours later. and 2) it makes zero sense why iTunes would not be smart enough to use the current accout password when requiring the password to restore from a backup made with no password. 
    I thought iTunes and Apple were smarter than that.  With so many posts stating exactly the same problem, it is clear that this is bug in the software. 
    Best,
    Craig

  • Here the SSCCE code for the prvious problem posted by me.

    Following is the SSCCE code for the program of search which is having the problem i have asked before.
    here when you run it will show a form which have a search button on it and when you press it a panel will shown below which have a table( it is just a bounded area without any column or row as i have removed the database functionality and we dont have to do with it).
    the problem is the same that firstly i want to make the panel invisible.
    (the blue and yellow colors are just to seperate the panel and the container) Secondly i want to remove the extra large space added below the last table and thirdly i want that on each press of the search button the scrollbar will focus on the new table added.
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Temp extends JFrame implements ActionListener
         Container c;
         Toolkit tk;
         JLabel l1; int y=30;
         JPanel p1,p2,p3;     
         JRadioButton rbByName,rbBySirName,rbByID,rbByCity,rbByState;
         JButton btSearch,btView;
         ButtonGroup bgSearch;
         JTextField txtSearch; BoxLayout boxl;
         ImageIcon i1;JScrollPane sp1;JViewport vp;
         public Temp()
              super("Search-Address Management System");
              c=getContentPane();
              tk=Toolkit.getDefaultToolkit();
              setSize(1024,768);
              c.setBackground(Color.BLUE);c.setLayout(null);
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              defineComponents();
              settingBounds();
              addListeners();
              addComponents();
              setVisible(true);
         public void defineComponents()
              p1=new JPanel();
              p1.setLayout(null);
              p1.setOpaque(false);
              p2=new JPanel();
              p2.setLayout(null);
              p2.setOpaque(false);
              p3=new JPanel();
              boxl=new BoxLayout(p3,BoxLayout.Y_AXIS);
              p3.setLayout(boxl);
              rbByName=new JRadioButton("First Name");
              rbByName.setOpaque(false);
              rbBySirName=new JRadioButton("Last Name");
              rbBySirName.setOpaque(false);
              rbByState=new JRadioButton("State");
              rbByState.setOpaque(false);
              rbByCity=new JRadioButton("City");
              rbByCity.setOpaque(false);
              rbByID=new JRadioButton("ID");
              rbByID.setOpaque(false);
              btSearch=new JButton("Search");
              bgSearch=new ButtonGroup();
              txtSearch=new JTextField();
              btSearch=new JButton("Search");
              TitledBorder tb=new TitledBorder("Search Criteria");
              TitledBorder tb1=new TitledBorder("Search");
              p1.setBorder(tb);
              p2.setBorder(tb1);
         public void settingBounds()
              rbByID.setBounds(20,30,50,20);
              rbByName.setBounds(120,30,100,20);
              rbByState.setBounds(20,70,80,20);
              rbByCity.setBounds(120,70,50,20);
              rbBySirName.setBounds(240,30,100,20);
              p1.setBounds(30,40,400,110);
              p2.setBounds(30,180,400,80);
              p3.setBackground(Color.ORANGE);
              txtSearch.setBounds(50,210,250,25);
              btSearch.setBounds(320,210,80,25);
              rbByID.setSelected(true);
         public void addListeners()
              btSearch.addActionListener(this);
         public void addComponents()
              p1.add(rbByName);
              p1.add(rbBySirName);
              p1.add(rbByState);
              p1.add(rbByCity);
              p1.add(rbByID);
              c.add(txtSearch);
              c.add(btSearch);
              c.add(p1);
              c.add(p2);
              bgSearch.add(rbByID);
              bgSearch.add(rbByName);
              bgSearch.add(rbBySirName);
              bgSearch.add(rbByCity);
              bgSearch.add(rbByState);
         public void drawtable()
              JTable t1=new JTable()
                  public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
              if(y==30) //as temporay variable only to add the scrollpane once
                   sp1=new JScrollPane(p3,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
                   sp1.setBounds(30,300,660,380);
                   c.add(sp1); 
              JScrollPane sp=new JScrollPane(t1);
              sp1.getViewport().setOpaque(false); // to make the scrollpane transparent but not worked
              sp.setMaximumSize(new Dimension(600,100));
              p3.add(Box.createRigidArea(new Dimension(600,20)));//  invisible filler to add space between two tables
              p3.add(sp);
              p3.revalidate();
              y=y+110;
         public void actionPerformed(ActionEvent e)
              if(e.getSource()==btSearch)
              drawtable();
         public static void main(String args[])
              new Temp();
    }Please reply with the code required to be added.

    the problem is the same that firstly i want to make the panel invisible.If I remember you other postings I think you mean to say transparent, which means the background of its parent component will be painted. If you make the panel invisible, then all the component added to the panel will also be invisible.
    You have a structure something like this:
    main panel
        - scroll pane
            - viewport
                - table panel
                    - table1
                    - table 2As you where told in one of you many other posting on this topic, if you want the background of the main panel to show through then you need to make all the component on top of the pane non-opaque, not just the viewport. So, the scroll pane and table panel also need to be changed.
    And don't forget to reply to all your other postings on this topic stating that those postings are "closed" so people don't waste time answering in those postings. Keep the conversation in one posting so everybody knows what has been suggested.

  • I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.

    I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.  Thanks

    sandyzotz wrote:
    Other wise, I probably best return for a refund and get a Samsung.
    Unlikely.  Based on the complete lack of detail of the issue provided it is entirely possible the same issue would occur.
    Unless and until the user provides some actual details of the problem, there is nothing the indicate that the issue is with the iPhone.

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • Need ABAP code for the below Services requirement

    Hi,
    We have a requirement to show all the services for a particular Purchase order number.For this I built a view on 2 tables ESLL and EKPO.Now based on the below logic I need to bring the services for the Purchase order..
    1.Enter PO number,item no. and Doc category in EKPO and find the Pack no.
    2.Now take the Pack no. of EKPO and give in ESLL and find the Sub pack no.
    3.Now take this Subpack no. and Give this sub pack as Pack no. in ESLL
    4.This will be the Service entry record for that PO number.
    Can any one Please suggest me to how to write the ABAP code for the above logic.
    Thanks & Regards,
    Dinakar

    Hi Dinaker,
    Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
    Thanks,
    SAPBWI

  • Has anyone one else had problems redeeming the code for the free onetime download of Star Trek 2009 Movie?

    Has anyone one else had problems redeeming the code for the free onetime download of the Star Trek 2009 Movie?

    dawnfromcabot wrote:
    ITUNES HAS CHARGED MY DEBIT CARD $99.99 FOR GLOBAL WAR RIOT-SOME GAME I DID NOT KNOW WAS LOADED ON MY OTHER PHONE; HOWEVER, WHEN I PULLED UP THIS APP TO SEE EXACTLY WHAT IT WAS WAS I SURPRISED TO SEE I COULD DOWNLOAD IT FOR 'FREE'. I HAVE CONTACTED ITUNES THROUGH THIS REDICULOUSLY CHICKEN SH_T SYSTEM THEY USE SO THEY DO NOT ACTUALLY HAVE TO HEAR HOW UPSET A PERSON IS NOW THAT THEY CANNOT BUY FOOD FOR THEIR CHILDREN BECAUSE OF A MISTAKE MADE ON ITUNES PART.  I DID RECEIVE AN EMAILED RESPONSE FROM STEPHANIE WHO ADVISED THIS WAS PUCHARED ON A PHONE THAT HAS PURCHASED DOWNLOADS IN THE PAST. I WONDER IF SHE THOUGHT TO LOOK AT MY ENTIRE DOWNLOAD HISTORY AND DISCOVER THAT NOTHING HAS EVER BEEN PURCHASED ON MY ITUNE ACCOUNT IN THE AMOUNT REMOTELY CLOSE TO WHAT THEY ARE CHARGING ME NOW.  THAT IS BECAUSE I DO TRY TO MONITOR THIS ACCOUNT AND OBVIOUSLY THIS LAST PURCHASE WAS DONE WITHOUT MY KNOWLEDGE UNTIL I CHECKED MY ONLINE BANKING ACCOUNT, WHICH I DO EVERY DAY.  TO MAKE MATTERS WORSE THE APP STATES IT IS FREE TO INSTALL WHEN YOU PULL IT UP SO NO ONE HAS CLARIFIED TO MY WHERE THE $99.99 COMES INTO PLAY.  I WILL NOT DROP THIS UNTIL MY BACK ACCOUNT HAS BEEN PROPERERLY CREDITED IN THE SAME TIME FRAME IT TOOK YOU TO TAKE MY MONEY. I WILL LAUNCH A COMPLAINT WITH EVERY POSSIBLE ENTITY IN THE ITUNES COMPANY AND BUSINESSES OUTSIDE THAT REGULATE THEIR BUSINESS UNTIL THIS HAS RESOLVED IN MY FAVOR AS I AM THE ONE WHO HAS BEEN VICTIMIZED BY A COMPANY I INVITED INTO MY TELEPHONE NETWORK IN GOOD FAITH!!!!!!!!!!!!
    Reading that is giving me a headache, how about normal type.

  • Need Code for FM for extracting the fields in view!

    Hi,
    can any one here pls give me the sample code for the function module, extracting all the fields in view ?
    Thanks,
    Ravi

    No No,
    I need to append two more fields other than the fields existing in View.and for that i need to create FM as per the requirement. they do not want view in the data source definition any more.
    now i want a sample code for Building the FM code
    Hope i am clear this time
    Thanks,
    Ravi

  • Need code for this program in pl/sql

    Hi,
    was looking for a pl/sql code for the following case
    If there are two employees from the EMP table. i want all the names of the managers common to the two employees....
    to explain in detail : if employee1 and employee2 have the same manager mgr1....mgr1 should be displayed.
    else if employee 1 and employee2 have no immediate manager in common...meaning team leader of employee 1 and employee2 are different but the project managers for both the employee is same..in this case the project manager's name should be displayed......
    else in worst case when there are no managers common between these two employees.........the CEO who is at the highest level is common....then display CEO's name
    it's hierchiacal structure......
    thanks,
    Preethi

    Why PL/SQL? Why not look at if this can be done using SQL firstly? SQL is the preferred language for crunching Oracle data. Not PL/SQL.
    Think data sets.
    One method to do this in SQL would be to build a hierarchical list of managers for each employee. E.g.
    LEVEL MANAGER
    1     Jack
    2     John
    10     Dan the CEOOnce you have such a list for each employee, you can join these two lists on matching names. Then you simply need to find the matching join that has the lowest level.
    I'm sure there are other approaches. But unless you put together some test data, put together some SQLs and play around with this problem, you are not going to learn anything.
    And no, copying and pasting an answer that someone is inevitable to post in response is NOT learning anything new.
    So why not try and solve this problem yourself? Gain some new knowledge. That will only do your career well as your employer is after all expecting you to write the code to solve this problem - and not for members of this forum to supply the code for you.

  • ITunes needs to fix the problem with there gift cards not being activated this is not up to the retailer and they will not return scratched coded cards! There is thousands of people having this problem please fix it

    iTunes needs to fix the problem with there iTunes cards not activating properly! This is not the retailers fault and they will not return iTunes cards that have had the code area scratched there for apple needs to credit and or activated the cards there is thousands of people having this problem please bite the bullet and fix it already I will not be using iTunes until this is corrected...

    If you haven't received the item then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • *UPDATED 7/15/04* Complete guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum

    Complete newbie's guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum:
    Last Updated: Thursday July 15th, 2004
    Bioses:
    (In order of date released.)
    1.1b3 - (Download)
    - Pre-1.1, given to reviewers to use in their reviews and benchmarks.
    - Less stable, but supposedly you get slightly better overclocks.
    1.1 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - Memory always run DDR 200 when install single side DDR on DIMM2 & DIMM3.
    - Windows 2000 can't format the RAID IDE HDD when plug in Promise 378 controller.
    1.2b5 - (Download)
    1.2b7 - (No Download Yet)
    1.2b10 - (Download)
    - First attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and doesn't fix it for anybody with Clawhammer cores.
    1.2b12 - (Download)
    - Second attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and some people with Clawhammer cores.
    1.3b1 - (Download)
    - Another attempt to fix temperature problems?
    - Possibly fixes cold boot/power light issues?
    1.2 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - System can't resume from S3 sometimes when install USB device.
    - Support K8 Sempron CPU.
    - Turn off keyboard LED in S3.
    --Quick Guide for flashing BIOS, provided by MSI--
    1. Create a MS-DOS boot diskette, then copy the the .exe and the bios file to the floppy disk. Both of these files can be found in the package you downloaded.
    2. Press "Delete" and go to BIOS setup while computer bootup.
    Check BIOS advanced features and see if BIOS flash write control is enabled
    (This option must be enabled. If you can not find this setting, it means the BIOS can be
    flashed.)
    3. Boot from MS-DOS boot diskette and get a:\> prompt.
    4. Type "", then press ENTER
    5. The flash program will then ask "Do you want to save BIOS?", please press "N" for no. The when you see Press 'Y' to program or 'N' to Exit, please press "Y" to continue.
    6. After flashing complete, remove floppy and reset the system .
    7. Press DELETE or F1 when prompted at first reboot after flashing.
    8. Load BIOS optimized defaults, then save settings and exits.
    Drivers & Needed Files:
    (Note: All these drivers are for Windows XP.)
    Leaked Nvidia nForce3 Chipset Drivers Version 4.40
    (Please use at your own risk, these are LEAKED drivers. Password for the .zip file is "ocworkbench rules". Also, you will need to rename the WinXP_2K folder in IDE to either WinXP or Win2K else the installer doesn't pick it up.) Thanks for the link Wonkanoby!
    *NEW* Leaked Nvidia nForce3 Chipset Drivers Version 5.03
    More leaked drivers? Seems some parts of the drivers are older and some are newer.
    1. Windows XP Service Pack 1A (Web Install) -or- Windows XP Service Pack 1A (Full Install)
    2. Microsoft DirectX 9.0b (Web Install) -or- Microsoft DirectX 9.0b (Full Install)
    3. Nvidia nForce3 Chipset Drivers Version 4.24
    4. AMD Athlon 64 Processor Driver Version 1.1.0.14
    5. Nvidia Video Card Driver Version 56.72 -or- Omega Nvidia Video Card Driver Version v1.5303
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard Nvidia drivers.)
    5. ATI Video Card Driver Version 4.7 -or- Omega ATI Video Card Driver Version 2.5.51
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard ATI drivers.)
    6. Onboard Sound Driver (Realtek AC'97 Audio Codec) Version A3.61
    It is HIGHLY reccomended that you install the drivers/needed files in the order listed above. Please note that there are two #5's because you either install one or the other depending on your video card, do not install both of them.
    You will come across a problem here though. You can't install the chipset drivers without installing the Windows service pack and DirectX first, but the Windows service pack and DirectX installs need the internet to download files and you won't have working internet until you install the chipset drivers. Here's what I did to get around this. Instead of downloading the web install versions of Windows service pack and DirectX, download the full version and and put them along with all the other drivers on a backup hard drive or burn them to a CD, this way you will have all the drivers you need when it's time to install them and none of them will require the internet to download files.
    Another note when installing drivers. Apparently the Nvidia chipset drivers also come with drivers for the onboard sound, but people seem to agree that the Realtek onboard sound drivers are better. When you are installing the Nvidia chipset drivers, just be sure to uncheck the box for sound drivers when it asks you which drivers you would like to install. Now you can safely install the Realtek drivers without any chance of conflicting sound drivers. Thanks for the tip Wonkanoby!

    Quote
    Originally posted by RLiu818
    Quote
    Originally posted by Deviation56
    Quote
    Originally posted by RLiu818
    You CAN install the nforce drivers BEFORE installing SP1.  The only requirement to install the nforce drivers is DX9.
    So is SP1 still recommended to install before the nforce drivers?
    The installer still reccomends to install it beforehand for full USB 2.0 functionality... I would have put what you said in there but I wanted to keep it as simple as possible.  
    oh.  IIRC the installer just says USB 2.0 will be fully functional after SP1 is installed.  So after you install SP1 you go into device manager and u click update driver and it will auto search and update the driver.
    Simplicity-wise, i guess its pretty much equal.  It might take less preparation to just copy DX9 full onto a CD and install that first, then nforce driver, then right away you have yoru internet connection.
    but i dunno.. i guess i will try it your way this time when my RMA"d board comes.
    i will be fomratting and doing a fresh install later on today and will let you know if i come across any problems

  • Need code for calculation of amount field(DMBTR)of BSEG table conditionally

    Hi all,
    I am selecting data for fields belnr(A/c doc.), dmbtr(Amount), hkont(G/L acc) from  bseg cluster table giving the particular value for hkont in the selection screen.now there are some records fetched out of which there are few records in which same A/c no.(belnr) .So my requirement is to collect those same belnr records and do following calculation:
    1. suppose for some record of same belnr , if all the value for field SHKZG is 'H' then summing up the values of field DMBTR.
    2. suppose for some record of same belnr , if few value for the field SHKZG is 'H'  and few are 'S' then the                                  (summation the values of field DMBTR for all 'H' in field SHKZG  -summation the values of field DMBTR for all 'S') and both the case the single record will fetched with belnr, sum(DMBTR) according to the condition, and hkont. Please provide me the reqd. code for the above problem.Thanks in advance.
    regards
    Anand.

    Hi Anand,
    We can do like this.
    This will take into account 'S', 'H' (debit/credit indicator) and BELNR wise sum.
    1. Create new internal table, STAB with only two fields. (with header line)
        BELNR    "<------- refer below statement
        HKONT    "<------ Whatever unique combination of field(s) you want, you can put here 1,2, 
        DMBTR    "<----
    Numeric field
    If you want only HKONT wise SUM, then remove BELNR
    2. Now write this code.
    Loop at Itab.
    Clear STAB.
    IF ITAB-SHKZG = 'H'.
    STAB-DMBTR = ITAB-DMBTR.
    else.
    STAB-DMBTR =  - ITAB-DMBTR. "<----- Negative Sign
    endif.
    STAB-BELNR = ITAB-BELNR.
    STAB-HKONT = ITAB-HKONT.
    COLLECT STAB. "<------ Important.
    Endloop
    Note:
    Based upon the alphanumeric fields combination (BELNR and HKONT), the sum will be done.
    Similar to group by in a select query
    regards,
    amit m.
    Edited by: Amit Mittal on Jan 22, 2010 2:14 PM

  • ABAP Routine code for the below logic

    Hello BW Experts ,
    I need to write a complex ABAP routine in BW .
    Following is the detail explaination .
    Can anyone tell me the ABAP code for the below logic?
    It would be a greate help as I am unable to do this
    since last two days.
    WBS Elements are maintained at  IOS and  Warranty levels in R/3 side.
    The IOS WBS is a top level of WBS element and below that the Warranty WBS level.
    The IOS and Warranty WBS elements can be differentiated by means of priority field.
    When priority = i   , WBS Element is known as  IOS Level WBS Element and
    When  priority = Y the WBS element is known as Warranty WBS element.
    The Equipment Number is maintained compulsorily at IOS Level WBS elements only.
    It is not maintained at  Warranty WBS Element.
    But the Cost is maintained at Warranty WBS Elements.
    In BW I need all Warranty WBS ( priority = Y) along with their cost figures and Equipment Numbers.
    But as the Equipment Number is not maintained compulsorily at Warranty WBS level we have asked to
    Copy it from  IOS WBS ( priority = i ) and assign it to Warranty WBS level ( priority = Y ).
    So I have included the Equipment Number in the ODS and in update rules I need to write the routine for it as
    per the above logic.
    The Equipment Number is coming from Master data of  WBS Element.
    The WBS element master data we are loading in BW .
    Also the same WBS Element transaction data is coming from the transaction data data source in BW.
    Following fields / infoobjects and the table names in BW :
    1. Equipment Number : /BIC/ZEQUIPMNT  and table name /BIC/MZWBS_ELEM.
    2. WBS Element       : ZWBS_ELEM  is coming from transaction data data source as well as master data.
                                     In ODS update rules it is coming from  transaction data data source Comm_structure-ZWBS_ELEM.
                                     Also we are loading separetly the master data for ZWBS_ELEM.
                                     The  ZEQUIPMNT is an attribute of ZWBS_ELEM.
    3. Priority                :  PRIORITY     and table name /BIC/MZWBS_ELEM.
                                      The info object name for Priority is 0Priority but in master data table /BIC/MZWBS_ELEM
                                      the field name is    PRIORITY.
                                     When PRIORITY = ' i ' then    ZWBS_ELEM is at IOS Level
                                     When PRIORITY = ' y ' then  ZWBS_ELEM is at Warranty Level.
    4. ODS name :  /BIC/AZCOST00 and same is table name active data table .
    So please tell me the routine Code .
    Best Regards ,
    Amol.

    Hi Dinaker,
    Did you find any solution for this issue. I too have a similar requirement of pulling all the service orders for a specific Purchase Order in the BW report.
    Thanks,
    SAPBWI

Maybe you are looking for

  • Can't open "People" due to error message saying email address not found

    Unable to access addresses saved in "People". I am able to open, but error message reads that email address cannot be found.

  • Importing .csv or .tab files into MAC Address Book

    Trying to get my MS Outlook Contacts onto my new MAC but for some reason the MAC address book will not recognize the .csv or .txt files that outlook generates in its Export process.  I've opened the files in excel and in Numbers and they look fine -

  • Material availability date can not be after the delivery date

    Dear Experts, we are using the following scnario, 1. Once the user creates the sales order, automatically system creates PO in the background. we have created Bapi program for creation of Background PO in SD User Exit. The following issue occurs in P

  • 9IAS install on Compaq Proliant DL360

    I have been trying to install 9IAS Release 2 (9.0.2.0.1) - on Compaq Proliant DL360 (Win200).After install EM website stops intermittently and unable to run Forms - is there a problem with 9IAS and Proliant DL360 and is there any way round it?

  • Configure cisco wlc for rsa authentication

                       Hi, I wanted to find out if it is possible to authenticate wireless networks using rsa. Currently we have a cisco wlc 2504, rsa authentication manager 7.1 Do we require a cisco ACS device to make this work. Please advise. Thanks