Dynamic scrollbar position?

Hi all,
I have a scenario where the user needs a list of materials that is sorted by material text, which is used as a web based sales order creation application.
This list can be very long (1000+ lines) and is shown in a Table where one of the columns consists of an InputField where the user can enter either quantity or a search string.
If the user enters "F" the focus jumps to the first occurrence of a material with material text starting with "F", which can be far down the list, and if the user enters a number. this indicates the ordered quantity of the given material and the focus jumps to the next line.
Now, my problem is that when the list gets very long, the rendering of the table is very slow because all the lines has to be shown to use my "on-focus"-functionality. ( The "VisibleRowCount" is set to -1 ).
A solution would be to set "VisibleRowCount" to 40, and then let the user scroll the table, but then i will lose my very important "on-focus"-functionality because the scroll bar apparently does not follow the focus. Not even when i set Lead selection for the "F"-line the scroll bar follows.
Do some of you gurus have a suggestion to either move the scroll bar programmatically (if possible) or maybe some other solution where the demands are met?
Any help would be highly appreciated.
Kind regards
Jonas Lütken Petersen
Edited by: Jonas L Petersen on Jul 26, 2010 3:39 PM

The following is the information from SAP Help.
You can position the output of a WRITE statement on the list by making a format specification before the field name as follows:
Syntax
WRITE AT [/][<pos>][(<len>)] <f>.
where
the slash '/' denotes a new line,
<pos> is a number or variable up to three digits long denoting the position on the screen,
<len> is a number or variable up to three digits long denoting the output length.
If the format specification contains only direct values (that is, no variables), you can omit the keyword AT.
WRITE 'First line.'.
WRITE 'Still first line.'
WRITE / 'Second line.'
WRITE /13 'Third line.'
For more info, see link:
[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e3035c111d1829f0000e829fbfe/content.htm]
Regards,
Lakshmi.

Similar Messages

  • Dynamic select Position in SEM BCS

    Hi all!
    How I can dynamic select Position in SEM BCS, when I Load from Data streem and data type equal Changes in Investee Equity?

    Hi Eugene ,
    Thanks for your OSS note. However, I have applied the note and It hasn´t worked. I have opened an OSS note to SAP support.
    Best regards,
    Beatriz Bernardos

  • Scrollbar positions not working

    i got a tree like structure in jsp as
    Root
    --- Node1
    ---- ChildNode1
    --- Node2
    ---- ChildNode1
    ---- ChildNode2
    --- Node3
    ---- ChildNode1
    --- ChildNode1.1
    --- ChildNode1.2
    ---- ChildNode2
    .......and so on
    this is a dynamic tree . on click on each node the page is refreshed and the below child nodes are retrieved form the database.
    its all are working fine but my bug is on chicking on the each node, the page goes to the top again and again i ve to scroll down to position of the node what i have to do to hold on the scroll bar position where it is for the previous page.
    ive used ScrollTo() but its moving and again it goes to the top automatically wat to do

    Thanks for the suggestion, but I already looked before and
    after page 6, nothing has changed. I've been trying to create a new
    scrollbar with the instructions from the help on the UIScrollBar
    component, but the arrows on the scroll bar don't show up.
    I have the text in the text box showing up and changing with
    each page. But the scroll bars are not working. Here is the AS I
    have on frame 1:
    NarrativeText_bottom = narrative_text[_root.CurrentPgNumber];
    this.createClassObject(mx.controls.UIScrollBar, "my_sb");
    my_sb.setScrollTarget(InstanceName_0);
    my_sb.setSize(16,InstanceName_0._height);
    my_sb.move(NarrativeText_bottom =
    narrative_text[_root.CurrentPgNumber];
    this.createClassObject(mx.controls.UIScrollBar, "my_sb");
    my_sb.setScrollTarget(InstanceName_0);
    my_sb.setSize(16,InstanceName_0._height);
    my_sb.move(InstanceName_0._x + InstanceName_0._width,
    InstanceName_0._y);
    // Load text to display and define onData handler.
    var my_lv:LoadVars = new LoadVars();
    my_lv.onData = function(src:String) {
    if (src != undefined) {
    InstanceName_0.text = src;
    } else {
    InstanceName_0.text = "Error loading text.";
    ._x + InstanceName_0._width, InstanceName_0._y);
    // Load text to display and define onData handler.
    var my_lv:LoadVars = new LoadVars();
    my_lv.onData = function(src:String) {
    if (src != undefined) {
    InstanceName_0.text = src;
    } else {
    InstanceName_0.text = "Error loading text.";
    When I drag the component to the side of the text box, the
    instance name for the text field (InstanceName_0) automatically
    populates the _targetInstanceName property of the component, like
    it's supposed to. So why are the arrows on the scroll bar not
    showing up?? PLEASE HELP! thanks.

  • How to set the extra component to horizontal scrollbar position

    How to set the component to position of horizontal scrollbar , that position contain two component horizontal scrollbar and any component (JButton , JLabel ) like that.. Ms-Word scrollbar ,
    Like that bellow fig.
    <!--[if !mso]>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <![endif]--><!--[if gte mso 9]><xml>
    <w:WordDocument>
    <w:View>Normal</w:View>
    <w:Zoom>0</w:Zoom>
    <w:PunctuationKerning/>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
    <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
    <w:Compatibility>
    <w:BreakWrappedTables/>
    <w:SnapToGridInCell/>
    <w:WrapTextWithPunct/>
    <w:UseAsianBreakRules/>
    <w:DontGrowAutofit/>
    </w:Compatibility>
    <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
    </w:WordDocument>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
    </w:LatentStyles>
    </xml><![endif]-->
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {page:Section1;}
    -->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->{font:'Times New Roman'}{size:12pt}<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
    coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
    filled="f" stroked="f">
    <v:stroke joinstyle="miter"/>
    <v:formulas>
    <v:f eqn="if lineDrawn pixelLineWidth 0"/>
    <v:f eqn="sum @0 1 0"/>
    <v:f eqn="sum 0 0 @1"/>
    <v:f eqn="prod @2 1 2"/>
    <v:f eqn="prod @3 21600 pixelWidth"/>
    <v:f eqn="prod @3 21600 pixelHeight"/>
    <v:f eqn="sum @0 0 1"/>
    <v:f eqn="prod @6 1 2"/>
    <v:f eqn="prod @7 21600 pixelWidth"/>
    <v:f eqn="sum @8 21600 0"/>
    <v:f eqn="prod @7 21600 pixelHeight"/>
    <v:f eqn="sum @10 21600 0"/>
    </v:formulas>
    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
    <o:lock v:ext="edit" aspectratio="t"/>
    </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:453pt;
    height:26.25pt'>
    <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\04\clip_image001.png"
    o:title=""/>
    </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/04/clip_image002.jpg" alt="" width="485" height="27" /><!--[endif]-->{size}{font}
    How to design ?

    pradeep.rajadurai wrote:
    I want set the JTable as a background of jframe or jinternalframe , how it is possible One way that may work, you can always extract the image from a rendered JTable and then paint the same image into the JPanel that holds your components via it's paintComponent method, then added the JPanel to the app's contentPane.
    give me simple pgmIs English your second language? Because if so, please understand that this demand can be taken by some as rude.

  • SAPscript - Dynamic box position and height.

    Greetings...
    How to print dynamic box according to the Element. I have an element with looping condition when i used box the line only printed on the first loop, but and no line printed on the next looping even though its is  different element.. Below is the sneak peak of my code.
    /E 101
    /:   BOX WIDTH 0 MM HEIGHT '2' MM FRAME 20 TW
    /:   POSITION YORIGIN '+2' MM
    W2   <B>&text&</><B>,,&zvalue&</>
    Thank you

    Hi
    it is very hard to print a dynamic box with sapscript.
    It is more easy to develop a new-smartform then to develop a dynamic box.
    i know only 1 sapscript which is using dynamic boxes. I do not know the sapscript only the fucntional name we use. That is shopfloor papers (for a production order). It has a good combination of printprogram and sapscript which both has to be working together to get it done. Try to find it and study it. Then you will find out how it works.
      There is no way to get it done with only changes in your sapscript.
    an alternative is to use tab's and '|' and ulines to make something that look a bit like boxes.
    Hope this will help you out.
    Gr., Frank

  • SAPScript dynamic window position by command

    Hello Abapers,
    I am trying to move up/down a window that contains a graphic by commands because the position needs to be dynamically adjusted.
    I tried these commands -
    /:POSITION XORIGIN '5' CM YORIGIN '5'CM
    But it doesnt work..  Can anyone help? Appreciate it,
    Vince

    Hi
    This is syntax for positon:
    Position <xorigin> <yorigin> <window> <page>
    example:   /: POSITION 5 5 MAIN FIRST
    Please note: in the above example <window> = MAIN and <page> = FIRST
    Reward points if helpful

  • Dynamic field positions

    Hi Friends,
    I have a requirement of Dynamic change of field positions,I have to write the Material number field positions dynamically,suppose the material is Eight characters after removiing leading zeros, I have add some empty spaces infront of it to make it as 20 characters for all the materail numbers.
    Can you please provide me a solution.
    Regards
    Dinesh

    Hi,
    Use the below statement.
    shift lv_matnr RIGHT DELETING TRAILING space
    Thanks,
    Srini.

  • Dynamic "write" position

    Dear all,
    I want to know how to code a write statement with dynamic positioning like below:
    Data: V_POS type i.
    V_POS = 10.
    Write:/V_POS 'Testing'.
    I'm getting syntax error for the above. Please comment.

    The following is the information from SAP Help.
    You can position the output of a WRITE statement on the list by making a format specification before the field name as follows:
    Syntax
    WRITE AT [/][<pos>][(<len>)] <f>.
    where
    the slash '/' denotes a new line,
    <pos> is a number or variable up to three digits long denoting the position on the screen,
    <len> is a number or variable up to three digits long denoting the output length.
    If the format specification contains only direct values (that is, no variables), you can omit the keyword AT.
    WRITE 'First line.'.
    WRITE 'Still first line.'
    WRITE / 'Second line.'
    WRITE /13 'Third line.'
    For more info, see link:
    [http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e3035c111d1829f0000e829fbfe/content.htm]
    Regards,
    Lakshmi.

  • Dynamic box position in SAPscript

    Hello,
    I need to put a box in the Main window after I print all line details and other things on the invoice. How can I find the current line position (Y position), so I can pass it to the POSITION command.
    Thanks
    Igor

    Hi Rich, Sam and Rob,
    Thanks for you reply. This is exactly what I need.
    I need to print totals box after the details on the same page of the invoice. The number of detail lines (and pages) is variable. That's why I have to put it in the Main window.
    Now it is printed on separate page (next page), but they want it on the same page as details if it fits.
    I was thinking about counting lines, but since there is a logo, address, headers, details, etc and all are printed in different fonts, this will be very difficult exercise.
    Any more ideas?
    Thanks
    Igor

  • Dynamic image positioning in SAPScript

    Hi everyone!
    I have been searching the whole internet but unfortunately did not find a solution for my problem, maybe someone of you knows how to solve it:
    I want to print thumbnail pictures beside items of an inquiry. I know that there are variable windows, witch can be positioned left to the MAIN window using the x- and y-coordinates. But how can I find out where the item starts and ends to find the right place? Something like a &SAPSCRIPT-CURRENT_LINE& variable would help me a lot to calculate the correct postion relative to the item.
    The items have 3 to n lines, so just multiplying the item number with a fix number of lines wont work. In fact I can not even say for sure if there are one, two, three or more pictures on one side because it depends on the number of lines of the items.
    Does anyone have a solution?
    Best regards
    Bernd

    This is the way I do it...And it works for me -;)
    SIZE WIDTH '0.7' CM HEIGHT '0.4' CM
    BOX FRAME 1 TW XPOS '0.0' CM YPOS &G_LINE1& CM
    Greetings,
    Blag.

  • Dynamic switch positions of two VBox  inside a HBox

    I have a design issure, which is something like:
    <mx:HBox>
          <mx:VBox id="vb1">
             //contains Image and Text
          </mx:VBox>
          <mx:VBox id="vb2">
             //contains Text
          </mx:VBox>
    </mx:HBox>
    I like to switch the positions of the two VBox with just one click on a button. I think it can also be done by swarping the
    contents of the two VBox so it looks switch of the two VBox. Maybe drag and Drop on the VBoxes? Any suggestions? Thx.

    Use swapChildren and swapChildrenAt functions.
    like
    hbox1.swapChildren(child1,child2)
    hbox1.swapChildrenAt(index1,index2)
    Tanu

  • Dynamic images - positions

    Hi,
    I have the following problem:
    I need to place images dynamically on the layout. The Image URLs I receive in an internal table with the x and y coordinates. ( I don't know how many of them will be in the table )
    So the questions
    - Is it possible to create Image objects runtime?
    - Is it possible to set the x y coordinates of an image object?
    If so, how?
    Thanks,
    Tamas

    Problem solved a different way.
    ( It is possible to to do that, but the rotation and transparent background images have restrictions. So it is better to use e.g. webservices to put the picture together and then use the complete image to put on the form. )

  • Need Dynamic boxes position to move with scrollable text postion

    I am having a problem that I can't figure out.  The textbox is scrollable and I need the boxes that are created to move according to the position of the word it is supposed to be hovering over.  I would think I could create an ENTER_FRAME listener for each siteButton and change the y position with the getCharBoundaries() of the word but I keep getting errors.  Here is the codee below:
    webSite = infoBox.taNotes.text.match(regex);
        if (webSite.length > 0){
            for (var i in webSite) {
                var index1 = infoBox.taNotes.text.search(webSite[i]);
                var index2 = index1 + webSite[i].length - 1;
                var x1 = infoBox.taNotes.getCharBoundaries(index1).x;
                var x2 = infoBox.taNotes.getCharBoundaries(index2).x;
                var y1 = infoBox.taNotes.getCharBoundaries(index1).y;
                var h1 = infoBox.taNotes.getCharBoundaries(index1).height;
                var siteButton:linkButton = new linkButton();
                infoBox.buttons.addChild(siteButton);
                siteButton.addEventListener(Event.ENTER_FRAME, siteButtonMove);
                siteButton.x = infoBox.taNotes.x + x1;
                siteButton.y = infoBox.taNotes.y + y1;
                siteButton.width = x2 - x1 + 9;
                siteButton.height = h1;
                siteButton.blendMode = "multiply";
                siteButton.name = "siteButton"+[i];
                siteButton.siteLink = "http://" + webSite[i];
                siteButton.addEventListener(MouseEvent.CLICK, gotoNotesWebsite);
    function siteButtonMove(event:Event):void {
        if (webSite.length > 0){
            for (var i in webSite) {
                var index1 = infoBox.taNotes.text.search(webSite[i]);
                var y1 = infoBox.taNotes.getCharBoundaries(index1).y;
                trace(y1);
                trace(event.currentTarget.name);

    Dear havoc:
    You leave out some details so it's not exactly clear what you want. (InDesign does have modal dialog boxes, though I don't know why you would want more of them -- generally a user interface designer tries hard to reduce the number of modal dialog boxes...)
    What does it mean for text to "start on the previous line where the previous text ended"? What does it mean for "text to end"?
    Are you dealing with multiple text frames?
    How is your data getting from your database to InDesign?
    If you are using data merge, you can just put 3 fields on the same line.
    You can also do something similar with XML, though I would warn you away from that.
    But probably I would just instruct the database to combine the 3 fields together on export.
    So, please give us a concrete example of the trouble you're having. A screenshot would be excellent, too.
    I don't think thre is any reason you would nee to upgrade from CS4 to CS5 (or CS5.5) for this.

  • Dynamically component position

    hello all,
    In a screen is a component(dropdown list) which must be positioned always at the center of the screen. How to set its position accorded to the screen size?
    thank you a lot
    Bogdan

    i am not sure but you can drag and drop any column in screen. also you have column number feature in attribute

  • Dynamically Reference Position within Absolute Path in XSL

    All---
    I have a file that I am parsing into many records. However, much of the information is duplicated and I do not want to considerate for my XSL. For this reason, I need to add logic to filter out those records that have the same account number as the previous record. It would seem that the best way to do this would be an "if" statement that compares the account number from the record in question to the account number in the previous record. This is what I have come up with:
    <xsl:for-each select="/imp1:container/imp1:Record">
    <xsl:if test='(position() = "1") or (imp1:Patient/imp1:AccountNumber != /imp1:container/imp1:Record[(position() - 1.0)]/imp1:Patient/imp1:AccountNumber)'>
    As you may have guessed, this does not work. Any thoughts?
    Thanks, Eric

    I tried my solution with Saxon 8.8 and Oracle XDK 10.2.0.2
    I created a source XML document of:
    <container xmlns="urn:foo">
      <Record>
        <Patient>
           <AccountNumber>101</AccountNumber>
           <Something>Y</Something>
        </Patient>
      </Record>
      <Record>
        <Patient>
           <AccountNumber>101</AccountNumber>
           <Something>Y</Something>
        </Patient>
      </Record>
      <Record>
        <Patient>
           <AccountNumber>102</AccountNumber>
           <Something>Y</Something>
        </Patient>
      </Record>
    </container>and an XSLT stylesheet of:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:imp1="urn:foo" version="1.0">
      <xsl:output method="text"/>
      <xsl:template match="/">
      <xsl:for-each select="/imp1:container/imp1:Record">
        <xsl:variable name="prevRec" select="preceding-sibling::imp1:Record"/>
        <xsl:variable name="curAcctNum" select="imp1:Patient/imp1:AccountNumber"/>
        <xsl:variable name="prevAcctNum" select="$prevRec/imp1:Patient/imp1:AccountNumber"/>
        <xsl:if test='not($prevRec) or $curAcctNum != $prevAcctNum'>
           <!-- etc. -->
           <xsl:value-of select="imp1:Patient/imp1:AccountNumber"/>
           <xsl:text>&#xa;</xsl:text>
        </xsl:if>
      </xsl:for-each>
      </xsl:template>
    </xsl:stylesheet>Which produces an output on the command line of:
    101
    102So it seems to be correctly ignoring the duplicate entries. Is something about my test source data not mimicking faithfully enough your situation?

Maybe you are looking for