<?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: Table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674862#M297754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly chk this standard pgms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for examples on table control&lt;/P&gt;&lt;P&gt;demo_dynpro_tabcont_loop&lt;/P&gt;&lt;P&gt;demo_dynpro_tabcont_loop_at&lt;/P&gt;&lt;P&gt;RSDEMO_TABLE_CONTROL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not any different from double click on a screen field. All you have to do is to give some function code to F2 key in your GUI Status, standard functions section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically we use PICK as function code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then in your screen's PAI, USER_COMMAND module,&lt;/P&gt;&lt;P&gt;do some thing similar to the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'PICK'.&lt;/P&gt;&lt;P&gt;*Declare lv_cursor_line like sy-tabix and&lt;/P&gt;&lt;P&gt;*lv_cursor_field(30).&lt;/P&gt;&lt;P&gt;GET CURSOR FIELD lv_cursor_field LINE lv_cursor_line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_cursor_field EQ &amp;lt;your field name&amp;gt;.&lt;/P&gt;&lt;P&gt;lv_cursor_line &lt;/P&gt;&lt;P&gt;= lv_cursor_line + &amp;lt;your TC name&amp;gt;-top_line - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Now read your internal table with this index&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;your itab&amp;gt; INDEX lv_cursor_line.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;****SET PARAMETER ID (if necessary)&lt;/P&gt;&lt;P&gt;****CALL TRANSACTION&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped pls amrk points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 09:45:16 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2006-11-06T09:45:16Z</dc:date>
    <item>
      <title>Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674861#M297753</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 have a table control with many columns and one column is Order Number displayed. When the user clicks on any of the order number , it should take to some other transaction.&lt;/P&gt;&lt;P&gt;Here how to get the Order number which the user clicked?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 09:34:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674861#M297753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T09:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674862#M297754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly chk this standard pgms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for examples on table control&lt;/P&gt;&lt;P&gt;demo_dynpro_tabcont_loop&lt;/P&gt;&lt;P&gt;demo_dynpro_tabcont_loop_at&lt;/P&gt;&lt;P&gt;RSDEMO_TABLE_CONTROL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not any different from double click on a screen field. All you have to do is to give some function code to F2 key in your GUI Status, standard functions section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically we use PICK as function code for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then in your screen's PAI, USER_COMMAND module,&lt;/P&gt;&lt;P&gt;do some thing similar to the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'PICK'.&lt;/P&gt;&lt;P&gt;*Declare lv_cursor_line like sy-tabix and&lt;/P&gt;&lt;P&gt;*lv_cursor_field(30).&lt;/P&gt;&lt;P&gt;GET CURSOR FIELD lv_cursor_field LINE lv_cursor_line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF lv_cursor_field EQ &amp;lt;your field name&amp;gt;.&lt;/P&gt;&lt;P&gt;lv_cursor_line &lt;/P&gt;&lt;P&gt;= lv_cursor_line + &amp;lt;your TC name&amp;gt;-top_line - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Now read your internal table with this index&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;your itab&amp;gt; INDEX lv_cursor_line.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;****SET PARAMETER ID (if necessary)&lt;/P&gt;&lt;P&gt;****CALL TRANSACTION&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped pls amrk points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 09:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674862#M297754</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-06T09:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674863#M297755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Check the W/SEL COLUMN property in table control and give any name there ( for eg SEL), in your code as write as follows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if SEL = 'X'.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;FETCH THE APPROPRIATE VALUE USING THE INTERNAL TABLE COMMANDS----&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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;a.fahrudeen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 09:46:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674863#M297755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T09:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674864#M297756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go trough this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.mis.cmich.edu/sap-abap/abap09/sld007.htm" target="test_blank"&gt;http://sap.mis.cmich.edu/sap-abap/abap09/sld007.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 09:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674864#M297756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T09:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674865#M297757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it needs to be within the loop at the table control at the PAI. Something like:&lt;/P&gt;&lt;P&gt;LOOP AT t_partner.&lt;/P&gt;&lt;P&gt;CHAIN.&lt;/P&gt;&lt;P&gt;FIELD t_partner-vbeln.&lt;/P&gt;&lt;P&gt;FIELD t_partner-parvw.&lt;/P&gt;&lt;P&gt;FIELD t_partner-vtext.&lt;/P&gt;&lt;P&gt;FIELD t_partner-kunn2.&lt;/P&gt;&lt;P&gt;FIELD t_partner-name1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;determine which line acted on&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODULE get_selected_line.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do validation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODULE process_order.&lt;/P&gt;&lt;P&gt;ENDCHAIN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module get_selected_line needs to be something like this:&lt;/P&gt;&lt;P&gt;MODULE get_selected_line INPUT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;only do the get cursor the first time....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-stepl EQ 1.&lt;/P&gt;&lt;P&gt;CLEAR wv_cursor_0120.&lt;/P&gt;&lt;P&gt;GET CURSOR LINE wv_cursor_0120.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;wv_cursor_0120 now contains line selected&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*... but if it's 0 default it to 1&lt;/P&gt;&lt;P&gt;IF wv_cursor_0120 = 0.&lt;/P&gt;&lt;P&gt;wv_cursor_0120 = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;convert the relative line to the actual line number in the table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;wv_absolute_line = wv_cursor_0120 + tc_partner-top_line - 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE. " GET_SELECTED_LINE INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module process_order needs to be something like this:&lt;/P&gt;&lt;P&gt;MODULE process_order INPUT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;only process the selected line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CHECK sy-stepl = wv_cursor_0120.&lt;/P&gt;&lt;P&gt;CASE ok_code.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;operate on the pai code assigned to the 'order' field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 09:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/1674865#M297757</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-11-06T09:57:40Z</dc:date>
    </item>
  </channel>
</rss>

