<?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: Merge functionality when using editable fields in ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803725#M345014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, my input field is a check-box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Amrutha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2007 05:10:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-03T05:10:46Z</dc:date>
    <item>
      <title>Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803719#M345008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my report I have a field which is editable. I discovered that the merge functionality disappeared when the field is made editable. Can someone please help me with this query. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amrutha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 11:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803719#M345008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T11:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803720#M345009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Amrutha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             can u be little more specific and explain some more, so that i will try to do it out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 11:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803720#M345009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T11:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803721#M345010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amrutha..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a sort option on that . i mean you have any sort option built based on that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 11:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803721#M345010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T11:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803722#M345011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes there is a sort option in the field. Normally when a field is sorted if values of  the field is duplicated then they are merged.&lt;/P&gt;&lt;P&gt;eg. if we have 2 fields say,&lt;/P&gt;&lt;P&gt;   AAA  abc&lt;/P&gt;&lt;P&gt;   BBB  efg&lt;/P&gt;&lt;P&gt;   AAA  bcd&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;then normally if I sort by first column output would be &lt;/P&gt;&lt;P&gt;   AAA  abc&lt;/P&gt;&lt;P&gt;            bcd&lt;/P&gt;&lt;P&gt;   BBB  efg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I make anyone field editable then this merge functionality is lost and the output becomes,&lt;/P&gt;&lt;P&gt;   AAA  abc&lt;/P&gt;&lt;P&gt;   AAA  bcd&lt;/P&gt;&lt;P&gt;   BBB  efg&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt; But I want this merge functionality  to be retained even if field is made editable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amrutha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 08:12:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803722#M345011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T08:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803723#M345012</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;what is the input field, you have check box or some other input field other than check box.please let me know.&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;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803723#M345012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803724#M345013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is Check Box, then you can proceed the following way....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works above 4.7 (from ECC 5.0)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_check_box                         .

TYPE-POOLS: slis,icon.

DATA: BEGIN OF it_vbap OCCURS 0,
       vbeln LIKE vbap-vbeln,
       matnr LIKE vbap-matnr,
       posnr LIKE vbap-posnr,
       kunnr LIKE vbak-kunnr,
       kwmeng LIKE vbap-kwmeng,
       check TYPE c,
       id TYPE icon-id,
      END OF it_vbap.
DATA: it_fieldcat  TYPE slis_t_fieldcat_alv.
DATA:  x_fieldcat  TYPE slis_fieldcat_alv.

DATA: it_sort TYPE slis_t_sortinfo_alv,
      x_sort TYPE slis_sortinfo_alv.

SELECT vbak~vbeln
       vbak~kunnr
       vbap~posnr
       vbap~matnr
       vbap~kwmeng
       INTO CORRESPONDING FIELDS OF TABLE it_vbap
       FROM vbak JOIN vbap
       ON vbak~vbeln = vbap~vbeln.
SORT it_vbap BY matnr.
DELETE it_vbap WHERE matnr IS INITIAL.
LOOP AT it_vbap.
  it_vbap-id = '@T9@'.
  MODIFY it_vbap.
ENDLOOP.


x_fieldcat-fieldname = 'MATNR'.
x_fieldcat-seltext_l = 'MATNR'.
x_fieldcat-col_pos   = 1.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.

x_fieldcat-fieldname = 'KUNNR'.
x_fieldcat-seltext_l = 'KUNNR'.
x_fieldcat-col_pos   = 2.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.

x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-seltext_l = 'VBELN'.
x_fieldcat-col_pos   = 3.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.

x_fieldcat-fieldname = 'ID'.
x_fieldcat-seltext_l = 'CHECK'.
x_fieldcat-outputlen = 4.
x_fieldcat-icon  = 'X'.
x_fieldcat-col_pos   = 4.
x_fieldcat-hotspot  = 'X'.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.


x_fieldcat-fieldname = 'POSNR'.
x_fieldcat-seltext_l = 'POSNR'.
x_fieldcat-col_pos   = 5.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.


x_fieldcat-fieldname = 'KWMENG'.
x_fieldcat-seltext_l = 'KWMENG'.
x_fieldcat-col_pos   = 6.
x_fieldcat-do_sum   = 'X'.
x_fieldcat-tabname   = 'IT_VBAP'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.


x_sort-fieldname = 'MATNR'.
x_sort-spos       = 1.
x_sort-up = 'X'.
x_sort-group = 'X'.
x_sort-subtot = 'X'.
APPEND x_sort TO it_sort.
CLEAR x_sort.
x_sort-fieldname = 'KUNNR'.
x_sort-spos       = 2.
x_sort-up = 'X'.
APPEND x_sort TO it_sort.
CLEAR x_sort.
x_sort-fieldname = 'VBELN'.
x_sort-spos       = 3.
x_sort-up = 'X'.
APPEND x_sort TO it_sort.
CLEAR x_sort.
*DATA:x_layout TYPE lvc_s_layo.
*x_layout-box_fname = 'CHECK'.
*x_layout-no_rowmark = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = sy-repid
*   is_layout          = x_layout
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat        = it_fieldcat
    it_sort            = it_sort
  TABLES
    t_outtab           = it_vbap[]
  EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
IF sy-subrc &amp;lt;&amp;gt; 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  itab_user_command
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
*      --&amp;gt;WHATCOMM   text
*      --&amp;gt;WHATROW    text
*---------------------------------------------------------------------*
FORM user_command USING whatcomm TYPE sy-ucomm selfield TYPE
slis_selfield.

  IF selfield-fieldname = 'ID'.
    READ TABLE it_vbap INDEX selfield-tabindex.
    IF sy-subrc = 0.
      IF it_vbap-check = ''.
        it_vbap-id = '@R7@'.
        it_vbap-check = 'X'.
      ELSE.
        it_vbap-id = '@T9@'.
        it_vbap-check = ''.
      ENDIF.
      MODIFY it_vbap INDEX selfield-tabindex.
    ENDIF.
  ENDIF.
  selfield-refresh = 'X'.
ENDFORM.                    "itab_user_command&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if you want to make the above code to work in lower versions then you have to do this..&lt;/P&gt;&lt;P&gt;then maintain the ICON using the view V_ICON from SM30 add the New Entry.&lt;/P&gt;&lt;P&gt;get the properties from the below screen shot.&lt;/P&gt;&lt;P&gt;&lt;A href="http://img404.imageshack.us/img404/3338/testig9.png" target="test_blank"&gt;http://img404.imageshack.us/img404/3338/testig9.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803724#M345013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803725#M345014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, my input field is a check-box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Amrutha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 05:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803725#M345014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T05:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803726#M345015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in that case the above code works very well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check it.&lt;/P&gt;&lt;P&gt;it can be done with the help of ICONS. please get back if you have any doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2007 06:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803726#M345015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-03T06:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merge functionality when using editable fields in ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803727#M345016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need to award points for Vijay in providing the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2007 04:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/merge-functionality-when-using-editable-fields-in-alv/m-p/1803727#M345016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-04T04:50:38Z</dc:date>
    </item>
  </channel>
</rss>

