Some code explanation.

dear all,
can u please tell me what does     month = SOURCE_FIELDS-fiscper+5(2). does? what exactly does +5(2) does? thanks.

Offset
month = SOURCE_FIELDS-fiscper+5(2).
the above code will populate the month from the  SOURCE_FIELD field fiscper
fiscper+5(2)
+5 "from 5th position(character 6 and character 7) , 2 means 2 characters(char 6, char 7)
will be taken .
Read the help on Offest.

Similar Messages

  • Explanation of some code samples

    Hello,
    can you explain me some code samples?
    First:
    try{
    wdContext.currentBapi_Flight_Getlist_InputElement().
    modelObject().execute();
    catch (Exception ex){
    ex.printStackTrace();
    wdContext.nodeOutput().invalidate();
    Second:
    Bapi_Flight_Getlist_Input input =
         new Bapi_Flight_Getlist_Input();
    wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
    input.setDestination_From(new Bapisfldst());
    input.setDestination_To(new Bapisfldst());
    Thanks for your help,
    André

    Hi Andre,
    I hope you know how Rfcs work so I shall start of from there. So i shall explain with the little amount of grasp I have in the topic
    First:
    What the first code does is, to connect to the R/3 system and execute the RFC/BAPI with the input populated in the context node.
    invalidate is used to refresh the output node .
    Second:
    This part of the code is to bind the imported model of the RFC to the context model node and also to instantiate an instance of the structure to input the values into the table(input.setDestination_From(new Bapisfldst())).
    Hope this would explain a bit.
    Do reply with your feedback.
    Regards
    Noufal

  • Improvements to status code explanations requested

    There are some status code explanations in the 9.0.4.x
    CSDK that could probably use some refinement to be more
    useful to application developers.
    Two examples:
    1."CAPI_STAT_LIBRARY_INTERNAL_DATA = There was a corruption of data in the library."
    This might not always indicate that data in the
    calendar store is corrupted - which is the way we
    initially interpreted this error - but rather that
    data provided to be stored is in some way invalid.
    Example: calling storeEvents() with an
    iCalendar whose DTSTART property was after
    DTEND (i.e. start date after ending date),
    returned the status "CAPI_STAT_LIBRARY_INTERNAL_DATA".
    Example: calling Session.storeEvents() with an iCalendar
    whose start and end dates are in a non-UTC TZ in a format
    similar to "DTSTART;TZID=US/Pacific:20040517T101500",
    that method returned "CAPI_STAT_LIBRARY_INTERNAL_DATA".
    Fix: include an appropriate VTIMEZONE component
    for that timezone in the submitted iCalendar.
    2. Any of the explanations below, which begin with
    "Information about ..."
    These often seem to indicate that a data format error
    has occurred, and that the application developer
    needs to modify the format of the data to have it
    accepted. The "Information about ..." explanation
    doesn't adequately convey that.
    Examples:
    When calling storeEvents() with an iCalendar with a
    missing CR/LF between VEVENT components, that method
    returned the status "CAPI_STAT_DATA_ICAL".
    Some of the relevant status explanations include:
    CAPI_STAT_DATA_COOKIE = Information about the supplied cookie.
    CAPI_STAT_DATA_DATE = Information about a date.
    CAPI_STAT_DATA_EMAIL = Information about email.
    CAPI_STAT_DATA_ENCODING = Information about the encoding of supplied data.
    CAPI_STAT_DATA_HOSTNAME = Information about a hostname.
    CAPI_STAT_DATA_ICAL = Information about iCalendar data.
    CAPI_STAT_DATA_MIME = Information about MIME data.
    CAPI_STAT_DATA_UID = Information about a UID.
    CAPI_STAT_DATA_USERID = Information about a userID.
    In contrast, explanations like the following are much
    clearer:
    CAPI_STAT_DATA_USERID_FORMAT = The format of the UserId string was wrong.
    CAPI_STAT_DATA_USERID_ID = There was a problem with the Id part of the UserId string.
    Any improvements such as these in the status code
    explanations returned would be welcome, and might help
    save debugging time for those new to the CSDK.

    Thanks Aaron,
    Some notable improvements are coming in the next version of the Oracle Calendar application developer's guide, and your comments will be added for consideration.
    Best regards,
    Product Management

  • Is there a way to address email (i.e. a word or some code) that would place that email in a specified inbox folder?  not using internal rule, rather the beginning of this sort happening as it comes in?

    is there a way to address email (i.e. a word or some code) that would place that email in a specified inbox folder?  not using internal rule, rather the beginning of this sort happening as it comes in?
    In other words
    I tell a friend if he is emailing me on a particular subject, is there something he can do at his end ([email protected]/research)
    like adding the word research at the end of my eamil address that would tell my inbox to place that in the inbox/research folder?
    If I have to use a rule on my end, then do I tell him to just place the word research in the subjct line and then I write a rule to place anything with the word research in the subject line in my inbox/research folder?
    will the subject line be required to only have the one word research to work, or will the rule look for any presense of that word in the subject line?
    thanks
    eric

    iCloud email supports 'plus' addressing. http://en.wikipedia.org/wiki/Email_address#Address_tags
    So your friend could just add '+research' to the username part of your email address, and you setup a rule at icloud.com to put all emails sent to that address into a particular folder.
    For example:
    [email protected]
    There's no way to do it without rules on the server though.

  • How do I execute some code when a line of a table control is selected?

    Hi,
    I would like to execute some code when a line of a table control is selected.  At the moment I have to select one or multiple rows and then press enter, this forces a screen refresh and my code is executed but I would like the code to be executed as soon as any line is selected.
    I've done something like this using ALV grids and object orientated code but is there a way of doing this in a normal non-OO table control?
    Thanks in advance.
    Gill

    Hi,
    U need to declare a char1 field for marking (mark field).  This will reflect with value 'X' in your tcontrol internal table for all the selected rows. 
    Now u need to handle the okcode for enter in your PAI.
    There u need to loop through the table for all marked fields.
    There after u can do what ever u want.
    Venkat.

  • Change some code from as3 to as2

    Hi, I want to use as2 because it compatible with my website.
    I want to change some code from as3 to as2
    /////////////////////////////image1//////////////////////////////// if(MovieClip(this.parent).imagetxt.text == "a") {     var imgurl:String = "C:/Users/Thái/Desktop/ls/cotton-1.jpg";     var myrequest:URL = new URL(imgurl);     myloader.scaleContent = true;     myloader.load(myrequest); } /////////////////////////////image2//////////////////////////////// else if(MovieClip(this.parent).imagetxt.text == "b") {     var imgurl2:String = "http://aloflash.com/images/upload/3.jpg";     var myrequest2:URLRequest = new URLRequest(imgurl2);     myloader.scaleContent = true;     myloader.load(myrequest2); }thank you for your support.

    use:
    var myloader:MovieClip=this.createEmptyMovieClip("loader_mc",this.getNextHighestDepth());
    if (MovieClip(this._parent).imagetxt.text == "a") {
        var imgurl:String = "C:/Users/Thái/Desktop/ls/cotton-1.jpg";
        myloader.load(imgurl);
    } else if (MovieClip(this._parent).imagetxt.text == "b") {
        var imgurl2:String = "http://aloflash.com/images/upload/3.jpg
        myloader.load(imgurl2);

  • Code explanation

    In a recent question the fix was:
    select 'update TABLE_NAME SET [' + name + '] = 0 where [' + name + '] is NULL'
    from sys.columns
    WHERE object_id = OBJECT_ID(N'[dbo].[TABLE_NAME]')
    The code worked great. I am trying to understand and learn more about exactly what is happening. Is there a link where I can go that will teach me what ['+name+'] is doing. I know that it is getting the information from the WHERE statement, but cannot
    figure out exactly how it works. I seem to learn and retain more when I understand what is happening, and not merely cutting and pasting some code that works.
    Your attention in this matter is greatly appreciated,
    Bruce

    You are building a dynamic string with the query. "name" is one of the columns in sys.columns
    select name from sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[TABLE_NAME]')
    If you have a string as one of your select fields then that exact string will be returned for every row in the result set.
    select 'is the column name' from sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[TABLE_NAME]')
    if you include a string along with columns you will get the column value(s) and the string will be repeated as as column in the result set.
    select name,'is the column names'
    from sys.columns
    WHERE object_id = OBJECT_ID(N'[dbo].[TABLE_NAME]')
    And finally, you can add columns together is they are compatible types. In this case the name column is compatible with the string.
    select name+' is the column name'from sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[TABLE_NAME]')
    Here is a pretty comprehensive post abouts dynamic sql
    http://www.sommarskog.se/dynamic_sql.html

  • Flex iPad Application : Run code before application enters background  Application Type: Flex Mobile Application Target Platform: iPad AIR Version: 4.0 Development Environment: Flash builder 4.6  I want to run some code just before iphone application goes

    Application Type: Flex Mobile Application
    Target Platform: iPad
    AIR Version: 4.0
    Development Environment: Flash builder 4.6
    I want to run some code just before iphone application goes into background. I need function similar to didEnterBackground
    of native xcode app
    (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegat e_Protocol/Reference/Reference.h
    tml#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:)
    I tried using devactivated function of flash.display.STAGE.
    I used following addEventListener:
    STAGE = this.parent.stage;
    STAGE.addEventListener(Event.DEACTIVATE, onAppDeactivated);
    It worked for me but only when device is connected to development environment in debug mode. When I create my release build
    it is not working.
    So how can I make sure that my code runs before application goes into background.

    Even I am facing almost same issue
    Problem installing Adhoc version to iPhone and iPad - Development Environment Is - Adobe Flash CS6

  • HT201252 can not restore ipod it is in disabled gets to the the middle of restore and some cod 9006 come up -

    can not restore iPOD it is in disabled ,some cod 9006
    need help

    Check your security software
    Related errors: 2, 4, 6, 9, 1000, 1611, 9006. Sometimes security software can prevent your device from communicating with either the Apple update server or with your device.
    Check your security software and settings to make sure that they aren't preventing a connection to the Apple servers.

  • [svn:fx-trunk] 11118: Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file .

    Revision: 11118
    Author:   [email protected]
    Date:     2009-10-23 16:35:38 -0700 (Fri, 23 Oct 2009)
    Log Message:
    Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: None; no functional changes
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.a s
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTex tBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as

    Hi Rod,
    different sources (i.e. different branches) are mapped to different local folders in your workspace - in fact you cant map two different server folder to the same local folder.
    In you example the mapping would be (for example) like this:
    Server path                                                          
    local path
    $/../WpfHelloWorld                                                
    C:\Src\WpfHelloWorld
    $/../WpfHelloWorldDev                                           
    C:\Src\WpfHelloWorldDev             
    You can see your Workspace mappings when you select "Workspaces..." in the Workspace selection drop down:
    Within the "Manage Workspaces" dialog select your workspace and klick "Edit" to see and edit all you mappings.

  • Dynpro application: how to perform some  code when user click window close

    Hello,
    I'm developing dynpro application. This application needs to perform some code when exiting.
    I can do that with MODULE xxxxx AT EXIT-COMMAND. But this code can't be performed when user of application click on button closing window (classic R/3 window, not pop-up).
    Does anybody know how to bind some code to clicking on button closing window?
    Best regards,
    Josef Motl

    As far as the prompt that you get when you close the last window is coming from the counter that SAP maintains regarding the number of open sessions(windows). When this counter reaches 1, I guess they have a check to issue a prompt. There was a discussion in this forum a long time back regarding how we can know that session id like SM04. There was no conclusion reached then. Theoritically, let us know you know this id for the session in which the user opened a particular page, then you can see if that session is deleted and then take the necessary action. There are some TH_* function modules that seem to be promising, but I was not able to conclusively achieve the control over a particular session.
    See if you can look at SM04 and get an idea. Please do let us know if you find the solution.
    Srinivas

  • When I add some code like the below to a webpage

    sometimes when I add some code like the below to a
    webpage[dwmr mx 2004 or cs4], the page destroyed/currupted like the
    css missing[is inside a template], well I think page stills
    displays ok online but in "design view" default fonts appear etc
    destructions, well how I recover page just prior entered the code ?
    <input name="st" type="hidden" value="<?=
    isset($_GET['sort'])?$_GET['sort']:(isset($_GET['price'])?'price':(isset($_GET['popular'] )?'popular':(isset($_GET['wd4'])?'wd4':(isset($_GET['salon'])?'salon':(isset($_GET['manual '])?2:1)))));
    ?>" />
    <script type="text/javascript">
    function highlightTableCells()
    document.getElementById('cars').style.backgroundColor='#00CC66';
    switch(document.getElementById('st').value)
    case "price":
    document.getElementById('price').style.backgroundColor='#00CC66';
    break;
    case "2": //manual
    document.getElementById('manual').style.backgroundColor='#00CC66';
    document.getElementById('manual2').style.backgroundColor='#00CC66';
    break;
    case "1":
    document.getElementById('auto').style.backgroundColor='#00CC66';
    document.getElementById('auto2').style.backgroundColor='#00CC66';
    break;
    case "salon":
    document.getElementById('salon').style.backgroundColor='#00CC66';
    document.getElementById('salon2').style.backgroundColor='#00CC66';
    break;
    case "wd4":
    document.getElementById('wd4').style.backgroundColor='#00CC66';
    document.getElementById('wd42').style.backgroundColor='#00CC66';
    break;
    case "0":
    document.getElementById('all').style.backgroundColor='#00CC66';
    break;
    case "popular":
    document.getElementById('popular').style.backgroundColor='#00CC66';
    document.getElementById('popular2').style.backgroundColor='#00CC66';
    break;
    case "4wd":
    document.getElementById('wd4').style.backgroundColor='#00CC66';
    document.getElementById('wd42').style.backgroundColor='#00CC66';
    break;
    case "mpvs":
    document.getElementById('mpvs').style.backgroundColor='#00CC66';
    break;
    case "cabrios":
    document.getElementById('open').style.backgroundColor='#00CC66';
    break;
    case "a":
    document.getElementById('a').style.backgroundColor='#00CC66';
    break;
    case "b1":
    document.getElementById('b1').style.backgroundColor='#00CC66';
    break;
    case "b2":
    document.getElementById('b2').style.backgroundColor='#00CC66';
    break;
    case "c":
    document.getElementById('c').style.backgroundColor='#00CC66';
    break;
    case "d":
    document.getElementById('d').style.backgroundColor='#00CC66';
    break;
    case "d1":
    document.getElementById('d1').style.backgroundColor='#00CC66';
    break;
    case "e1":
    document.getElementById('e1').style.backgroundColor='#00CC66';
    break;
    case "e2":
    document.getElementById('e2').style.backgroundColor='#00CC66';
    break;
    case "f":
    document.getElementById('f').style.backgroundColor='#00CC66';
    break;
    case "g":
    document.getElementById('g').style.backgroundColor='#00CC66';
    break;
    case "h1":
    document.getElementById('h1').style.backgroundColor='#00CC66';
    break;
    case "h2":
    document.getElementById('h2').style.backgroundColor='#00CC66';
    break;
    case "i":
    document.getElementById('i').style.backgroundColor='#00CC66';
    break;
    case "j":
    document.getElementById('j').style.backgroundColor='#00CC66';
    break;
    case "k1":
    document.getElementById('k1').style.backgroundColor='#00CC66';
    break;
    case "k2":
    document.getElementById('k2').style.backgroundColor='#00CC66';
    break;
    case "n":
    document.getElementById('n').style.backgroundColor='#00CC66';
    break;
    case "p1":
    document.getElementById('p1').style.backgroundColor='#00CC66';
    break;
    case "p2":
    document.getElementById('p2').style.backgroundColor='#00CC66';
    break;
    case "s":
    document.getElementById('s').style.backgroundColor='#00CC66';
    break;
    case "u":
    document.getElementById('u').style.backgroundColor='#00CC66';
    break;
    </script>

    Take a look at a previous thread on this topic: http://forums.adobe.com/message/5099353

  • Java Graph code explanation

    Hi all,
    im new to java and have some trouble drawing a graph i looked up some code but dont quite understand it
    can someone explain the following code please. I understand swing and painting and basic java.
    Q1) Can please explain the flow of execution ?
    Q2)
    What i would also specifically like to understand about the code
    is how does the graph keep going and looks like it scrolls across and not off the frame and how can i add this to a frame i already have
    without covering over my other objects i have displayed.
    Any help would be greatly appreciated.
    Thanks
    import java.awt.*;*
    *import javax.swing.*;
    import java.awt.event.*;*
    *import javax.swing.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.geom.*;*
    *import java.math.*;
    import java.util.*;*
    *public class ecg extends JFrame*
    *     myView view = new myView();*
    *     Vector vr   = new Vector();*
    *     int    ho   = 0;*
    *public ecg()* 
    *     addWindowListener(new WindowAdapter()*
        *{     public void windowClosing(WindowEvent ev)*
    *          {     dispose();*
    *               System.exit(0);}});*
    *     for (int i=0; i < 5000; i++)*
    *          int p = (int)(Math.random()*  260);
              vr.add(new Point(0,p-130));
         setBounds(3,10,625,350);
         view.setBounds(10,10,600,300);
         getContentPane().add(view);
         getContentPane().setLayout(null);
         setVisible(true);
         while (ho < 500-300)
              try
                   Thread.sleep(110);
                   ho = ho  +1;+
    +               repaint();+
    +          } catch (InterruptedException e) {}+
    +     }+
    +}+
    +public class myView extends JPanel+
    +{+
    +     BufferedImage I;+
    +     Graphics2D    G;+
    +public myView()+
    +{+ 
    +}+
    +public void paint(Graphics g)+
    +{+
    +     if (I == null)+
    +     {+
    +          I = new BufferedImage(getWidth(),getHeight(),BufferedImage.TYPE_INT_ARGB);+
    +          G = I.createGraphics();+
    +     }+
    +     G.setColor(Color.white);+
    +     G.fillRect(0,0,getWidth(),getHeight());+
    +     G.setColor(Color.gray);+
    +     Point p1,p2;+
    +     p1 = (Point)vr.get(ho);+
    +     int x = 0;+
    +     for (int y=1; y < 600; y++)
              p2 = (Point)vr.get(y+ho);
              G.drawLine(x,p1.y+150,x+6,p2.y+150);
              p1 = (Point)vr.get(y+ho);
              x = x + 6;
         g.drawImage(I,0,0,null);
    public static void main (String[] args) 
         new ecg();
    }

    Compiling your posted code gives a compiler warning:
    C:\jexp>javac ecg.java
    Note: ecg.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    C:\jexp>javac -Xlint:unchecked ecg.java
    ecg.java:31: warning: [unchecked] unchecked call to add(E) as a member of the raw type jav
    a.util.Vector
                vr.add(new Point(0,p-130));
                      ^
    1 warningWe can eliminate this by changing this
        Vector vr   = new Vector();to this
        Vector<Point> vr   = new Vector<Point>();The best way to understand things like this is to start a new file and slowly build it up so you can see what's going on, step-by-step. I've put in some comments and print statements to give you a start.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.geom.*;
    import java.math.*;
    import java.util.*;
    public class ECG extends JFrame
        myView view = new myView();
        Vector<Point> vr = new Vector<Point>();
        int    ho   = 0;
        public ECG()
            addWindowListener(new WindowAdapter()
                @Override
                public void windowClosing(WindowEvent ev)
                    dispose();
                    System.exit(0);
            // Initialize data in Vector.
            for (int i=0; i < 5000; i++)
                int p = (int)(Math.random() * 260); // range: (0    - 260]
                vr.add(new Point(0, p-130));        // range: (-130 - 130]
            System.out.println("Total number of data points: " + vr.size());
            setBounds(3,10,625,350);
            // Component drawing space is 600 wide by 300 high.
            view.setBounds(10,10,600,300);
            getContentPane().add(view);
            getContentPane().setLayout(null);
            setVisible(true);
            // Animate up thru the first 200 of 5000 data points.
            int millisPerSecond = 1000;
            long delay = 110;
            long framesPerSecond = millisPerSecond/delay;
            System.out.printf("Frames per second: %d%n", framesPerSecond);
            int paintSteps = 600;
            int dataIndex = 200;
                            //5000 -1 - paintSteps;  // max possible index
            System.out.printf("Expected animation time: %f seconds%n",
                               (double)dataIndex/framesPerSecond);
            long start = System.currentTimeMillis();
            // Animation loop.
            while (ho < dataIndex)
                try
                    Thread.sleep(delay);
                    // Increment "ho" which will step us through the Vector data.
                    // Each new value draws the Vector graph data starting at
                    // index "ho" placed at the left edge of the image/component.
                    ho = ho + 1;
                    long end = System.currentTimeMillis();
                    double elapsedTime = (double)(end - start)/millisPerSecond;
                    if(ho % 100 == 0)
                        System.out.printf("ho: %d  time: %.2f%n", ho, elapsedTime);
                    // Update the image in the paint method.
                    repaint();
                } catch (InterruptedException e) {
                    System.out.println("animation interrupted");
            long end = System.currentTimeMillis();
            double elapsedTime = (double)(end - start)/millisPerSecond;
            System.out.printf("Total animation loop time: %f%n", elapsedTime);
        public class myView extends JPanel
            BufferedImage I;
            Graphics2D    G;
            public void paint(Graphics g)
                if (I == null)  // initializw image
                    I = new BufferedImage(getWidth(),getHeight(),
                                          BufferedImage.TYPE_INT_ARGB);
                    G = I.createGraphics();
                // Update image to show current state of animating graph.
                // Fill Background color.
                G.setColor(Color.white);
                G.fillRect(0,0,getWidth(),getHeight());
                // Set graph line color.
                G.setColor(Color.gray);
                // Draw next data segment to newly-erased image.
                // Get two points in data to draw the next line.
                Point p1,p2;
                // "ho" is a simple counter with range [0 - n-1]
                // [0 - 200-1] in the animation loop above.
                // Get the next data point at "ho" which will be drawn at
                // the beginning, ie, left edge (x = 0), of the image.
                p1 = vr.get(ho);
                int x = 0;
                // Since each frame starts at zero_x relative to the image:
                // x = 0.
                // Draw all graph data for this one 600 by 300 image frame
                // with data beginning at index "ho".
                for (int y=1; y < 600; y++)
                    // Get the next point out ahead.
                    p2 = vr.get(y+ho);
                    // Draw a line from the last point, p1, to the next point, p2,
                    // which will be spaced (x +=) 6 apart along the image/component
                    // width of 600 (setBounds). Translate the y values down onto
                    // the component by 150 pixels (the range of y values from
                    // above is from -129 to 130). The "+150" shifts the y values
                    // to the approximate center of the component.
                    G.drawLine(x, p1.y+150, x+6, p2.y+150);
                    // Save the current point to/in p1 for the next iteration.
                    p1 = vr.get(y+ho);
                    // Move along to the right in the image.
                    x = x + 6;
                // Draw image in component.
                g.drawImage(I,0,0,null);
        public static void main (String[] args)
            new ECG();
    }

  • Laura, I need some code samples you mentioned...

    Laura,
    I posted a message a few days ago regarding calling Stored Procedures in my JDev 3.1 (JDK 1.2.2) BC4J application. I need to be able to call them two different ways. The first involves passing some parameters to the SP and recieving back the ResultSet. In the other instance I simply need to make a call to them to perform some tasks on the DB side. Nothing will be returned from these SP's. You discussed implementing the SQL as a VO and gave me some code showing me how I might do this. You also mentioned that it is possible to create a method on the AppMod and call this from the JSP client. I need to know which method should work best for me and to get the code samples for the second option.
    Thanks.
    Rob

    Hi,
    Here is the code I used for the custom method on my VO (same could be used from the app module rather than a specific VO). The stored procedure I am calling here performs some calculations and returns an integer value:
    public int getTotalHits(String mon, String year) {
    CallableStatement stmt = null;
    int total;
    String totalhits = "{? = call walkthru.total_hits(?,?)}";
    stmt = getDBTransaction().createCallableStatement(totalhits, 1);
    try
    // Bind the Statement Parameters and Execute this Statement
    stmt.registerOutParameter(1,Types.INTEGER);
    stmt.setString(2,mon);
    stmt.setString(3,year);
    stmt.execute();
    total = stmt.getInt(1);
    catch (Exception ex)
    throw new oracle.jbo.JboException(ex);
    finally
    try
    stmt.close();
    catch (Exception nex)
    return total;
    After adding the custom method to your appmoduleImpl.java file and rebuilt your BC4J project, do the following:
    1. Select the Application Module object and choose Edit from the context menu.
    2. Click on the Client Methods page. You should see the method you added in the Available list.
    3. Select the method and shuttle it to the Selected list.
    4. Click Finish. You should see a new file generated under the application module object node in the Navigator named appmodule.java that contains the client stubs for your method.
    5. Save and rebuild your BC4J project.
    I wrote a custom web bean to use from my JSP page to call the method on my VO:
    public class GetTotals extends oracle.jdeveloper.html.DataWebBeanImpl {
    public void render() {
    int totalhits;
    try
    Row[] rows;
    // Retrieve all records by default, the qView variable is defined in the base class
    qView.setRangeSize(-1);
    qView.first();
    rows = qView.getAllRowsInRange();
    // instantiate a view object for our exported method
    // and call the stored procedure to get the total
    ViewObject vo = qView.getViewObject();
    wtQueryView theView = (wtQueryView) vo;
    totalhits = theView.getTotalHits(session.getValue("m").toString(),session.getValue("y").toString());
    out.println(totalhits);
    } catch(Exception ex)
    throw new RuntimeException(ex.getMessage());
    I just call the render method on this custom web bean from the JSP. I am not passing parameters to the render method of the bean, but instead access the parameters I need from the session:
    session.getValue("m").toString()
    I set these session parameters from the JSP that is called when the user submits their query criteria form. For example:
    // get the view parameter from the form String month = request.getParameter("month");
    String year = request.getParameter("year");
    // store the information for reference later session.putValue("m", month); session.putValue("y", year);
    Hope this helps.

  • Adding some code before sending the IDOCs

    Hi all,
    I have one query. When I am doing some transaction system is generating the IDOC with status 03. Now My requirement is to send this IDOCs to the destination system after checking some conditions. So I want to insert to some code in the ALE configuration, so that it can filter the IDOCs based on my bussiness requirement. This is not simply checking one field, i have to write some logic after that only system should send the IDOC, Can you please tell me how to include the code?
    Thanks & Regards,
    Raghu

    Hi,
    There are two ways you can do it:
    1. Using Filters(Tcode BD64) & Convertion rules(Tcode BD55, BD62 & BD79).
    <b>Filter:</b>
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm
    <b>Conversion Rule:</b>
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    2. Check for the user-exit or BADI to add your business requirement.
    To get the exact solution please add the business scenario.
    <b>Note:</b> Reward each useful reply.
    Raja T
    Message was edited by:
            Raja T

Maybe you are looking for