<?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: Get Cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254743#M487999</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;check the sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: CURSORFIELD(20), &lt;/P&gt;&lt;P&gt;      GLOB_FIELD(20)    VALUE 'global field', &lt;/P&gt;&lt;P&gt;      REF_PARAMETER(30) VALUE 'parameter by reference', &lt;/P&gt;&lt;P&gt;      VAL_PARAMETER(30) VALUE 'parameter by value', &lt;/P&gt;&lt;P&gt;      FIELD_SYMBOL(20)  VALUE 'field symbol'. &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;F&amp;gt; TYPE ANY. &lt;/P&gt;&lt;P&gt;PERFORM WRITE_LIST USING REF_PARAMETER VAL_PARAMETER. &lt;/P&gt;&lt;P&gt;ASSIGN GLOB_FIELD TO &amp;lt;F&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION. &lt;/P&gt;&lt;P&gt;  GET CURSOR FIELD CURSORFIELD. &lt;/P&gt;&lt;P&gt;  WRITE: /   CURSORFIELD, SY-SUBRC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM WRITE_LIST USING RP VALUE(VP). &lt;/P&gt;&lt;P&gt;  DATA: LOK_FIELD(20)  VALUE 'local field'. &lt;/P&gt;&lt;P&gt;  ASSIGN FIELD_SYMBOL TO &amp;lt;F&amp;gt;. &lt;/P&gt;&lt;P&gt;  WRITE: /  GLOB_FIELD,  /  LOC_FIELD, &lt;/P&gt;&lt;P&gt;         /  RP,          /  VP, &lt;/P&gt;&lt;P&gt;         /  'literal',   /  FIELD_SYMBOL. &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u elaborate which wrong values u r getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2007 19:47:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-17T19:47:48Z</dc:date>
    <item>
      <title>Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254740#M487996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the basic list  I put this code and it's returning me wrong values in the First Detail List .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select kunnr
       name1
       land1
       from kna1 into table itab.

loop at itab.
  write:/10 itab-kunnr,
         35  itab-name1,
         70  itab-land1.
         get cursor field itab-kunnr.
  hide itab-kunnr.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254740#M487996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254741#M487997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you dont have to put &lt;/P&gt;&lt;P&gt; - get cursor field itab-kunnr.   in side the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this statement can be put after at-line selection..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254741#M487997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254742#M487998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, what is your code for the line selection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254742#M487998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254743#M487999</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;check the sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: CURSORFIELD(20), &lt;/P&gt;&lt;P&gt;      GLOB_FIELD(20)    VALUE 'global field', &lt;/P&gt;&lt;P&gt;      REF_PARAMETER(30) VALUE 'parameter by reference', &lt;/P&gt;&lt;P&gt;      VAL_PARAMETER(30) VALUE 'parameter by value', &lt;/P&gt;&lt;P&gt;      FIELD_SYMBOL(20)  VALUE 'field symbol'. &lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;F&amp;gt; TYPE ANY. &lt;/P&gt;&lt;P&gt;PERFORM WRITE_LIST USING REF_PARAMETER VAL_PARAMETER. &lt;/P&gt;&lt;P&gt;ASSIGN GLOB_FIELD TO &amp;lt;F&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION. &lt;/P&gt;&lt;P&gt;  GET CURSOR FIELD CURSORFIELD. &lt;/P&gt;&lt;P&gt;  WRITE: /   CURSORFIELD, SY-SUBRC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM WRITE_LIST USING RP VALUE(VP). &lt;/P&gt;&lt;P&gt;  DATA: LOK_FIELD(20)  VALUE 'local field'. &lt;/P&gt;&lt;P&gt;  ASSIGN FIELD_SYMBOL TO &amp;lt;F&amp;gt;. &lt;/P&gt;&lt;P&gt;  WRITE: /  GLOB_FIELD,  /  LOC_FIELD, &lt;/P&gt;&lt;P&gt;         /  RP,          /  VP, &lt;/P&gt;&lt;P&gt;         /  'literal',   /  FIELD_SYMBOL. &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u elaborate which wrong values u r getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254743#M487999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254744#M488000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  write:/10 itab-kunnr,&lt;/P&gt;&lt;P&gt;         35  itab-name1,&lt;/P&gt;&lt;P&gt;         70  itab-land1.&lt;/P&gt;&lt;P&gt;         get cursor field itab-kunnr.&lt;/P&gt;&lt;P&gt;  hide itab-kunnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;  GET CURSOR FIELD G_CURFLD.&lt;/P&gt;&lt;P&gt;  IF NOT G_CURFLD IS INITIAL.&lt;/P&gt;&lt;P&gt;case G_CURfld. &lt;/P&gt;&lt;P&gt;WHEN 'KUNNR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever you want to do further with this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254744#M488000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254745#M488001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select kunnr
       name1
       land1
       from kna1 into table itab.

loop at itab.
  write:/10 itab-kunnr,
         35  itab-name1,
         70  itab-land1.
  hide itab-kunnr.
endloop.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;          selecting and display data for detail list                 *
*&amp;amp;---------------------------------------------------------------------*

at line-selection.
   case sy-lsind.

    when '1'.

      select vbeln
             erdat
             netwr
             from vbak into table jtab where kunnr = itab-kunnr.
      if sy-subrc ne 0.
        message e000(zmessage).
      endif.

      loop at jtab.
        write:/10 jtab-vbeln,
               35 jtab-erdat,
               70 jtab-netwr.
        at last.
          sum.
          write:/ 'Sub total:', jtab-netwr color 3.
        endat.
        hide jtab-vbeln.
      endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now where should i put get cursor statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254745#M488001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254746#M488002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are trying to:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT ztest MESSAGE-ID 00.

DATA itab LIKE TABLE OF kna1 WITH HEADER LINE.
DATA u_kunnr LIKE kna1-kunnr.

SELECT *
       FROM kna1 UP TO 10 ROWS
       INTO CORRESPONDING FIELDS OF TABLE itab.
SORT itab BY kunnr.

LOOP AT itab.
  WRITE:/10 itab-kunnr,
         35  itab-name1,
         70  itab-land1.
  u_kunnr = itab-kunnr.
  HIDE u_kunnr.
  CLEAR u_kunnr.
ENDLOOP.

AT LINE-SELECTION.
  READ TABLE itab WITH KEY kunnr = u_kunnr BINARY SEARCH.
  WRITE: /001 itab-kunnr,
          035 itab-name1,
          070 itab-name2,
          105 itab-land1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 19:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254746#M488002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T19:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254747#M488003</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;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;GET CURSOR&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;Use the statements GET CURSOR FIELD and GET CURSOR LINE to pass the output&lt;/P&gt;&lt;P&gt;field or output line on which the cursor was positioned during the interactive event to the&lt;/P&gt;&lt;P&gt;ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following example program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT SAPMZTST NO STANDARD PAGE HEADING LINE-SIZE 40.&lt;/P&gt;&lt;P&gt;DATA: HOTSPOT(10) VALUE 'Click me!',&lt;/P&gt;&lt;P&gt;F(10), OFF TYPE I, LIN TYPE I, VAL(40), LEN TYPE I.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN HOTSPOT TO &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;WRITE 'Demonstration of GET CURSOR statement'.&lt;/P&gt;&lt;P&gt;SKIP TO LINE 4.&lt;/P&gt;&lt;P&gt;POSITION 20.&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;FS&amp;gt; HOTSPOT COLOR 5 INVERSE ON.&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;WINDOW STARTING AT 5 6 ENDING AT 45 20.&lt;/P&gt;&lt;P&gt;GET CURSOR FIELD F OFFSET OFF&lt;/P&gt;&lt;P&gt;LINE LIN VALUE VAL LENGTH LEN.&lt;/P&gt;&lt;P&gt;WRITE: 'Result of GET CURSOR FIELD: '.&lt;/P&gt;&lt;P&gt;ULINE AT /(28).&lt;/P&gt;&lt;P&gt;WRITE: / 'Field: ', F,&lt;/P&gt;&lt;P&gt;/ 'Offset:', OFF,&lt;/P&gt;&lt;P&gt;/ 'Line: ', LIN,&lt;/P&gt;&lt;P&gt;/ 'Value: ', (10) VAL,&lt;/P&gt;&lt;P&gt;/ 'Length:', LEN.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;GET CURSOR LINE LIN OFFSET OFF VALUE VAL LENGTH LEN.&lt;/P&gt;&lt;P&gt;WRITE: 'Result of GET CURSOR LINE: '.&lt;/P&gt;&lt;P&gt;ULINE AT /(27).&lt;/P&gt;&lt;P&gt;WRITE: / 'Offset:', OFF,&lt;/P&gt;&lt;P&gt;/ 'Value: ', VAL,&lt;/P&gt;&lt;P&gt;/ 'Length:', LEN.&lt;/P&gt;&lt;P&gt;In this program, the HOTSPOT field is assigned to the field symbol &amp;lt;FS&amp;gt; and&lt;/P&gt;&lt;P&gt;displayed as hotspot on the output screen. If the user positions the cursor on a list&lt;/P&gt;&lt;P&gt;line and selects it, a dialog box appears containing the results of the GET CURSOR&lt;/P&gt;&lt;P&gt;statements in the AT LINE-SELECTION event.&lt;/P&gt;&lt;P&gt;Note that after GET CURSOR FIELD, the name of the field assigned to the field&lt;/P&gt;&lt;P&gt;symbol &amp;lt;FS&amp;gt; is stored in F, and not the name of the field symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 20:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254747#M488003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T20:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254748#M488004</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;IN CASE STATEMENT.&lt;/P&gt;&lt;P&gt;when '1'.&lt;/P&gt;&lt;P&gt;get cursor field fnam value fval.&lt;/P&gt;&lt;P&gt;pass this fval to the select statement in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 20:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254748#M488004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T20:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254749#M488005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the basic list if i click any customer , orders details of that customer should be displayed in the details list.&lt;/P&gt;&lt;P&gt;I am able to perform this.&lt;/P&gt;&lt;P&gt;But it should only happen if i click on kunnr  (not on name,country)... &lt;/P&gt;&lt;P&gt;I need to Get cursor...&lt;/P&gt;&lt;P&gt;Having problem in achieving the result with that.&lt;/P&gt;&lt;P&gt;Help me in fixing this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 20:53:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254749#M488005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T20:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254750#M488006</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;Try this..Changes marked with in comment..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    when '1'.

*********Naren insert Begin:
     CHECK sy-cucol &amp;gt;= 2 AND sy-cucol &amp;lt;= 11.  " Insert this code..
*********Naren insert End. 
      select vbeln
             erdat
             netwr
             from vbak into table jtab where kunnr = itab-kunnr.
      if sy-subrc ne 0.
        message e000(zmessage).
      endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254750#M488006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254751#M488007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can we achieve using get cursor statement naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254751#M488007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254752#M488008</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;Yes..You can achieve with GET CURSOR also..&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;
    when '1'.
 
*********Naren insert Begin:
     DATA: v_field(60).                        " Insert this code.

     GET CURSOR FIELD v_field.        " Insert this code.

     CHECK v_field = 'ITAB-KUNNR'.    " Insert this code.
*********Naren insert End. 
      select vbeln
             erdat
             netwr
             from vbak into table jtab where kunnr = itab-kunnr.
      if sy-subrc ne 0.
        message e000(zmessage).
      endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254752#M488008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254753#M488009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Naren. I got the result.&lt;/P&gt;&lt;P&gt;Could you explain me the logic of the code we inserted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254753#M488009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254754#M488010</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;  Explaination above before each line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The above is the data declaration to get the field name..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     DATA: v_field(60).                        " Insert this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the field name using the get cursor statement.. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     GET CURSOR FIELD v_field.        " Insert this code.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check whether the field name got is customer "ITAB-KUNNR".&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     CHECK v_field = 'ITAB-KUNNR'.    " Insert this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254754#M488010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254755#M488011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more quick question &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I developed a interactive report. &lt;/P&gt;&lt;P&gt;For the basic list, 1st detail list I was able to trigger top-of-page.&lt;/P&gt;&lt;P&gt;for the second detail I could'nt  do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(top-of-page during line-selection was used for the 1st detail list)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254755#M488011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254756#M488012</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;  For second list also you can use TOP-OF-PAGE DURING LINE-SELECTION event..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WRITE: / 'Test'.

TOP-OF-PAGE.
  WRITE: / 'top-of-page'.

TOP-OF-PAGE DURING LINE-SELECTION.
  WRITE: / 'top-of-page during line selection'.

AT LINE-SELECTION.
  WRITE: / sy-lsind.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254756#M488012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254757#M488013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use top-of-page during line-selection I am getting both page heading in the 1st detail list itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254757#M488013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254758#M488014</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 checked my example..Only one page heading is coming..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your TOP-OF-PAGE and TOP-OF-PAGE DURING LINE SELECTION code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Please make sure to reward points for helpful answers..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254758#M488014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get Cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254759#M488015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                     data declaration                                *
*&amp;amp;---------------------------------------------------------------------*

tables: kna1,
        vbak,
        vbap.

data: begin of itab occurs 0,
      kunnr type kna1-kunnr,
      name1 type kna1-name1,
      land1 type kna1-land1,
      end of itab.

data: begin of jtab occurs 0,
      vbeln type vbak-vbeln,
      erdat type vbak-erdat,
      netwr type vbak-netwr,
      end of jtab.

data: begin of ktab occurs 0,
      posnr type vbap-posnr,
      arktx type vbap-arktx,
      werks type vbap-werks,
      end of ktab.

data: fname(20) type c.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;            selecting and display data for basic list                *
*&amp;amp;---------------------------------------------------------------------*

select kunnr
       name1
       land1
       from kna1 into table itab.

loop at itab.
  write:/10 itab-kunnr,
         35  itab-name1,
         70  itab-land1.
  hide itab-kunnr.
endloop.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;          selecting and display data for detail list                 *
*&amp;amp;---------------------------------------------------------------------*

at line-selection.
  case sy-lsind.

    when '1'.
      data: v_field(60).
      get cursor field v_field.
      check v_field = 'ITAB-KUNNR'.
      select vbeln
             erdat
             netwr
             from vbak into table jtab where kunnr = itab-kunnr.
      if sy-subrc ne 0.
        message e000(zmessage).
      endif.

      loop at jtab.
        write:/10 jtab-vbeln,
               35 jtab-erdat,
               70 jtab-netwr.
        at last.
          sum.
          write:/ 'Sub total:', jtab-netwr color 3.
        endat.
        hide jtab-vbeln.
      endloop.

    when '2'.
      select posnr
             arktx
             werks
             from vbap into table ktab where vbeln = jtab-vbeln.

      loop at ktab.
        write:/10 ktab-posnr,
               35 ktab-arktx,
               70 ktab-werks.
      endloop.

  endcase.

top-of-page.

  write:/ 'CUSTOMERS INFORMATION REPORT'.
  uline.
  write:/10 'customer number',
         35 'customer name',
         70 'customer country'.
  uline.

end-of-page.
  write:/80 'Page Number:',sy-pagno .

top-of-page during line-selection.

  write:/'ORDER DETAILS OF', itab-kunnr, itab-name1.
  uline.
  write:/10 'order number',
         35 'order date',
         80 'order value'.
  uline.

top-of-page during line-selection.

  write:/'ORDER DETAILS OF', jtab-vbeln,jtab-erdat.
  uline.
  write:/10 'Item Number ',
         35 'Item Description',
         80 'Plant'.
  uline.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2007 21:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-cursor/m-p/2254759#M488015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-17T21:57:05Z</dc:date>
    </item>
  </channel>
</rss>

