<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting current row or cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327564#M511696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u double click a row we can able to capture the column value field name every thing.#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                  RS_SELFIELD TYPE SLIS_SELFIELD.

  CHECK RS_SELFIELD-FIELDNAME = 'VBELN_O' OR
        RS_SELFIELD-FIELDNAME = 'VBELN'.
  CASE R_UCOMM.
    WHEN '&amp;amp;IC1'.   "doubleclick
      SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
*      IF RS_SELFIELD-FIELDNAME = 'VBELN_O'.
      IF RS_SELFIELD-FIELDNAME = 'VBELN_O'.
        IF  NOT  RS_SELFIELD-VALUE IS INITIAL.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
        ELSE.
          MESSAGE E999(Z48MM) WITH TEXT-T02 SPACE SPACE SPACE.
        ENDIF.
      ELSEIF RS_SELFIELD-FIELDNAME = 'VBELN'.
        PERFORM CALL_TRANSACTION_VA23 USING RS_SELFIELD-VALUE.
*        CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.
      ENDIF.

  ENDCASE.

ENDFORM.                    " USER_COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2007 08:28:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-11T08:28:15Z</dc:date>
    <item>
      <title>Getting current row or cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327561#M511693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using FM 'REUSE_ALV_GRID_DISPLAY' in my program. However, I'm having problem getting the current row or the cursor position in my ALV. If possible, I do not wish to use OO method in doing this. Is there any other way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 08:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327561#M511693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T08:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting current row or cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327562#M511694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever you click on any row of a alv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;grid or list display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selfield structure will be flled with the row contents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM&lt;/P&gt;&lt;P&gt;                        SELFIELD TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;if SELFIELD-TABNAME = internal table name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out the structure SELFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 08:24:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327562#M511694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting current row or cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327563#M511695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  i assume u mean to capture the current line or the line index that is selected in the grid display..if so, then do something like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: W_BOXNAM TYPE SLIS_FIELDNAME VALUE  'BOX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare a char. field BOX of length 1 in the itab that you are displaying in grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in layout, LAYOUT-BOX_FIELDNAME       =  'BOX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in itab, the value of field  BOX will be set to X when it's selected...can get the row no with sy-tabix inside the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab where box = 'X'.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful, reward&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 08:26:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327563#M511695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T08:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting current row or cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327564#M511696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u double click a row we can able to capture the column value field name every thing.#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                  RS_SELFIELD TYPE SLIS_SELFIELD.

  CHECK RS_SELFIELD-FIELDNAME = 'VBELN_O' OR
        RS_SELFIELD-FIELDNAME = 'VBELN'.
  CASE R_UCOMM.
    WHEN '&amp;amp;IC1'.   "doubleclick
      SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
*      IF RS_SELFIELD-FIELDNAME = 'VBELN_O'.
      IF RS_SELFIELD-FIELDNAME = 'VBELN_O'.
        IF  NOT  RS_SELFIELD-VALUE IS INITIAL.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
        ELSE.
          MESSAGE E999(Z48MM) WITH TEXT-T02 SPACE SPACE SPACE.
        ENDIF.
      ELSEIF RS_SELFIELD-FIELDNAME = 'VBELN'.
        PERFORM CALL_TRANSACTION_VA23 USING RS_SELFIELD-VALUE.
*        CALL TRANSACTION 'VA23' AND SKIP FIRST SCREEN.
      ENDIF.

  ENDCASE.

ENDFORM.                    " USER_COMMAND
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2007 08:28:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-current-row-or-cursor/m-p/2327564#M511696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-11T08:28:15Z</dc:date>
    </item>
  </channel>
</rss>

