URGENT run time problems

I am having the following problem with JDeveloper when i try to run a project. Any help would be appreciated :-
I have a project that contains a JSP page and several .java files. The first time that i run the project, everything works fine, the project runs and is diplayed in IE without any problems. But any subsequent times that i try to the project i get the following error displaying in the JDeveloper message box :-
Error starting HTTP-Server: Address in use: JVM_Bind
Error creating the ORB :
I have tryed terminating the server between each run but the problem still occurs. The only way to get the project to run again is to reboot my PC. Therefore i am having to reboot my PC everytime before i run a project. Any ideas on how to stop this would be appreciated.

Hi, we have the same problem since we installed JDEV 9.0.3.1035 (no such problem in 9.0.2)
Terminating the OC4J Server does not eliminate the problem. We ran our project, shut down the browser, terminated the embedded OC4J server and get the following when we try to run it again:
C:\JDEV\jdk\bin\javaw.exe -ojvm -classpath C:\JDEV\j2ee\home\oc4j.jar -Dhttp.proxyHost=DELL -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts= -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true com.evermind.server.OC4JServer -config C:\JDEV\jdev\system9.0.3.1035\oc4j-config\server.xml
[Starting OC4J using the following ports: HTTP=8888, RMI=23891, JMS=9227.]
[waiting for the server to complete its initialization...]
Error starting HTTP-Server: Address in use: JVM_Bind
Error creating the ORB :
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

Similar Messages

  • Jar run time problem

    Hi,
    I have an application in SWING where thumbnail images are being created at runtime and displayed in a ListCellRenderer. This is mainly used as a history feature where the user can click on that image and retrieve back the information.
    The problem is: when I run my code without an IDE it works fine as I am giving relative path names at all the places for storing the images. However, when I make a jar file, it is not able to read those images generated at run time.
    Is there a way to read runtime created files outside the jar file?
    Can someone help?
    Thanks in advance........

    sir,
    thanks for your reply.
    Again I give correct class path in Manifest.txt's
    Main-Class.
    ie., I am creating my mainclass as mainEMS.java and
    its .class file is lacated in D:/ram/classes/sdff
    folder. So I am giving the Manifest.txt ,the main
    class as " Main-Class: ram.classes.sdff.mainEMS
    fter that i give enter.
    then create the jar file.
    but, after creating jar file, it will again show,
    "Failed to load Main-Class manifest attribute from
    D:/kbs.jar "
    what's my problem.Does the file META-INF/Manifest.mf containt the Main-Class entry or do you have it only in Manifest.txt... there is a huge difference.

  • Adding panel into JDialog at run time problem

    Hi ,
    I am adding one component at a time into the jdialog at run time.
    What I do , when I launch jdialog instance first time I added one
    component into the jdialog. when OI press next button it removes this
    component and adding next one , but the problem is that is is not showing in the jdialog.
    Please give me any idea that
    How I can add component into jdialog at run time.
    Thaks In Advance.
    - vikas

    Hello,
    without source-code its difficult to understand where your problem is. The following sample code works 'fine':
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class AddCompoDialog extends JDialog {
         int compoCounter;
         public AddCompoDialog(){
              setLocationRelativeTo(null);
              setSize(300,300);
              JPanel mainPanel=new JPanel(new BorderLayout());
              JPanel buttonPanel =new JPanel();
              final JPanel compoPanel=new JPanel(new GridLayout(10,10));
              JButton newCompo=new JButton("add new Component");
              newCompo.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        compoPanel.add(new JLabel("Compo #"+ ++compoCounter));
                        compoPanel.revalidate(); //Dont forget to relayout your container
              buttonPanel.add(newCompo);
              JButton close=new JButton("close Dialog");
              close.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e) {
                        dispose();
              buttonPanel.add(close);
              mainPanel.add(buttonPanel,BorderLayout.NORTH);
              mainPanel.add(compoPanel);
              getContentPane().add(new JScrollPane(mainPanel));
         public static void main(String[] params) {
              new AddCompoDialog().setVisible(true);
    }Regards,
    Tim

  • Applet run time problem

    i complie this applet but at run time "I/O EXCEPTION(the system can not find the file speciied)
    plz help
    import java.applet.*;
    import java.awt.*;
    import java.lang.String.*;
    class Hello extends Applet
    public void paint(Graphics g)
    g.drawString("Hello java",20,30);
    </applet code="Hello" height=100 width=100>
    </applet>
    */

    http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

  • URGENT,,Form Run time problem

    Hi all,
    I just wondering whether you can assist me with the problem I have with running a form.
    When I try to Program Run Form, IE page opens and I have this error msg:
    "Bad Gateway
    The following error occurred:
    The IP address was not found during the DNS lookup. Contact your system administrator. (DNS_NO_DATA)
    -------------------------------------------------------------------Please contact the administrator."
    when I start the OC4J instance,
    It only gives me : "Oracle9iAS (9.0.2.0.0) Containers for J2EE
    initialized"
    I am using Window NT and Oracle 9i Database release 2 and Oracle 9i Developer suite Release 2
    I really appreciate if you can give me some assistance especially in setting up the DNS.
    Thanks
    Regards,
    Silva Hiendra

    The problem seems to be with privileges on the machine running Forms. This is what the online doc said about FRM-30087
    Cause: You lack privileges in the specified directory, or you do not have the disk space required.
    Action: Contact your DBA to make sure you have the access privileges you need.
    Hope this helps
    suvarna

  • URGENT - Flash Timer Problem

    Hey there, I;m having trouble to place a timer in my flash. I'm attaching the source file.
    The issue is such that I'm having 3 buttons, when triggered (RollOver) reveals an image or swf and when I rollout, it display a default random image, from an image directory. What I want is to delay the action trigger over the 3 buttons such that it fades out again in let's say 10seconds. Also, when the timer starts on any of the buttons I can rollover on any of the buttons and it overwrites the action from any previously rolled over buttons.
    Does that make sense and anyone can help me please. This is urgent as I'm trying to solve this problem and deadline is end of this week.
    Thanks
    Ben

    i generally only download and correct files if i'm hired to do so.  if you want to hire me, send an email via my website ( www.kglad.com ).
    if you want free help in this forum, you're more likely to receive it if you ask a question focused on a particular problem.

  • Strange run-time problem

    I have a problem in my vi. When the vi loads up, everything seems to work fine, however I have two radio buttons at the top of the vi, and when I use them to select something my vi seems to freeze up. I've tried all kinds of debugging, and I can't find the error. I've also tried to eliminate all race conditions. Could someone please help me find the problem. Thanks!
    Attachments:
    UUT_io_setup_distrib.llb ‏329 KB

    Hi Marshall
    Your Problem Seems to Stem from the Fact that you have two Event Structures in One Loop. If you look up Caveats and Recommendations under event Structure in Labview Help, there is a Paragraph "Avoid Using two Event Structures in One Loop".
    I took your Vi and Did the following Experiments.
    1. Verified that the Vi does Hang as Claimed.
    2. I Put the Tab control at "TTL" and then Deleted the Event Structure form the case "RS232" and than Ran your Vi. It works fine.
    3. Instead of deleting the Event Structure totally, I deleted the event cases which are duplicated in the two event structures. "Yes" Value Change, "No" Value Change event and "Cancel" Event form event Structure under the RS232 Case. Left the timeout Case as is. I ran the Vi Again it Works Fine.
    I believe - The Problem is this. Each Event Structure waits for events it has been programmed for. The event structures are in the same loop. The Event structures themselves have no way of knowing that they are embedded in a case structure and only one of them needs to execute. So after the First event the Program kind of hangs as the second Event structure Waits indefinitely for the Program to Pass execution to it.
    So the Fourth Experiment -
    4. I Used a Local Variable to Change the Tab to RS232 if I was in TTL and to TTL from RS232 if I was in RS232. This Local Vaiables are under the Yes Value Changed Event And Now I checked the Program, If Clicked Yes The TTL Case Executes Changing it and Correspondingly Changing the NO value, then it Changes the Tab Value So on the Next Iteration of While Loop my Program is in RS232 Case and Event Structure Executes and puts the Tab Back to RS232. In effect I have Made My Program Go through Both Event Structures This Works Everytime Only when I click on YES. I click on NO and Program Hangs as I did Not Built the Same Functionality for this case.
    The Event Structures Cache the Events they have been Programmed for andthe First Event Must be Handled Before A second Event can take Place. In your Case One Event is in two Structures and at any given time One of these Structures executes. The Other Structure Waits and Inhibits furthur interaction till the Event generated can be handled by it.
    On a Side Note. It is Advisable to Create an Event Structure and Embed your Cases within them And Also have Only One Event Node to Handle One Event Such as "YEs" Value Change. So you know what is Going on. and easy to Maintain Code. Also It will Help If you could Club Similar Controls in an Array and handle them that way rather than individually
    I Hope I am clear in my explanation. I hope this is the reasoning why Your Program Hangs. I have attached your Vis slightly modified for you to see.
    Good Luck!!
    Good Luck!
    Mache
    Attachments:
    UUT_io_setup_distrib.llb ‏329 KB

  • Oracle Forms 10g run time problem

    Hello.
    I installed Oracle Dev 10g and I'm trying to use Oracle Forms.
    I configured all files like this:
    [steps in other post]
    1. Install the Jinitiator
    location: <devsuitehome>/jinit/jinit.exe
    2. edit the following files:
    a. <devsuitehome>/forms90/server/default.env
    where you set forms90_path=add your path to your library files (*.pll)
    b. <devsuitehome>/forms90/server/formsweb.cfg
    where you set workingDirectory=path to your *.fmx files
    3. at Forms Builder go to Edit/Preferences/Runtime
    then at the Application Server URL click "Reset to Default"
    4. before attempting to run your forms, run "Start OC4J Instance" first
    start/programs/oracle developer suite/forms developer/start oc4j instance
    After this, when I try to run the form, I don't get any error, but the browser opens and does nothing! Some times appears a small form to acces the data base, other don't, but it always stops!!
    Any ideas?!?
    Many thanks,
    Nuno

    Might also be worth turningon the Jinit console (you can do this from your windows Control Panel). And set the trace level to 5 (just press 5 when the jinit console appears).
    Then check error messages.
    Regards
    Grant

  • Java Run-Time problems

    I am new to Java and am trying to write a simple program.
    The test class will instantiate an object of the "house" class which will in turn contain an array of 20 objects of the "player" class.
    Compiles with no errors or warnings, but gives an immediate:
    Exception in thread "main" java.lang.NullPointerException at test.main(test.java:6)
    test.java
    public class test
            private static house h;
            public static void main(String args[])
                    h.players[3].setName("john");
    }house.java
    public class house
            public player[] players = new player[20];
    }player.java
    public class player
            private static String name;
            public static void setName(String n)
                    name = n;
    }What seems to be the problem? To my untrained eyes I can't find any errors.

    alphacoder wrote:
    Thanks for the help. It fixed my problem.Good to know.
    How do I solve the 20 null references problem?That depends soley on what you want your class to do.
    Do I just initialize all 20 references in the house constructor?If you want it to always reference 20 persons, then do so.
    Alternatively you could track how many persons are currently in there and only add a new one when addPerson() is called (or something similar).
    Also, you should avoid this kind of direct access to other classes member variables, it's against encapsulation (that's probably something you'll learn later in the course/book/tutorial, but I'd like to mention it).

  • Dropdownbykey at run time problem

    Hi..
    i am creating the node and attaching attribute which has value set.
    i am binding the attribute to a dropdown key.
    when i select the values in dropdown, and in actions method if i dont perform any operations. It is working fine.
    when i select the values in dropdown, and in actions method if  perform any operations. i am not getting the selected value in dd.
    please help me..
    Thanks

    Hi Vimalraj Madhavan ,
               Usually the selected value will stay there in the drop down even after doing any action. what you can try is in youcode some where you might be clearing the attribute thats binded to the dropdown,
    you can put a debugger on the action you are triggering and check the code.
    or some where you are again calling the code to fill the value set, you can i think better check the code in modify view.
    the same problem will be there if you are doing the selection of a value in ddk and doing any other action (other than ddk action), i think
    Regards
    Sarath

  • Run time problem

    Hi !
    I'm new with Java and it will drive me nuts.
    I've to files in F:\javap\Familias:
    ModFam.java - where I've the main function
    Familias.java - some other classes and methods
    each file have the line:
    package Familias; at line 1.
    Ok.
    I compiled from f:\javap using:
    java Familias\*.java
    No errors and I've 3 class files in f:\javap\Familias:
    - ModFam.class
    - ModFam$1.class
    - Familias.class
    First question: what is the $1.class file ?
    Now I want to run the application from f:\javap\Familias as follows:
    javac -cp . Familias.ModFam
    and I get the message: Exception in thread "main" java.lang.NoClassDefFoundError: Familias/ModFam
    Second question: Why ? How should I run the program ?
    Thanks in advance
    <jl>

    Since you have your classes in a package, you class files has to be in a directory called Familias, and the CLASSPATH should be set to just before your Familias directory.
    Just compile as
    javac -d . *.java
    -d option just says where you want your source files, and it will also create the directory Familias for you.
    Then you run it with java, not javac, as:
    java -classpath . Familias.ModFam
    Btw, you have a package called Familias, and a class called Familias. The naming convention says that package names should start with lower case letter, so to avoid confusion, it would be better to rename your package to familias.
    I'm not even sure you can run your code now, because Familias.ModFam could mean either the class ModFam in the package Familias, or the inner class ModFam in the class Familias. I hope it will check for the package first.

  • It's urgent - - - Real time Problem

    hi experts,
    i am working on aging report. its a interactive report.
    now wht i want is that document type DR should also get totalled in the base report
    but this report is not doing so.
    please help me out that how can i include dr in the aging also.
    attaching u the code for the base report
    *& Report  ZAGING1
    REPORT  zage_ver1  NO STANDARD PAGE HEADING LINE-SIZE 250.
    TABLES : bseg, kna1 ,bsad, bsid, vbrk.
    SELECT-OPTIONS: s_kunnr FOR kna1-kunnr OBLIGATORY.
    PARAMETERS : key_date TYPE bldat OBLIGATORY.
    PARAMETERS : ccode    TYPE bukrs OBLIGATORY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 01(30) text-001 FOR FIELD int1.
    SELECTION-SCREEN POSITION POS_LOW.
    PARAMETERS: int1(3) TYPE n DEFAULT '030'.
    PARAMETERS: int2(3) TYPE n DEFAULT '060'.
    PARAMETERS: int3(3) TYPE n DEFAULT '090'.
    PARAMETERS: int4(3) TYPE n DEFAULT '120'.
    PARAMETERS: int5(3) TYPE n DEFAULT '150'.
    SELECTION-SCREEN END OF LINE.
    DATA : onacc LIKE bsid-wrbtr.
    TYPES: BEGIN OF cust,
            kunnr TYPE kna1-kunnr,
            adrnr TYPE kna1-adrnr,
            name1 TYPE kna1-name1,
            wrbtr TYPE bseg-wrbtr,
            bzirk TYPE knvv-bzirk,
            zterm TYPE knvv-zterm,
            ztag1 TYPE t052-ztag1,
           END OF cust.
    TYPES: BEGIN OF invt,
            kunnr TYPE kna1-kunnr,
            kunrg TYPE kna1-kunnr,
            wrbtr TYPE bseg-wrbtr,
            invamt TYPE bseg-wrbtr,
            name1 TYPE kna1-name1,
            vbeln TYPE vbrk-vbeln,
            belnr TYPE bseg-belnr,
           END OF invt.
    TYPES : BEGIN OF ytab,
              kunnr TYPE bsid-kunnr,
              wrbtr TYPE bsid-wrbtr,
              sinv_amt TYPE bsid-wrbtr,
              paid_amt TYPE bsid-wrbtr,
              adj_amt   TYPE bsid-wrbtr,
              cncl_amt TYPE bsid-wrbtr,
              baln_amt TYPE bsid-wrbtr,
              onac_amt TYPE bsid-wrbtr,
              ac_amt   TYPE bsid-wrbtr,
              age_amt TYPE bsid-wrbtr,
              wrbtr_rvh TYPE bsid-wrbtr,
              wrbtr_rvs TYPE bsid-wrbtr,
              wrbtr_obh TYPE bsid-wrbtr,
              wrbtr_obs TYPE bsid-wrbtr,
              wrbtr_dg TYPE bsid-wrbtr,
              wrbtr_dr TYPE bsid-wrbtr,
              wrbtr_dzs TYPE bsid-wrbtr,
              wrbtr_dzh TYPE bsid-wrbtr,
              wrbtr_sas TYPE bsid-wrbtr,
              wrbtr_sah TYPE bsid-wrbtr,
              wrbtr_abs TYPE bsid-wrbtr,
              wrbtr_abh TYPE bsid-wrbtr,
              baln1 TYPE bsid-wrbtr,
              baln2 TYPE bsid-wrbtr,
              baln3 TYPE bsid-wrbtr,
              baln4 TYPE bsid-wrbtr,
              baln5 TYPE bsid-wrbtr,
              baln6 TYPE bsid-wrbtr,
              blart TYPE bsid-blart,
              vbeln TYPE bsid-vbeln,
              fkdat TYPE vbrk-fkdat,
              belnr TYPE bsid-belnr,
              rebzg TYPE bsid-rebzg,
              shkzg TYPE bsid-shkzg,
              zuonr TYPE bsid-zuonr,
              od_days(4) TYPE n,
            END OF ytab.
    TYPES : BEGIN OF ftab,
              kunnr TYPE bsid-kunnr,
              name1 TYPE kna1-name1,
             WRBTR TYPE BSID-WRBTR,
              sinv_amt TYPE bsid-wrbtr,
              paid_amt TYPE bsid-wrbtr,
              adj_amt   TYPE bsid-wrbtr,
              cncl_amt TYPE bsid-wrbtr,
              baln_amt TYPE bsid-wrbtr,
              ac_amt   TYPE bsid-wrbtr,
              onac_amt TYPE bsid-wrbtr,
              outs_amt TYPE bsid-wrbtr,
              age_amt TYPE bsid-wrbtr,
              wrbtr_rvh TYPE bsid-wrbtr,
              wrbtr_rvs TYPE bsid-wrbtr,
              wrbtr_obh TYPE bsid-wrbtr,
              wrbtr_obs TYPE bsid-wrbtr,
              wrbtr_dg TYPE bsid-wrbtr,
              wrbtr_dr TYPE bsid-wrbtr,
              wrbtr_dzs TYPE bsid-wrbtr,
              wrbtr_dzh TYPE bsid-wrbtr,
              wrbtr_sas TYPE bsid-wrbtr,
              wrbtr_sah TYPE bsid-wrbtr,
              wrbtr_abs TYPE bsid-wrbtr,
              wrbtr_abh TYPE bsid-wrbtr,
              baln1 TYPE bsid-wrbtr,
              baln2 TYPE bsid-wrbtr,
              baln3 TYPE bsid-wrbtr,
              baln4 TYPE bsid-wrbtr,
              baln5 TYPE bsid-wrbtr,
              baln6 TYPE bsid-wrbtr,
              blart TYPE bsid-blart,
              vbeln TYPE bsid-vbeln,
              belnr TYPE bsid-belnr,
              rebzg TYPE bsid-rebzg,
              shkzg TYPE bsid-shkzg,
              bzirk TYPE knvv-bzirk,
              zterm TYPE knvv-zterm,
              ztag1 TYPE t052-ztag1,
              zuonr TYPE bsid-zuonr,
              od_days(4) TYPE n,
              sno(3) TYPE n,
            END OF ftab.
    data : wrbtr_note like bsid-wrbtr.
            DATA : BEGIN OF itab1 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
            xblnr LIKE bsid-xblnr,
            abc LIKE bsid-wrbtr,
            aaa LIKE bsid-wrbtr,
            sgtxt LIKE bsid-sgtxt,
            bcd LIKE bsid-wrbtr,
            bbb LIKE bsid-wrbtr,
            flag TYPE c,
            flag1(3) TYPE c,
            flag2(15) TYPE c,
            bldat like bsid-bldat,
            END OF itab1.
            DATA : BEGIN OF itab2 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
    xblnr LIKE bsid-xblnr,
    sgtxt LIKE bsid-sgtxt,
    abc LIKE bsid-wrbtr,
    aaa LIKE bsid-wrbtr,
    bcd LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
    bldat like bsid-bldat,
            END OF itab2.
    DATA : BEGIN OF itab3 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
            xblnr LIKE bsid-xblnr,
            abc LIKE bsid-wrbtr,
    aaa LIKE bsid-wrbtr,
    bcd LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
    sgtxt LIKE bsid-sgtxt,
    bldat like bsid-bldat,
            END OF itab3.
    DATA : BEGIN OF itab4 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
    xblnr LIKE bsid-xblnr,
    aaa LIKE bsid-wrbtr,
    abc LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    bcd LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
    sgtxt LIKE bsid-sgtxt,
    bldat like bsid-bldat,
            END OF itab4.
    DATA : BEGIN OF itab5 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
    xblnr LIKE bsid-xblnr,
    abc LIKE bsid-wrbtr,
    aaa LIKE bsid-wrbtr,
    bcd LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
    sgtxt LIKE bsid-sgtxt,
    bldat like bsid-bldat,
            END OF itab5.
    DATA : BEGIN OF itab6 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
            xblnr LIKE bsid-xblnr,
            sgtxt LIKE bsid-sgtxt,
            bldat like bsid-bldat,
            abc LIKE bsid-wrbtr,
            aaa LIKE bsid-wrbtr,
            bcd LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
            END OF itab6.
    data : dr_deduct like bsid-wrbtr.
    DATA : BEGIN OF itab7 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
    xblnr LIKE bsid-xblnr,
    sgtxt LIKE bsid-sgtxt,
    bldat like bsid-bldat,
            END OF itab7.
    DATA : BEGIN OF itab8 OCCURS 0,
            hkont LIKE bsid-hkont,   " General Ledger Account
            kunnr LIKE bsid-kunnr,   " Customer Number 1
           txt50 LIKE skat-txt50,  " GL A/C TEXT
            dmbtr LIKE bsid-dmbtr,  " Amount
            shkzg LIKE bsid-shkzg,  " Debit/Credit Indication
            budat LIKE bsid-budat,  " Posting date
            kostl LIKE bsid-kostl,  " Cost center
            opnbl LIKE bsid-dmbtr,  " Opening Balance Amount
            clsbl LIKE bsid-dmbtr,  " Closing balnce Amount
            vbeln LIKE bsid-vbeln,
            blart LIKE bsid-blart,
            wrbtr LIKE bsid-wrbtr,
            bukrs LIKE bsid-bukrs,
            belnr LIKE bsid-belnr,
    xblnr LIKE bsid-xblnr,
    abc LIKE bsid-wrbtr,
    aaa LIKE bsid-wrbtr,
    bcd LIKE bsid-wrbtr,
    bbb LIKE bsid-wrbtr,
    flag TYPE c,
    flag1(3) TYPE c,
    flag2(15) TYPE c,
    sgtxt LIKE bsid-sgtxt,
    bldat like bsid-bldat,
            END OF itab8.
    DATA : wa_ctab TYPE cust.
    DATA : wa_btab TYPE invt.
    DATA : wa_bsid TYPE bsid.
    DATA : wai_bsid TYPE ytab.
    DATA : wac_bsid TYPE ytab.        " CREDIT - INVOICE
    DATA : wad_bsid TYPE ytab.        " DEBIT  - PAYMENT
    DATA : wao_bsid TYPE ytab.        " ON ACCOUNT
    DATA : wa_itab  TYPE ftab.
    DATA : ctab TYPE cust OCCURS 0.
    DATA : btab TYPE invt OCCURS 0.
    DATA : it_bsid TYPE bsid OCCURS 0.
    DATA : iti_bsid TYPE ytab OCCURS 0.        " CANCELLED INVOICES
    DATA : itc_bsid TYPE ytab OCCURS 0.        " CREDIT - INVOICE
    DATA : itd_bsid TYPE ytab OCCURS 0.        " DEBIT  - PAYMENT
    DATA : ito_bsid TYPE ytab OCCURS 0.        " ON ACCOUNT
    DATA : itab     TYPE ftab OCCURS 0 with header line.        " OUTPUT
    DATA : inv_amt LIKE bseg-wrbtr.
    DATA : paid_amt LIKE bseg-wrbtr.
    DATA : cncl_amt LIKE bseg-wrbtr.
    DATA : adj_amt LIKE bseg-wrbtr.
    DATA : billing_date LIKE sy-datum.
    DATA : overdue_date LIKE sy-datum.
    DATA : overdue_days LIKE rfposx-verzn.
    DATA : credit_days(4) TYPE n.
    DATA : int1s(3) TYPE n VALUE 0,
           int1e(3) TYPE n VALUE 0,
           int2s(3) TYPE n VALUE 0,
           int2e(3) TYPE n VALUE 0,
           int3s(3) TYPE n VALUE 0,
           int3e(3) TYPE n VALUE 0,
           int4s(3) TYPE n VALUE 0,
           int4e(3) TYPE n VALUE 0,
           int5s(3) TYPE n VALUE 0,
           int5e(3) TYPE n VALUE 0,
           int TYPE i,
           slno(5)  TYPE n VALUE 0.
    CLEAR : inv_amt, ctab, btab, wa_itab, wac_bsid, wad_bsid, wao_bsid.
    REFRESH : ctab, btab,itab, itc_bsid, itd_bsid, ito_bsid.
    START-OF-SELECTION.
    SELECT kunnr name1 adrnr FROM kna1 INTO CORRESPONDING FIELDS OF wa_ctab WHERE kunnr IN s_kunnr.
      SELECT SINGLE bzirk zterm FROM knvv INTO (wa_ctab-bzirk, wa_ctab-zterm) WHERE kunnr = wa_ctab-kunnr.
      SELECT SINGLE ztag1 FROM t052 INTO wa_ctab-ztag1 WHERE zterm = wa_ctab-zterm.
       WRITE : /5 WA_CTAB-KUNNR COLOR 5, WA_CTAB-NAME1 COLOR 5.
    APPEND wa_ctab TO ctab.
    ENDSELECT.
    SELECT * FROM bsid INTO TABLE it_bsid FOR ALL ENTRIES IN ctab WHERE kunnr = ctab-kunnr
                                                                  AND   budat =< key_date
                                                                 AND   gjahr = fyear
                                                                  AND   bukrs = ccode.
    SORT it_bsid BY kunnr.
    LOOP AT IT_BSID INTO WA_BSID.
      IF  WA_BSID-BLART = 'RV' AND WA_BSID-SHKZG = 'S' OR
          WA_BSID-BLART = 'OB' AND WA_BSID-SHKZG = 'S' or
          wa_bsid-blart = 'DR'.
          WAC_BSID-KUNNR = WA_BSID-KUNNR.
          WAC_BSID-BLART = WA_BSID-BLART.
          WAC_BSID-VBELN = WA_BSID-VBELN.
          WAC_BSID-BELNR = WA_BSID-BELNR.
          WAC_BSID-REBZG = WA_BSID-REBZG.
          WAC_BSID-WRBTR = WA_BSID-WRBTR.
          WAC_BSID-ZUONR = WA_BSID-ZUONR.
          WAC_BSID-SHKZG = WA_BSID-SHKZG.
          IF WAC_BSID-VBELN IS NOT INITIAL.
             SELECT SINGLE FKDAT FROM VBRK INTO WAC_BSID-FKDAT WHERE VBELN = WAC_BSID-VBELN.
          ELSEIF WAC_BSID-VBELN IS INITIAL.
            IF WAC_BSID-BELNR IS NOT INITIAL.
             SELECT SINGLE BuDAT FROM BSID INTO WAC_BSID-FKDAT WHERE BELNR = WAC_BSID-BELNR.
            ENDIF.
          ENDIF.
       WAC_BSID = WA_BSID.
        APPEND WAC_BSID TO ITC_BSID.
    ELSEIF  WA_BSID-BLART = 'DZ' AND WA_BSID-VBELN <> ' '.
      ELSEIF  WA_BSID-BLART = 'DZ' .
       WAD_BSID = WA_BSID.
        WAD_BSID-KUNNR = WA_BSID-KUNNR.
        WAD_BSID-BLART = WA_BSID-BLART.
        WAD_BSID-VBELN = WA_BSID-VBELN.
        WAD_BSID-BELNR = WA_BSID-BELNR.
        WAD_BSID-REBZG = WA_BSID-REBZG.
        WAD_BSID-WRBTR = WA_BSID-WRBTR.
        WAD_BSID-ZUONR = WA_BSID-ZUONR.
        WAD_BSID-SHKZG = WA_BSID-SHKZG.
        APPEND WAD_BSID TO ITD_BSID.
      ELSEIF  WA_BSID-BLART = 'RV' AND WA_BSID-SHKZG = 'H' AND WA_BSID-ZUONR <> ' '.
        WAI_BSID-KUNNR = WA_BSID-KUNNR.
        WAI_BSID-BLART = WA_BSID-BLART.
        WAI_BSID-VBELN = WA_BSID-VBELN.
        WAI_BSID-BELNR = WA_BSID-BELNR.
        WAI_BSID-REBZG = WA_BSID-REBZG.
        WAI_BSID-WRBTR = WA_BSID-WRBTR.
        WAI_BSID-ZUONR = WA_BSID-ZUONR.
        WAI_BSID-SHKZG = WA_BSID-SHKZG.
        APPEND WAI_BSID TO ITI_BSID.
      ENDIF.
        MODIFY IT_BSID FROM WA_BSID.
    ENDLOOP.
    CLEAR : WAC_BSID.
    LOOP AT ITC_BSID INTO WAC_BSID.
      CLEAR : WAD_BSID, INV_AMT, PAID_AMT, CNCL_AMT, ADJ_AMT.
      IF WAC_BSID-BLART = 'RV' AND WAC_BSID-SHKZG = 'S'.
          WAC_BSID-SINV_AMT = WAC_BSID-WRBTR.
          INV_AMT = WAC_BSID-SINV_AMT.
        READ TABLE ITD_BSID INTO WAD_BSID WITH KEY KUNNR = WAC_BSID-KUNNR VBELN = WAC_BSID-VBELN.
        LOOP AT ITD_BSID INTO WAD_BSID WHERE KUNNR = WAC_BSID-KUNNR AND VBELN = WAC_BSID-VBELN.
         IF SY-SUBRC = 0.
           WAC_BSID-PAID_AMT = WAD_BSID-WRBTR.
            PAID_AMT = PAID_AMT + WAD_BSID-WRBTR.
         ENDIF.
        ENDLOOP.
         IF PAID_AMT IS NOT INITIAL.
           WAC_BSID-BALN_AMT = WAC_BSID-SINV_AMT - WAC_BSID-PAID_AMT.
            WAC_BSID-PAID_AMT = PAID_AMT.
            WAC_BSID-BALN_AMT = WAC_BSID-SINV_AMT - PAID_AMT.
            WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
         ELSE.
            WAC_BSID-PAID_AMT = 0.
            WAC_BSID-BALN_AMT = WAC_BSID-SINV_AMT.
            WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
         ENDIF.
        LOOP AT ITI_BSID INTO WAI_BSID WHERE KUNNR = WAC_BSID-KUNNR AND ZUONR = WAC_BSID-VBELN.
        IF SY-SUBRC = 0.
           WAC_BSID-PAID_AMT = WAD_BSID-WRBTR.
            CNCL_AMT = CNCL_AMT + WAI_BSID-WRBTR.
        ENDIF.
        ENDLOOP.
         IF CNCL_AMT IS NOT INITIAL.
           WAC_BSID-BALN_AMT = WAC_BSID-SINV_AMT - WAC_BSID-PAID_AMT.
            WAC_BSID-CNCL_AMT = CNCL_AMT.
            WAC_BSID-BALN_AMT = WAC_BSID-BALN_AMT - CNCL_AMT.
            WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
         ELSE.
            WAC_BSID-BALN_AMT = WAC_BSID-BALN_AMT.
            WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
         ENDIF.
      ELSEIF WAC_BSID-BLART = 'OB' AND WAC_BSID-SHKZG = 'S'.
          IF WAC_BSID-ZUONR <> ' '.
             LOOP AT ITD_BSID INTO WAD_BSID WHERE KUNNR = WAC_BSID-KUNNR AND VBELN = ' ' AND ZUONR = WAC_BSID-ZUONR.
               IF SY-SUBRC = 0.
                  ADJ_AMT = ADJ_AMT + WAD_BSID-WRBTR.
               ENDIF.
             ENDLOOP.
             WAC_BSID-ADJ_AMT  = ADJ_AMT.
             WAC_BSID-BALN_AMT = WAC_BSID-WRBTR - ADJ_AMT.
             WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
          ELSEIF WAC_BSID-ZUONR = ' '.
            WAC_BSID-BALN_AMT = WAC_BSID-WRBTR.
            WAC_BSID-AGE_AMT  = WAC_BSID-BALN_AMT.
          ENDIF.
      ENDIF.
        PERFORM AGING_CALCULATION.
        WA_ITAB-KUNNR = WAC_BSID-KUNNR.
        WA_ITAB-SINV_AMT = WAC_BSID-SINV_AMT.
        WA_ITAB-PAID_AMT = WAC_BSID-PAID_AMT.
        WA_ITAB-CNCL_AMT = WAC_BSID-CNCL_AMT.
        WA_ITAB-BALN_AMT = WAC_BSID-BALN_AMT.
       WA_ITAB-OD_DAYS  = WAC_BSID-OD_DAYS.
        WA_ITAB-BALN1 = WAC_BSID-BALN1.
        WA_ITAB-BALN2 = WAC_BSID-BALN2.
        WA_ITAB-BALN3 = WAC_BSID-BALN3.
        WA_ITAB-BALN4 = WAC_BSID-BALN4.
        WA_ITAB-BALN5 = WAC_BSID-BALN5.
        WA_ITAB-BALN6 = WAC_BSID-BALN6.
        COLLECT WA_ITAB INTO ITAB.
      MODIFY ITC_BSID FROM WAC_BSID.
    COLLECT WAC_BSID.
    ENDLOOP.
    CLEAR : WA_ITAB, WA_CTAB.
    LOOP AT CTAB INTO WA_CTAB.
    CLEAR : WAO_BSID.
    LOOP AT IT_BSID INTO WA_BSID WHERE KUNNR = WA_CTAB-KUNNR.
      IF WA_BSID-BLART = 'RV' OR
         WA_BSID-BLART = 'OB' OR
         WA_BSID-BLART = 'DG' OR
         WA_BSID-BLART = 'DR' OR
         WA_BSID-BLART = 'DZ' OR
         WA_BSID-BLART = 'SA' OR
         WA_BSID-BLART = 'AB'.
         WAO_BSID-KUNNR = WA_BSID-KUNNR.
         WAO_BSID-BLART = WA_BSID-BLART.
         WAO_BSID-VBELN = WA_BSID-VBELN.
         WAO_BSID-BELNR = WA_BSID-BELNR.
         WAO_BSID-REBZG = WA_BSID-REBZG.
         WAO_BSID-WRBTR = WA_BSID-WRBTR.
         WAO_BSID-SHKZG = WA_BSID-SHKZG.
         WAO_BSID-ZUONR = WA_BSID-ZUONR.
         WAO_BSID-SHKZG = WA_BSID-SHKZG.
         APPEND WAO_BSID TO ITO_BSID.
       ENDIF.
    ENDLOOP.
    CLEAR : WAO_BSID.
    LOOP AT ITO_BSID INTO WAO_BSID WHERE KUNNR = WA_CTAB-KUNNR.
      IF WAO_BSID-BLART = 'OB' AND WAO_BSID-SHKZG = 'H'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
          WAO_BSID-WRBTR_OBH = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'OB' AND WAO_BSID-SHKZG = 'S'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
          WAO_BSID-WRBTR_OBS = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'DG'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
          WAO_BSID-WRBTR_DG = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'DR'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT + WAO_BSID-WRBTR.
         WAO_BSID-WRBTR_DR = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'DZ' AND WAO_BSID-SHKZG = 'H'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
         WAO_BSID-WRBTR_DZH = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'DZ' AND WAO_BSID-SHKZG = 'S'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
         WAO_BSID-WRBTR_DZS = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'SA' AND WAO_BSID-SHKZG = 'S'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT + WAO_BSID-WRBTR.
          WAO_BSID-WRBTR_SAS = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'SA' AND WAO_BSID-SHKZG = 'H'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
         WAO_BSID-WRBTR_SAH = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'AB' AND WAO_BSID-SHKZG = 'S'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT + WAO_BSID-WRBTR.
          WAO_BSID-WRBTR_ABS = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'AB' AND WAO_BSID-SHKZG = 'H'.
        WAO_BSID-ONAC_AMT = WAO_BSID-ONAC_AMT - WAO_BSID-WRBTR.
         WAO_BSID-WRBTR_ABH = WAO_BSID-WRBTR.
    ELSEIF WAO_BSID-BLART = 'RV' AND WAO_BSID-SHKZG = 'H' AND WAO_BSID-ZUONR = ' '.
      ELSEIF WAO_BSID-BLART = 'RV' AND WAO_BSID-SHKZG = 'H'.
         WAO_BSID-WRBTR_RVH = WAO_BSID-WRBTR.
      ELSEIF WAO_BSID-BLART = 'RV' AND WAO_BSID-SHKZG = 'S'.
         WAO_BSID-WRBTR_RVS = WAO_BSID-WRBTR.
      ENDIF.
        WA_ITAB-KUNNR    = WAO_BSID-KUNNR.
        WA_ITAB-WRBTR_DG = WAO_BSID-WRBTR_DG.
        WA_ITAB-WRBTR_DR = WAO_BSID-WRBTR_DR.
        WA_ITAB-WRBTR_DZS = WAO_BSID-WRBTR_DZS.
        WA_ITAB-WRBTR_DZH = WAO_BSID-WRBTR_DZH.
        WA_ITAB-WRBTR_OBH = WAO_BSID-WRBTR_OBH.
        WA_ITAB-WRBTR_OBS = WAO_BSID-WRBTR_OBS.
        WA_ITAB-WRBTR_SAH = WAO_BSID-WRBTR_SAH.
        WA_ITAB-WRBTR_SAS = WAO_BSID-WRBTR_SAS.
        WA_ITAB-WRBTR_RVH = WAO_BSID-WRBTR_RVH.
        WA_ITAB-WRBTR_RVS = WAO_BSID-WRBTR_RVS.
        WA_ITAB-WRBTR_ABH = WAO_BSID-WRBTR_ABH.
        WA_ITAB-WRBTR_ABS = WAO_BSID-WRBTR_ABS.
       WA_ITAB-AC_AMT    = WAO_BSID-AC_AMT.
        COLLECT WA_ITAB INTO ITAB.
      MODIFY ITO_BSID FROM WAO_BSID.
    ENDLOOP.
    ENDLOOP.
    CLEAR : SLNO.
    clear : wa_itab.
    SORT ITAB BY KUNNR.
    LOOP AT ITAB INTO WA_ITAB.
    SLNO = SLNO + 1.
    WA_ITAB-SNO = SLNO.
    READ TABLE CTAB INTO WA_CTAB WITH KEY KUNNR = WA_ITAB-KUNNR.
         WA_ITAB-NAME1 = WA_CTAB-NAME1.
         WA_ITAB-BZIRK = WA_CTAB-BZIRK.
         WA_ITAB-ZTAG1 = WA_CTAB-ZTAG1.
        WA_ITAB-AC_AMT =     WA_ITAB-WRBTR_SAS
                           - WA_ITAB-WRBTR_SAH
                           - WA_ITAB-WRBTR_OBH
                           + WA_ITAB-WRBTR_OBS
                           + WA_ITAB-WRBTR_RVS
                           - WA_ITAB-WRBTR_RVH
                           - WA_ITAB-WRBTR_ABH
                           + WA_ITAB-WRBTR_ABS
                           - WA_ITAB-WRBTR_DG
                           + WA_ITAB-WRBTR_DR
                           - WA_ITAB-WRBTR_DZH
                           + WA_ITAB-WRBTR_DZS.
    *WRITE : / WA_ITAB-WRBTR_DR.
                           data : aaaa type p decimals 2,
                           bbbb type p decimals 2,
                           cccc type p decimals 2,
                           wrbtr_shkzg like bsid-shkzg.
    SELECT      shkzg wrbtr
                FROM bsid
                INTO (wrbtr_shkzg , wrbtr_note )
                WHERE kunnr = wa_itab-kunnr
                AND UMSKZ = 'G'.
                if wrbtr_shkzg = 'S'.
      aaaa = wrbtr_note + aaaa.
      elseif wrbtr_shkzg = 'H'.
      bbbb = wrbtr_note + bbbb.
      endif.
    endselect.
    cccc = BBBB - AAAA.
    wa_itab-outs_amt = wa_itab-ac_amt.
    wa_itab-onac_amt = wa_itab-baln_amt - wa_itab-outs_amt.
    onacc = wa_itab-onac_amt.
    wa_itab-vbeln = wac_bsid-vbeln.
    WRITE : /    wa_itab-sno,
             5   wa_itab-kunnr  LEFT-JUSTIFIED HOTSPOT ON,
             16  wa_itab-name1,
             50  wa_itab-bzirk,
             63  wa_itab-ztag1 RIGHT-JUSTIFIED,
             69  CCCC LEFT-JUSTIFIED,
             85  wa_itab-outs_amt,
             105 wa_itab-baln1,
             125 wa_itab-baln2,
             145 wa_itab-baln3,
             165 wa_itab-baln4,
             185 wa_itab-baln5,
             205 wa_itab-baln6,
             225 wa_itab-onac_amt
    MODIFY itab FROM wa_itab.
    HIDE : wa_itab-kunnr , wa_itab-name1.
    ENDLOOP.
    WRITE : / sy-uline.
    TOP-OF-PAGE.
    WRITE :  / 'SNo',
              5  'C-Code',
             16  'Customer Name',
             50  'Region',
             58  ' CR-DAYS',
             72  'SEC.AMOUNT',
             86  'Net O/S Amount',
             107  '0 to', int1e, 'Days',
             125  int2s, 'to', int2e, 'Days',
             145 int3s, 'to', int3e, 'Days',
             165 int4s, 'to', int4e, 'Days',
             185 int5s, 'to', int5e, 'Days',
             210 '>',int5e, 'Days',
             230 'On Account',
             / sy-uline.
            'Invoice Amount',
            80  'Paid Amount',
            100 'Balance Amount',.
    FORM aging_calculation.
    CLEAR : billing_date, credit_days, wa_ctab.
    DATA : shiftdays TYPE tb_days_to_pos.
    CLEAR : shiftdays, overdue_days.
    READ TABLE ctab INTO wa_ctab WITH KEY kunnr = wac_bsid-kunnr.
      billing_date = wac_bsid-fkdat.
      credit_days  = wa_ctab-ztag1.
         overdue_date = billing_date.
      CALL FUNCTION 'FAGL_ITEM_OVERDUE_DAYS'
        EXPORTING
         key_date                =  key_date
        PAY_DATE                =
          due_date                = overdue_date
        CLEAR_DATE              =
       IMPORTING
        OVER_SKONTO1_DAYS       =
         overdue_days            =  overdue_days
        wac_bsid-od_days = overdue_days.
           IF int1 IS INITIAL.
            int1s = 0.
            int1e = 0.
           ELSEIF int1 IS NOT INITIAL.
            int1s = 0.
            int1e = int1.
           ENDIF.
           IF int2 IS INITIAL.
            int2s = 0.
            int2e = 0.
           ELSE.
            int2s = int1 + 1.
            int2e = int2.
           ENDIF.
           IF int3 IS INITIAL.
            int3s = 0.
            int3e = 0.
           ELSE.
            int3s = int2 + 1.
            int3e = int3.
           ENDIF.
           IF int4 IS INITIAL.
            int4s = 0.
            int4e = 0.
           ELSE.
            int4s = int3 + 1.
            int4e = int4.
           ENDIF.
           IF int5 IS INITIAL.
            int5s = 0.
            int5e = 0.
           ELSE.
            int5s = int4 + 1.
            int5e = int5.
           ENDIF.
          IF  wac_bsid-od_days BETWEEN int1s AND int1e.
                  wac_bsid-baln1 =  wac_bsid-age_amt.
          ELSEIF  wac_bsid-od_days BETWEEN int2s AND int2e.
            wac_bsid-baln2 =  wac_bsid-age_amt.
          ELSEIF  wac_bsid-od_days BETWEEN int3s AND int3e.
            wac_bsid-baln3 =  wac_bsid-age_amt.
          ELSEIF  wac_bsid-od_days BETWEEN int4s AND int4e.
            wac_bsid-baln4 =  wac_bsid-age_amt.
          ELSEIF  wac_bsid-od_days BETWEEN int5s AND int5e.
            wac_bsid-baln5 =  wac_bsid-age_amt.
          ELSEIF  wac_bsid-od_days > int5e.
            wac_bsid-baln6 =  wac_bsid-age_amt.
          ENDIF.
    ENDFORM.
    please tell me how can i include blart = dr in this report for that specific period in this report
    every thing except this working fine
    points will be awarded

    Hi,
    In this way you can get the summation dr in the base list.
    LOOP AT ITAB INTO WA_ITAB.
    dr_total = dr_total + WA_ITAB-WRBTR_DR.
    endloop.
    If you want to include  blart = dr in this report for that specific period what you can do is write HIDE inside loop and hide DR
    Later on you can read it directly from the hide table for that specific periord and can make blart = dr.
    Reward some points
    Bye,
    Anomitro

  • URGENT: I want to pass a variable to a stored procedure at run time

    Post Author: aruplabs
    CA Forum: Data Connectivity and SQL
    I work for a health care provider and I have reports that pull PHI (Protected Health Information) about patients that needs to be logged according to federal HIPAA regulations. One of the pieces of information that needs to be logged is the username of the person who ran the report. Since these reports will be run from our Crystal Enterprise server I can get this from the CurrentCEUserName variable but I am looking for a way to pass this value to a stored procedure that will not only return the records for the report, but also log the disclosure in our PHI disclosure tracking table. I know you can pass a parameter to a stored procedure but I dont know how, or if it is even possible, to pass a run time variable. This is an urgent problem that I need to find a solution for. Any help would be appreciated.
    Thank you.

    Here it is. Right now, when i press te "Go" it runs for the specific time i've set and when its done the variable "Run" is set true. When i call this VI from another VI it waits for the loop to be finished before it will read the variable.
    Regards
    Viktor
    Attachments:
    Untitled 2.vi ‏26 KB

  • DTP-ABAP run time error- Urgent

    Hi All
    I had put Sales order as the key in my COPA DSO,due to which i was getting summarised records, nw i removed this key and put the Lowest granular detail key and i.e BW doc # (0doc_num) & then i have activated my DSO.Now when i do the DTP frm COPA Datasource to my DSO, the Records get updated but in DTP run i get ABAP run time Error as 'ASSIGN_TYPE_CONFLICT'
    Short Text: Type Conflict with ASSIGN in program "GP493C06NEDFLBYD3SN1KJR3EDX"Can any1 please advice on this as this is quiet urgent.
    Points are assured
    Thanks

    Hi Noor,
    Regarding your problem, p/s do this:
    1. Go to tx: RSSGPCLA
    2. Highlight the RSTRAN_MASTER_TMPL then click set status button
    3. Re-execute the DTP.
    Or you can see it : Notes: 908427
    As your references.
    Hopefully it can help you a lot.
    Best regards,
    Niel.
    thanks for the points you choose to assign.

  • [Urgent!!]How to control the running time??

    Hi,
    I'm an undergraduate researcher in the University of Michigan. I used NI labVIEW FPGA on my current project and now i meet a problem.
    I have a labview code that has runs with 3 subroutines. they execute one after another for a given time period for each iteration of the entire code. that is i built them in a flat sequence structure inside a large while loop and each of the subroutine is a while loop with several subvi's in it. not that complicated but i have to specify how long each subroutine runs. now i have a problem to set that execution time. i don't know exactly what kind of timing function i shall use. i tried the "Elapsed time" function but that only works for the first iteration. from the second iteration on each subroutine only runs for once, instead of continuing to run until the given time elapsed. so i don't know how to correctly control the running time. It's reallly urgent, so could you please give me some suggestions about it? Thanks a million!!
    Xiaofei

    Thank you for your suggestion!
    sorry but that this method won't help because my code is sort of difficult to put into a for loop .
    the logic is like this: first the output is set to 0 for a user-defined amount of time (means no excitation). secondly it gets excitation and gets output but no data saving is allowed for a user-defined amount of time. at the same time, one paramater is automatically changed. (the reason for not saving data is that there is a transient response when the parameter changes). thirdly, data saving begins with the same
    parameters as before, also for a user-defined amount of time. and then after these three steps one iteration is done. for iterations there is a different parameter, the user defines the range of the parameter and the number of different values in between and the code will do the increment at equal intervals automatically. my problem now is that i don't know how to correctly control the time. i have tried various ways but no one works.
    the second problem is that i don't know how to let it run and not saving data and then saving data without changing everything else. what i have now is to call the same VI twice, once for only running and no data saving and the other for saving data. but then the problem is that in between these two routines, the output suddenly becomes zero and gets excited again after i call it.  My professor said that i cannot let the output become zero, otherwise there is no meaning in waiting for the excitation to become stablee. but then i don't know how to call a VI only once and let it do the saving for only the latter part of the running time. i have been working on this thing for two weeks now and still have no idea....Sorry the problem is long and tedious, but if anyone have any idea about it, please let me know, i will be most grateful. Thanks a million!!!

Maybe you are looking for

  • After 1.2.3 update, Ipod freezes playing songs and is SLOW

    Hello, I updated my 5th Generation to 1.2.3 with Itunes at the latest level. Now the Ipod plays for awhile and then pauses for 30 seconds and then continues playing the song. It also takes about a minute for a playlist to begin playing. All worked we

  • How to assign new fields to a specific role ( e.g  employee) in BP

    Dear Experts, I have enhanced 3 customer fields in BP using EEWB, I am able to see this fields in BP ( tab customer data) but these fields are existing in all the roles of BP ( like vendor, bidder, service provider, employee etc).I would like to spec

  • Parallels Desktop 3.0 on Snow Leopard

    We would like to upgrade to the new Snow Leopard OS. However we are presently running Parallels Desktop 3.0 for Mac on the OS X Leopard software. Part of the decision to upgrade to OS X Snow Leopard will depend on being able to do a smooth transition

  • Use of JSR-94 in oracle business rule

    I am developing an application using oracle business rules . I want to create a JSR-94 Rule Execution Set from Rule Sets in a Dictionary and want to run the application through created rule execution set. I have taken reference form OracleBusinessRul

  • JFileChooser under Java Web Start

    I have a problem when using a JFileChooser - object in a Web Start Application: I always get the message that there is no disk in drive A:, even if I create the JFileChooser object with a default path String in the constructor JFileChosser fileChoose