<?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 Alignment in OOPs ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895385#M1961884</link>
    <description>&lt;P&gt;I want to align text to left and right based on some condition in same colomn in OOPs ALV(set_table_for_first_display). I can't use 'lvc_s_fcat-just' as this apply to every row for the colomn. &lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2019 07:27:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-06-14T07:27:52Z</dc:date>
    <item>
      <title>Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895385#M1961884</link>
      <description>&lt;P&gt;I want to align text to left and right based on some condition in same colomn in OOPs ALV(set_table_for_first_display). I can't use 'lvc_s_fcat-just' as this apply to every row for the colomn. &lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 07:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895385#M1961884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-06-14T07:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895386#M1961885</link>
      <description>&lt;P&gt;I do not know if you you can rely on structure LVC_S_STYL (table type LVC_T_STYLE), you can give a try with them.&lt;/P&gt;&lt;P&gt;You can check the BCALV... demo reports&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895386#M1961885</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2019-06-14T08:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895387#M1961886</link>
      <description>&lt;P&gt;You may use a different style for each cell by defining a style column in your ALV table named YOURSTYLECOL of type LVC_T_STYL (table of combination { field name, style 1, style 2, ... }).&lt;/P&gt;&lt;P&gt;Transmit its name via the layout parameter IS_LAYOUT-STYLEFNAME = 'YOURSTYLECOL'.&lt;/P&gt;&lt;P&gt;In every row of your ALV table, fill this style table with as many rows as number of cells to apply a style. The style 1 may have values from constants ALV_STYLE* from the include &amp;lt;CL_ALV_CONTROL&amp;gt;, for instance ALV_STYLE_ALIGN_RIGHT_CENTER. Some style constants correspond only to STYLE1, others to STYLE2, etc.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895387#M1961886</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-06-14T08:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895388#M1961887</link>
      <description>&lt;P&gt;** declaration for ALV Columns &lt;/P&gt;&lt;P&gt;DATA : gr_columns    TYPE REF TO cl_salv_columns_table,&lt;/P&gt;&lt;P&gt;
       gr_column     TYPE REF TO cl_salv_column .&lt;/P&gt;&lt;P&gt;  TRY .
      gr_column ?= lo_cols-&amp;gt;get_column( 'ZREV' ).&lt;/P&gt;&lt;P&gt;gr_column-&amp;gt;set_medium_text( 'Rev.Chrgs.Appl.' ). &lt;/P&gt;&lt;P&gt;      gr_column-&amp;gt;set_short_text( 'Rev.Chrgs' ). &lt;/P&gt;&lt;P&gt;      gr_column-&amp;gt;set_alignment(
          value =  if_salv_form_c_h_align=&amp;gt;center
      ). &lt;/P&gt;&lt;P&gt;    CATCH cx_salv_not_found.                            "#EC NO_HANDLER &lt;/P&gt;&lt;P&gt;  ENDTRY.&lt;/P&gt;&lt;P&gt;"Here using set_alignment you can set the alignment as per your need&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 12:55:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895388#M1961887</guid>
      <dc:creator>kumarsubhendu19</dc:creator>
      <dc:date>2019-06-14T12:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895389#M1961888</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Thanks for your response but i have used this logic and i didn't get result as per my requirement.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 13:17:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895389#M1961888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-06-14T13:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895390#M1961889</link>
      <description>&lt;P&gt;Hi Subhendu,&lt;/P&gt;&lt;P&gt;I am not using SALV&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 13:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895390#M1961889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-06-14T13:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895391#M1961890</link>
      <description>&lt;P&gt;Probably you did something wrong. In my system, it works well:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA go_alv TYPE REF TO cl_gui_alv_grid.
TYPES : BEGIN OF ty_scarr2.
    INCLUDE TYPE scarr AS scarr.
TYPES: styles TYPE lvc_t_styl,
       END OF ty_scarr2,
       ty_scarr2s TYPE STANDARD TABLE OF ty_scarr2 WITH EMPTY KEY.
INCLUDE &amp;lt;cl_alv_control&amp;gt;.
DATA gt_scarr2 TYPE ty_scarr2s.

PARAMETERS dummy.

AT SELECTION-SCREEN OUTPUT.
  IF go_alv IS INITIAL.
    CREATE OBJECT go_alv
      EXPORTING
        i_parent = cl_gui_container=&amp;gt;screen0.
    SELECT * FROM scarr INTO TABLE @DATA(gt_scarr).
    LOOP AT gt_scarr ASSIGNING FIELD-SYMBOL(&amp;lt;scarr&amp;gt;).
      gt_scarr2 = VALUE #( BASE gt_scarr2 (
          scarr  = &amp;lt;scarr&amp;gt;
          styles = VALUE #( ( fieldname = 'CARRNAME' style = alv_style_align_right_center ) ) ) ).
    ENDLOOP.
    go_alv-&amp;gt;set_table_for_first_display(
        EXPORTING
          i_structure_name = 'SCARR'
          is_layout        = VALUE #( stylefname = 'STYLES' )
        CHANGING
          it_outtab        = gt_scarr2 ).
  ENDIF.

AT SELECTION-SCREEN ON EXIT-COMMAND.
  go_alv-&amp;gt;free( ).
  FREE go_alv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1695614-alv-grid-column-right-aligned.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 13:39:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895391#M1961890</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-06-14T13:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895392#M1961891</link>
      <description>&lt;P&gt;Hi Anurag,&lt;/P&gt;&lt;P&gt;To get it done , please refer program - BCALV_EDIT_07&lt;/P&gt;&lt;P&gt;Here SAP Tried dynamic representation for drop down table . &lt;/P&gt;&lt;P&gt;the same way you can handle it for alignment too by changing the it_outtab as per your need . &lt;/P&gt;&lt;A href="https://answers.sap.com/users/1091/sandrarossi.html"&gt;Sandra Rossi&lt;/A&gt; has provided the solution for this .</description>
      <pubDate>Fri, 14 Jun 2019 14:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895392#M1961891</guid>
      <dc:creator>kumarsubhendu19</dc:creator>
      <dc:date>2019-06-14T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895393#M1961892</link>
      <description>&lt;P&gt;How is the ALV drop down demo program related to the question? (it doesn't even handle styles and alignments)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 14:32:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895393#M1961892</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-06-14T14:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment in OOPs ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895394#M1961893</link>
      <description>&lt;P&gt;this is what SAP has done to handle the rows dynamically , by adding an additional field to it , handling it with as per the needs , i was looking for it ,  then i saw your comment you have also did it in similar way ,  that's why i have mentioned you have provided the solution . &lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 14:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alignment-in-oops-alv/m-p/11895394#M1961893</guid>
      <dc:creator>kumarsubhendu19</dc:creator>
      <dc:date>2019-06-14T14:55:14Z</dc:date>
    </item>
  </channel>
</rss>

