Get the index of the current line in use

Dear All,
Well how can i get the index of the current line in use?
this the code I am using :
Dim i As Integer
Set oBatchForm = SBO_Application.Forms.GetForm(Form_Id, 1)
Set oMainMatrix = oBatchForm.Items.Item(Matrix_Id).Specific
For i = 1 To oMainMatrix.VisualRowCount
    If oMainMatrix.IsRowSelected(i) = True Then
       GB_SelRow = i
        Exit For
    End If
Next
Exit Sub
This code is not working when there is a line in the document type texte.
please advice.

Hi Mary,
this is code in C#.NET which is working fine, try to do same in your code:
for(int irow=1; irow<=oMatrix.RowCount; irow++)
     if(oMatrix.IsRowSelected(irow))
     SelectRow = irow;
                break;
Hope it helps.

Similar Messages

  • Get the current line no.(similar to sy-linno in report) in  Sapscript form

    Hi everyone,
    In ABAP reporting, you can use sy-linno to determine the current line no.
    But if in sapscript form,
    does any system field to get the currect line no. or y-origin. ?
    Just say the program is now runing and have written several lines in a window of the form.
    AS         This is the first line
    AS         This is the second line
    AS         This is the third line
    how to get the current line = 3 or  yorigin '+3'  LN?
    Thanks for reply in advance.

    Hi,
    you can also chk the sy-linno directly in your script.
    Regards
    Subramanian

  • Can't get the current bitrate info use SMPTE-TT Plugin

    Using OSMF2.0 to stream a smil title.
    Add the MediaPlayerCapabilityChangeEvent.IS_DYNAMIC_STREAM_CHANGE event listener, after the event dispatch then add the DynamicStreamEvent.SWITCHING_CHANGE event listener.
    The bitrate info can be report, normal. But after I add the SMPTE-TT plugin and load it like this:
    var pluginResource:MediaResourceBase = new PluginInfoResource(new SMPTETTPluginInfo);mediaFactory.loadPlugin(pluginResource);
    The title can be stream correct and the quality of the video can be set by the bandwidth, but only the DynamicStreamEvent.SWITCHING_CHANGE event can not be dispatch, so I can't get the current bitrate info.
    I debug it in the OSMF source code and find the issue in the org.osmf.elements.compositeClasses.ParallelDynamicStreamTrait class line 323
    FYI:
    onSwitchingChange function that the numChildrenSwitching property always 0, so it can not call the setSwitching function and can not dispatch DynamicStreamEvent.SWITCHING_CHANGE event.
    So, I add some changes from line 333 to line 336 and it has be fix:
    Environment:Flex SDK 4.6 + flash player 11.8.
    I don't know it is a bug in the OSMF framework and I want to get more info about it.
    Thanks.

    can you turn off the message pane (F8) between restarts? I am guessing it will turn on again as well.

  • Get the current time

    Hi I was wondering how I can get the current time and use is to compare it e.g. in a IF sentence.

    Hi I was wondering how I can get the current time and
    use is to compare it e.g. in a IF sentence.This might help. I'm not exactly sure what you are asking for but I use this type of code to compare the current time to my start time in my program, specifically for my loggerformatter. The output shows the seconds and the remainder in milliseconds. The efficiency is probably suspect, but it might give you some ideas... Joel
    import java.util.Date;
    import java.text.NumberFormat;
    import java.util.GregorianCalendar;
    import java.text.SimpleDateFormat;
    class TimeDiff {
        private static NumberFormat nf08 = NumberFormat.getInstance();
        private static GregorianCalendar calStart = new GregorianCalendar();
        private static GregorianCalendar calEnd  = new GregorianCalendar();
         *  Constructor
        public TimeDiff() {
            calStart.setTimeInMillis(System.currentTimeMillis());
         * Calculate the elapsed time in seconds
        private static long calcSsElapsed(GregorianCalendar calBegin, GregorianCalendar calEnd) {
            return((calEnd.getTime().getTime() - calBegin.getTime().getTime()) / 1000);
         * Calculate the elasped time milliseconds
        private static long calcMsElapsed(GregorianCalendar calBegin, GregorianCalendar calEnd) {
            return((calEnd.getTime().getTime() - calBegin.getTime().getTime()) % 1000);
        public static void main(String[] args) {
            try {
                TimeDiff td = new TimeDiff();
                Thread.sleep(5100);
                calEnd.setTimeInMillis(System.currentTimeMillis());
                System.out.println("Seconds="+calcSsElapsed(calStart, calEnd));
                System.out.println("Milliseconds="+calcMsElapsed(calStart, calEnd));
            catch (Exception e) {
                System.out.println("something went terribly, terribly wrong");
    }

  • How to get the current slide Index or Id?

    I can get the selected slide of presentation use blow method.
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, function (asyncResult) {
    if (asyncResult.status == Office.AsyncResultStatus.Failed) {
    write('Action failed. Error: ' + asyncResult.error.message);
    else {
    write('Selected slides: ' + JSON.stringify(asyncResult.value.slides));
    But, How can I get the executor slide?

    ​Hi,
    >> How to get the current slide Index or Id?
    In my option, when you select a slide, it change to current slide. So, you could use the getSelectedDataAsync method to get the current slide, and then get the index or id by using the Slice object. You could refer the link below for Slice Object.
    # Slice.index property (JavaScript API for Office)https://msdn.microsoft.com/EN-US/library/office/jj715285.aspx?f=255&MSPPError=-2147217396
    Some key code as below:
    <script>
    function getText() {
    Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange,
    { valueFormat: "unformatted", filterType: "all" },
    function (asyncResult) {
    var error = asyncResult.error;
    if (asyncResult.status === Office.AsyncResultStatus.Failed) {
    write(error.name + ": " + error.message);
    else {
    // Get selected data.
    var dataValue = asyncResult.value;
    write('Selected data is ' + dataValue.slides[0].index);
    // Function that writes to a div with id='message' on the page.
    function write(message) {
    document.getElementById('message').innerText += message;
    </script>
    >> How can I get the executor slide?
    What do you mean by this? Is this a new issue which is different from the above issue? If so, I will recommend you post a new thread for this issue and share us more information about this.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get the current schema name

    Hi,
    Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
    Thanks
    Jogesh

    ok folks, I found the answer at Tom's as usual.
    http://asktom.oracle.com/tkyte/who_called_me/index.html
    I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
    cheers,
    paul
    create or replace
    FUNCTION SELF_EXAM (
       p_call_stack VARCHAR2,
       p_type VARCHAR2 DEFAULT 'SCHEMA'
    ) RETURN VARCHAR2
    AS
       str_stack   VARCHAR2(4000);
       int_n       PLS_INTEGER;
       str_line    VARCHAR2(255);
       found_stack BOOLEAN DEFAULT FALSE;
       int_cnt     PLS_INTEGER := 0;
       str_caller  VARCHAR2(30);
       str_name    VARCHAR2(30);
       str_owner   VARCHAR2(30);
       str_type    VARCHAR2(30);
    BEGIN
       str_stack := p_call_stack;
       -- Loop through each line of the call stack
       LOOP
         int_n := INSTR( str_stack, chr(10) );
         EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
         -- get the line
         str_line := SUBSTR( str_stack, 1, int_n - 1 );
         -- remove the line from the stack str
         str_stack := substr( str_stack, int_n + 1 );
         IF NOT found_stack
         THEN
            IF str_line like '%handle%number%name%'
            THEN
               found_stack := TRUE;
            END IF;
         ELSE
            int_cnt := int_cnt + 1;
             -- cnt = 1 is ME
             -- cnt = 2 is MY Caller
             -- cnt = 3 is Their Caller
             IF int_cnt = 1
             THEN
                str_line := SUBSTR( str_line, 22 );
                dbms_output.put_line('->' || str_line);
                IF str_line LIKE 'pr%'
                THEN
                   int_n := LENGTH('procedure ');
                ELSIF str_line LIKE 'fun%'
                THEN
                   int_n := LENGTH('function ');
                ELSIF str_line LIKE 'package body%'
                THEN
                   int_n := LENGTH('package body ');
                ELSIF str_line LIKE 'pack%'
                THEN
                   int_n := LENGTH('package ');
                ELSIF str_line LIKE 'anonymous%'
                THEN
                   int_n := LENGTH('anonymous block ');
                ELSE
                   int_n := null;
                END IF;
                IF int_n IS NOT NULL
                THEN
                   str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
                 ELSE
                   str_type := 'TRIGGER';
                 END IF;
                 str_line  := SUBSTR( str_line, NVL(int_n,1) );
                 int_n     := INSTR( str_line, '.' );
                 str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
                 str_name  := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
              END IF;
           END IF;
       END LOOP;
       IF UPPER(p_type) = 'NAME'
       THEN
          RETURN str_name;
       ELSIF UPPER(p_type) = 'SCHEMA.NAME'
       OR    UPPER(p_type) = 'OWNER.NAME'
       THEN
          RETURN str_owner || '.' || str_name;
       ELSIF UPPER(p_type) = 'TYPE'
       THEN
          RETURN str_type;
       ELSE
          RETURN str_owner;
       END IF;
    END SELF_EXAM;

  • EXIT_SAPLEBNF_005 (ZXM06U51) - getting the current purchase order details

    I have a requirement to determine release agent in part based on who owns the budget. That's easy. The hard part is getting the current data (at least so far)...
    I have tried using the MEPO_DOC_* function moduless. They didn't even give me the amount (at least not in all situations).
    I have now tried using the class based interface (IF_PURCHASE_ORDER_MM) - which seems OK at first but has an unwanted side effect: it interferes heavily with the purchase order transaction.
    Currently I am struggling to get rid of the side effects, but there must be an easier way than the path I have started on. I've been looking for some sort of manager class which could be used to retrieve the interface reference without having to initialize it myself via CL_PO_HEADER_HANDLE_MM but haven't found one yet.
    Part of my problem is that the user exit is called twice, so if I buffer the handle transaction ME22N doesn't initialize correctly (initially appears in display mode becuase the first call for some reason is stating that it's transaction ME23N in change mode). If I don't buffer the handle, the switch to change mode doesn't work properly in ME23N. Thank you SAP!
    I've been struggling with this for more than a day now, so it's time to ask the experts to see if anyone can help me get out of this [Catch 22|http://en.wikipedia.org/wiki/Catch-22_%28logic%29|Catch 22 explanation in Wikipedia]-like situation
    FORM po_get_interface_handle
         USING value(pe_purchase_order) TYPE ekko-ebeln
         CHANGING po_purchase_order TYPE REF TO if_purchase_order_mm.
    * 2011-04-19 EX_KKILHAVN (Kjetil Kilhavn, Blue Consulting)
    * Buffer handles to avoid problems with multiple initializations
      TYPES: BEGIN OF buffer_po_handle,
               ebeln     TYPE ekko-ebeln,
               po_handle TYPE REF TO cl_po_header_handle_mm,
             END OF buffer_po_handle.
      STATICS: lt_po_handles_buffer TYPE SORTED TABLE OF buffer_po_handle
                                      WITH UNIQUE KEY ebeln.
      DATA: ls_po_handle         LIKE LINE OF lt_po_handles_buffer[],
            le_transaction_type  TYPE t160-trtyp,
            le_activity_category TYPE char01,
            le_transaction_code  TYPE syst-tcode,
            ls_document          TYPE mepo_document,
            le_result            TYPE mmpur_bool.
      READ TABLE lt_po_handles_buffer[]
           WITH TABLE KEY ebeln = pe_purchase_order
           INTO ls_po_handle.
      IF sy-subrc <> 0.
        ls_po_handle-ebeln = pe_purchase_order.
        CREATE OBJECT ls_po_handle-po_handle
          EXPORTING
            im_po_number = pe_purchase_order
          EXCEPTIONS
            failure      = 1.
        IF sy-subrc               =  0           AND
           ls_po_handle-po_handle IS NOT INITIAL.
          "Check transaction type must handle code being invoked from change transactions
          "and from other transactions (e.g. Business Workflow agent determination)
          CALL METHOD ls_po_handle-po_handle->get_transaction_state
            IMPORTING
              ex_trtyp = le_transaction_type
              ex_aktyp = le_activity_category
              ex_tcode = le_transaction_code.
          IF le_transaction_type IS INITIAL.
            le_transaction_type = 'A'.
          ENDIF.
          IF le_transaction_code IS INITIAL.
            le_transaction_code = 'ME23N'.
          ENDIF.
          ls_po_handle-po_handle->set_state( im_state = cl_po_header_handle_mm=>c_available ).
          MOVE: mmpur_po_process    TO ls_document-process,
               le_transaction_type  TO ls_document-trtyp,
               pe_purchase_order    TO ls_document-doc_key(10),
               mmpur_initiator_call TO ls_document-initiator-initiator.
          ls_po_handle-po_handle->po_initialize( im_document = ls_document ).
          CALL METHOD ls_po_handle-po_handle->po_read
            EXPORTING
              im_tcode     = le_transaction_code
              im_trtyp     = ls_document-trtyp
              im_aktyp     = le_activity_category "ls_document-trtyp
              im_po_number = pe_purchase_order
              im_document  = ls_document
            IMPORTING
              ex_result    = le_result.
          IF le_result = mmpur_yes.
            READ TABLE lt_po_handles_buffer[]
                 WITH TABLE KEY ebeln = ls_po_handle-ebeln
                 TRANSPORTING NO FIELDS.
            INSERT ls_po_handle INTO lt_po_handles_buffer[] INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDIF.
      TRY.
          po_purchase_order = ls_po_handle-po_handle.
        CATCH cx_sy_move_cast_error.
      ENDTRY.
    ENDFORM.                    "po_get_interface_handle

    Hi ravi,
    can you please tell me the Tcode  for creation of purchaze order in SRM.
    thank you
    sunny.

  • How to find dynamically the current line number in the source file

    Is there a mechanism like __LINE__ and __FILE__ macro in C to get dynamically
    the current line number and file name of a source file?

    Don't know - but others have asked too. Have you searched the forum? For example:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=210496

  • How to get the current executing file/itself absolute directory?

    hellooo,
              gentlemen/lady, how to get the current executing file/itself absolute directory?
              thanks
              

              Hello,
              you can get the real path information of the JSP through the servlet context:
              http://java.sun.com/products/servlet/2.2/javadoc/index.html
              javax.servlet
              Interface ServletContext
              Method getRealPath
              Christian Plenagl
              Developer Relations Engineer
              BEA Support
              [email protected] (alex mok) wrote:
              >hellooo,
              >
              >gentlemen/lady, how to get the current executing file/itself absolute
              >directory?
              >
              >thanks
              

  • How to get the current tree element (node/childnode/childnode/...) ?

    Hello!
    I'm trying to create a kind of a navigation tree for my application.
    It should represent some elements of an XML structure and some other nodes for other options.
    The binding with the context is not a problem, I can create the tree up to all the levels I want to.
    The problem now is, that I don't know, how to get the "current tree element", when there is any action.
    For example:
    public void onActionSelect(...) {
    String test = wdContext.currentTreeNodeElement().getText();
    wdThis.wdGetContext().currentContextElement().setSelectedElement(test);
    With this method I can get the text of the "first level nodes". If I want to get the "second level node", I can do
    String test = wdContext.currentTreeNodeElement().currentChildElement.getText();
    ..and for the next levels so on.
    Isn't there any general method to get the information of the selected element without knowing before, whether it is a nodeElement or a nodeElement.currentChildElement or a nodeElement.currentChildElement.currentChildElement, ...?
    Greetings,
    Ramó

    Hi,
    if you following that pdf ,
    i think your not implemented the below code in DomodifyView method
    if (firstTime) {
          IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "selectedElement".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onAction event. Parameter "selectedElement" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onAction. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnAction().addSourceMapping("path", "selectedElement");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "element".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onLoadChildren event. Parameter "element" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onLoadChildren. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    please cross check once.
    Thanks,
    Ramesh

  • How to get the current function name in java

    How to get the current function name in java.
    In c it is done as
    printf("%s",__func__);
    Thanx in advance.

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • Can the current line be highlighted using a background color or have the cursor flash?

    I use the split screen and left click in the Design pane to jump to where I want to be in the Code pane in Dreamweaver CS6. The problem is that it can be very hard to tell where the cursor is in the Code pane since the cursor doesn't flash.
    Is there a way to force Dreamweaver CS6 to change the background color of the currently selected line or at least have the cursor flash in both panes? There must be some way to make it easier to find the current line of code.
    Thanks.

    John Waller wrote:
    The cursor does not flash in Code View only when Code View is not in focus i.e. you're working in the Design View window in Split View.
    In those caases, I just highlight a word or two in Design View and the corresponding words are highlighted by DW in Code View (even when Code view is not in focus).
    Thanks. I've been doing that, but sometimes there is no text to highlight. I hoped Dreamweaver might have a hidden setting that I could enable. That's a lot of extra sliding of the hand/wrist for no good reason when it would be easy for the Dreamweaver programmers to change the background color of the current line or make the cursor flash or do something else to indicate where you are in the code besides making the user constantly make a smearing action with the mouse. All of those extra movements add up the wear and tear when you're trying to avoid getting a repetitive stress injury, especially if you already use mouse gestures in a browser.

  • How to get the current location text in JTextPane

    hi
    i want to get the current location text in JTextPane ...iam useing
    caretPos = jtpMain.getCaretPosition();
    iam geting the current Locations at the same time i want to read the entery current line
    i used like this
    StartPos=jtpMain.getText();
    but iam geting entry data in JTextPane ... how can get current Locatin data ...
    pls help me

    If I understood your request, what you would like to do is to be able to retrieve Start and End Positions of a given line (a line and NOT the whole content of the JTextPane).
    JTextPane is a graphical component that is bound to a logical document. Documents are structured in elements. What defines an element is up to you to decide if you extend your own document but elements are by default paragraphs (runs of text ended by a carriage return '\n' character). So, I think that what you want to do is to retrieve the Start and End positions of the
    paragraph over which the caret is currently positionned. Then I think you have got to do the following :
    int intStartPos;
    int intEndPos;
    int intCaretPos;
    javax.swing.text.StyledDocument docStyledDoc;
    javax.wing.text.Element eleParagraph;
    intCaretPos = jtpMain.getCaretPosition( );
    //Get a reference to the default styled document bound to the JTextPane component
    docStyledDoc = jtpMain.getStyledDocument( );
    //Get the paragraph element from the document over which the caret is positionned
    eleParagraph = docStyledDoc.getParagraphElement(intCaretPos);
    //Get paragraph's offsets
    intStartPos = eleParagraph.getStartOffset( );
    intEndPos = eleParagraph.getEndOffset( );
    hi
    i want to get the current location text in JTextPane
    ...iam useing
    caretPos = jtpMain.getCaretPosition();
    iam geting the current Locations at the same time i
    want to read the entery current line
    i used like this
    StartPos=jtpMain.getText();
    but iam geting entry data in JTextPane ... how can
    get current Locatin data ...
    pls help me

  • Get the current date

    How does one get the current date?

    I would not use the date object (mostly deprecated), instead use the Calendar object.
    See...
    http://java.sun.com/j2se/1.3/docs/api/index.html

  • Applescript to get the current insertion point of the cursor

    How do I use Applescript to get the current insertion point of the cursor in a Apple pages.app document?

    Oops, missed that one - you are correct, the line should be:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set {TheStart, TheEnd} to character range of the selection</pre>
    I have a wrapper script that I use to insert stuff from my handler/code library into a Script Editor document, and was adapting snippets from that for my examples - I guess that one got away.
    As for the dictionary, some applications just have poorly written or outdated documentation. Some of the items have multiple entries (eg, there may be a selection object for the application and also for the document), and some inherit properties from other items. Some are used as nouns, others as verbs (or both). Sometimes it is easier to visualize the item by keeping track of it's reference - the 'some property of document 1 of the current application' thing. You can use the Script Editor's Event Log to see the results of various properties and commands - for example, the above script will result in the following entry (your numbers will vary depending on the selected text):
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">tell current application
    get character range of selection
    {50, 50}
    end tell
    </pre>
    You can also use the 'log' statement (eg, 'log MyVariable') to add your own entries into the log instead of using dialog boxes.

Maybe you are looking for

  • VA01 - Need to display an error popup message on line item check

    Hi All, I'm working on a user exit (report MV45AFZZ, form routine USEREXIT_FIELD_MODIFICATION). I already have all the logic necessary - the one final piece that is left is to display an error pop-up message if the line item quantity is less than a c

  • I cannot move, rename, or delete a Microsoft Word Document on my Finder

    I had no clue which category to put this in as I cannot find another with a similar problem. Basically I have a new Macbook Pro and a licenced version of Microsoft Office for Mac 08. I had a problem with a file the other day which would not save, and

  • Equivalent of 'null' for integers?

    I was wondering if the integer data type has a value that is the equivalent to 'null'?

  • Web DynPro Internationalization

    Hi everybody. I'm now learning how to internationalizate my Web DynPro applications, but as I can see in the documents, after configure my xlf files I can only change language by configuring it in my Web Browser. I suppose it has to be any api for ch

  • Est ce qu'il y a moyen  de recuperer une ancienne sauvegarde icloud ?

    j'avais installé l'applcation "Kycalc" et c'est un applkcation qui comporte des fichiers et dossiers caché donc je voudrais les recuperer mais icloud a remplacer cette sauvearde de 2.7 GB de photos que j'avais dessus par une autre qui ne comporte rie