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.

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

  • 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.

  • Dynamically write data to a column named in a table

    I'd like to write a query that will look up a code, aggregate some data based on the results of that lookup, and store the result in a column named in the lookup table. This isn't real clear; I need an example.
    pseudo code:
    lookup_table(target_column, lookup_code)
    values('target_col_1', 'A')
    values('target_col_2', 'B')
    select target_column as target ,
    lookup_code as code
    from lookup_table
    for each row {
    update results_table r
    set target =(
    select sum(somecol),
    pk_id
    from source_table src
    where code_col = code
    where r.pk_id = src.pk_id
    Does this make any sense?

    End-User wrote:
    I'd like to write a query that will look up a code, aggregate some data based on the results of that lookup, and store the result in a column named in the lookup table.Storing code or parts of code in database tables is a really bad idea.
    {message:id=10590811}
    You will need to construct the SQL dynamically, which is difficult, error prone and resource intensive if it runs.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/dynamic.htm#LNPLS011

  • 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.

  • 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 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 write statements

    HI Experts,
    Can anybody tell  me following answers.
    I have
    select-options: p_date like Ztab1-date. (we can choose here till 15dates)
                                          low =01/07/07 to high-15/07/07
    output screen.
    <b>items   date1 date2 date3 date4 date5  date6 date7 date8 date9 ..date15 TotalQty</b>
    <b>cat1</b>     1000   500  -
        700                                                  700      2900
    <b>cate2</b>    so on
    <b>cate3</b>
    In write statement: i want my program to decide total qty column should write just select-options range. like if i given in select options 17/07/07 to 18/07/07. my total column should come after next to 2columns, when i given 7 days its shud just next to 7th column,when i given 01st jul 07 to 15th july 07, total come just next to 15th column.
    How to do that? Pls sugest.
    Thanks in advance.

    You can use field-symbols:
    field-symbols: <fvalue>.
    Loop at itab.
    New-line.
        DO .
          ASSIGN COMPONENT sy-index OF STRUCTURE itab TO <fvalue> .
          IF sy-subrc NE 0 .
            EXIT .
          ENDIF .
          write <fvalue>.
        ENDDO.
    Endloop.
    You will have to add the headings first and the row labels if needed.
    Please reward points if helpful.
    Minami

  • 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. )

  • Dynamic Write Behind Delay?

    Good Afternoon,
    I am curious if it is possible to set a write behind delay programatically through some interface like a servlet.
    We are running into a scenario where we have two clusters in contention whenever we roll in a new version of our site. As our data structures can change from release to release we increment our cluster address to ensure a fresh instance is started after each roll in. We currently are configured to a write behind delay of 60 seconds.
    The problem arises when traffic is live on the previous build and we switch over to the newer release. Traffic is then live on the new cluster and users making changes to the data it retrieved which would not include the data still cued for persistence. In this situation the two are in contention and changes made to the previous cluster are persisted after a minute which would put the DB and new cluster cache out of sync. The newer cache would persist after it's own write behind and blow these changes away.
    I was thinking if there was a away to set and reset the write behind delay on the fly it could be set to zero for the duration of the roll in process to ensure no data loss. We would like to set it back to 1 minute afterward thoguh to continue to utilize the performance benefits of a write behind delay.
    This seems like a complicated scenario but one i assume must have been encountered by others?

    Hi,
    You cannot change backing map type on the fly (i.e. from WRITE-BEHIND to WRITE-THROUGH), but you can change write-delay (min is 1 sec) using JMX<a> or InvocationService (an example is attached).
    Regards,
    Dimitri<br><br> <b> Attachment: </b><br>coherence-cache-config.xml <br> (*To use this attachment you will need to rename 472.bin to coherence-cache-config.xml after the download is complete.)<br><br> <b> Attachment: </b><br>Main.java <br> (*To use this attachment you will need to rename 473.bin to Main.java after the download is complete.)

  • 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

Maybe you are looking for

  • All the attachments both in SRM and R/3 must be saved in IXOS database

    Dear all, I am having the following requirements: We are creating Shopping Cart in SRM with attachments and these attachments are saving in the IXOS database. All these (same attachments) are relpicating to R/3 whenever system generates PR or PO auto

  • Why are my iTunes movies subtitled in Spanish?

    I'm not sure if it's an iTunes issue or iPad (the device upon which I watch my movies), but when I watch a movie and there's the occasional subtitle, it's always in Spanish.  I can't figure out how to change this.  Any ideas? Thanks

  • Activation Code Requested

    Win 7 Ultimate was purchased from a reputable supplier and I have no reason to believe it is not genuine.  After visiting a clients site today and connecting to his network I am receiving a message "This copy of Windows is not genuine".  I upgraded f

  • 2 clients of 1 apo system connecting to 2 clients in same ECC system

    Hi We have a requirement at our end as below- 1)We have 2 clients in our APO Developement system and they are using BW functionality of APO 2)These 2 clients need to talk to 2 different client in our ECC System for ex:- APD has 2 clients(100 & 200) a

  • Settings won't display when opened

    Hi all When trying to pen 'settings' app. It opens but only displays a blank white screen. No information is seen. Thanks