<?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: ALV grid in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053451#M968967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Thanks for the reasonable reply. But onething is with read, only one row can be fetched. But in the present scenario any of the checkboxes can be selected. Then how can I get the aufnr of the corresponding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I  do like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1 where index slis_seltab-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says index is unknown field. Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2008 07:04:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-08T07:04:57Z</dc:date>
    <item>
      <title>ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053443#M968959</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;&lt;/P&gt;&lt;P&gt;I have displayed alv grid. First column in the display is check box.Now when I check any of the check boxes, then I should write select statement in which ' where condition' is to be used.This I have written in user command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That where condition is like this&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'ISSUE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;                from tab1&lt;/P&gt;&lt;P&gt;                 into tab2  &lt;/P&gt;&lt;P&gt;                 where field1 eq slis_selfield .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now field1 is aufnr, But slis_selfield is check box.so how can I match. This is very urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;khadeer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 12:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053443#M968959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T12:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053444#M968960</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;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;from tab1&lt;/P&gt;&lt;P&gt;into tab2&lt;/P&gt;&lt;P&gt;where field1 eq slis_selfield &lt;/P&gt;&lt;P&gt;and checkbox = 'X'..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;checkbox is the first field name in your output table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 12:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053444#M968960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T12:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053445#M968961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are selecting one check box then use read table and then move the data into other workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table tablename with key check = check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you are selecting multiple check box then use loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab where check = 'X'.&lt;/P&gt;&lt;P&gt;move itab to itab1.&lt;/P&gt;&lt;P&gt;append itab1.&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;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'ISSUE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;from tab1&lt;/P&gt;&lt;P&gt;into tab2 &lt;/P&gt;&lt;P&gt;where field1 eq slis_selfield . -&amp;gt; &lt;STRONG&gt;here use work area or internal table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now field1 is aufnr, But slis_selfield is check box.so how can I match. This is very urgent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 12:59:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053445#M968961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T12:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053446#M968962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khadeer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   The value of the check box will either be 'X' or Space. So, do in the following way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'ISSUE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt;field names&amp;gt;&lt;/P&gt;&lt;P&gt;from tab1&lt;/P&gt;&lt;P&gt;into tab2 &lt;/P&gt;&lt;P&gt;where field1 eq 'X' .&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;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 13:01:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053446#M968962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T13:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053447#M968963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U cannot match it. U have to match aufnr with aufnr only then select will be successful. I think in ur ALV there should be onw field that contains the aufnr value. May be u can find the index from structure where slis_selfield belongs based on that index read the output table that u have passed to ALV and then find the aufnr value and then based on it select data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 13:02:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053447#M968963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T13:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053448#M968964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first from your select i got that uyou r useing select on internal table this is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in layout u will have BOX field fill that with the check box field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now use get selected row method. you will get all the records which r checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'ISSUE'.&lt;/P&gt;&lt;P&gt;loop at output table where slis_selfield = 'X'&lt;/P&gt;&lt;P&gt; pass the records to outher table itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process the itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2008 13:05:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053448#M968964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-07T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053449#M968965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi s.r.v.r kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           can u please be elaborate on 'what is get selected row method'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;khadeer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 06:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053449#M968965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T06:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053450#M968966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;slis_selfield-tabindex will hold the row on which you check the checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the index and get the AUFNR value from the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_final index slis_selfield-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from tab1&lt;/P&gt;&lt;P&gt;into tab2 &lt;/P&gt;&lt;P&gt;where field1 eq it_final-aufnr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 06:22:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053450#M968966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T06:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053451#M968967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Thanks for the reasonable reply. But onething is with read, only one row can be fetched. But in the present scenario any of the checkboxes can be selected. Then how can I get the aufnr of the corresponding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I  do like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1 where index slis_seltab-tabindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says index is unknown field. Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 07:04:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053451#M968967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T07:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: ALV grid</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053452#M968968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mentioned the solution in the other thread you opened recently..&lt;/P&gt;&lt;P&gt;Check this..&lt;/P&gt;&lt;P&gt;You need use the Function moduel in the user command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GET_GLOBALS_FROM_SLVC_FULLSCR&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
 
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT TYPE SLIS_LAYOUT_ALV,
X_EVENTS TYPE SLIS_ALV_EVENT,
IT_EVENTS TYPE SLIS_T_EVENT.
 
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
CHK(1),
color(4),
END OF ITAB.
 
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
 
X_FIELDCAT-FIELDNAME = 'CHK'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
X_FIELDCAT-INPUT = 'X'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-CHECKBOX = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
 
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-HOTSPOT = 'X'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
 
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
 
L_LAYOUT-info_fieldname = 'COLOR'.
*L_LAYOUT-ZEBRA = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC 0.
 
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
 
 
&amp;amp;---------------------------------------------------------------------
*&amp;amp; Form STATUS
&amp;amp;---------------------------------------------------------------------
 
 
text 
----------------------------------------------------------------------
 
--&amp;gt;P_EXTAB text 
----------------------------------------------------------------------
FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
 
 
Pf status 
SET PF-STATUS 'STATUS'.
ENDFORM. " STATUS
 
&amp;amp;---------------------------------------------------------------------
*&amp;amp; Form USER_COMMAND
&amp;amp;---------------------------------------------------------------------
 
text 
----------------------------------------------------------------------
 
--&amp;gt;R_UCOMM text 
--&amp;gt;RS_SELFIELD text 
----------------------------------------------------------------------
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
 
DATA: GD_REPID LIKE SY-REPID, "Exists
REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
IF REF_GRID IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF_GRID.
ENDIF.
IF NOT REF_GRID IS INITIAL.
CALL METHOD REF_GRID-&amp;gt;CHECK_CHANGED_DATA .
ENDIF.
 
loop at itab where chk = 'X'.
itab-color = 'C300'.
modify itab index sy-tabix transporting color.
endloop.
RS_SELFIELD-refresh = 'X'.
break-point.
 
ENDFORM. "USER_COMMAND&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2008 07:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid/m-p/4053452#M968968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-08T07:08:15Z</dc:date>
    </item>
  </channel>
</rss>

