Dynamic color color rows n't proper

Hi all,
above tablix red circle dynamic columns
i am using :row background color :=IIf(rownumber("Tablix10") mod 2, "white","whiteSmoke")
give any solutions
thanks

Hi Revathi,
Please click the link below to see Alternating Group Colors and Alternating Row Colors:
http://www.bidn.com/blogs/briankmcdonald/bidn-blog/717/alternating-group-colors-and-alternating-row-colors
By the way, if you use matrix in your report, the RowNumber function in the Matrix is totally different with it in the table because you are always dealing with grouped data in a matrix. This expression only works fine whit table report. So if we want to have
the alternative color in the matrix, we may use the Running Function.
If the issue persists, please elaborate the structure of your report so that we can make further analysis and help you out.
Regards,
Charlie Liao

Similar Messages

  • Dynamically color to each column in Cross-tab report

    Hello All,
    I am a newbie in Crystal report,from last few weeks, i am working on cross tab crystal report.i have a requirement to show color dynamically for each column.i am adding an attachment how i want it. i tried dynamic coloring using object field formula but it is showing red color to all data.i want red color data when in 2nd  cross tab report data is beyond upper or lower limit in first cross tab table. it will be very helpful if somebody will give me any clue on this.... i read so many articles now it seem like impossible for me..:(
    i am using visual studio 2010 and sap crystal report version 13.0.0.99 for visual studio 2010.

    Hello Manish,
    I have attached a sample report that does this. You will need to remove the .txt extension from the attached file to open it as an .rpt file.
    Please right click on one of the value fields of the first cross tab in the report > Format Field > Common > Suppress if Duplicated conditional formula.
    The nested formula is as follows;
    numbervar array l;
    numbervar array u;
    numbervar x:=CurrentColumnIndex;
    if GridRowColumnValue ('@limit') = 'lower limit' then
    (redim preserve l[x];
    l[x]:= tonumber(CurrentFieldValue))
    else if GridRowColumnValue ('@limit') = 'upper limit' then
    (redim preserve u[x];
    u[x]:= tonumber(CurrentFieldValue));
    false
    So it assigns each lower and upper limit value for each client (in the sample it is country) to an array using the cross tabs column index to index the array and it ends in False as we don't actually want it to suppress if duplicated. This nested formula is just used to generate the arrays of upper and lower values.
    In the second cross tab if you again right click on one of the value fields > Format Field > Font > Color you will see the following conditional formula;
    numbervar array l;
    numbervar array u;
    numbervar x;
    if not(tonumber(CurrentFieldValue) in l[CurrentColumnIndex] to u[CurrentColumnIndex]) then
    crred
    else
    crblack
    So this compaes the current field value to range generated by the 2 arrays and assigns a color based on whether or not it is in the range.
    Regards,
    Graham

  • How to set dynamic color , based on xml element

    Hi,
    We have a requirement, where based on certain conditions, a cell will be shown in a specific color. We would like the coloir to be based on an XML element. The xml element will have values like '#FF00FF' etc..
    We tried using xsl attribute with the following syntax ,
    <xsl:attribute xdofo:ctx="block"name="color"><?stdcolor?></xsl:attribute><?end if?>
    where stdcolor is the xml element, but when we use this , this is giving a syntax error.
    Let us know, if this is possible or is there any other alternate way to do this.
    Regards,
    - Vasu -

    Hi Vasu,
    http://winrichman.blogspot.com/2008/09/how-to-set-dynamic-color-based-on-xml.html
    use the following :)
    <xsl:attribute xdofo:ctx="block" name="color" ><xsl:value-of select="stdcolor" /></xsl:attribute>
    TO get the colors you wanted , you can refer to
    http://www.w3schools.com/Html/html_colors.asp

  • Dynamic Color Swatch

    We would like to add Dynamic Color Swatch. does anybody know the easier way to do it?
    Our Product example: http://www.whitneyeve.com/bottoms/skinny-sweats
    Thank you.

    You need to explain more what you are trying to achieve. You mean when you change the attribute selection it changes the colour image rather then what looks to be the grouping dropdown you setup?
    You need a good level of javascript knowledge to code that functionality in BC. Would you be able to do that?

  • Coloring row problem of JTable

    Hi!
    I'm the beginer and have a problem while coloring rows in my table. The problem is as follows:
    i need to color the whole row when i click a single cell of this row. Everything is ok until i click another cell of another row. When i do it all the row between first and last clicked become colored!
    I tryed manipulating table.setSelectionMode(i) - but nothing!
    My very simple code:
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer()
                public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected, boolean hasFocus, int row, int column)
                    Component cell = super.getTableCellRendererComponent(table,value, isSelected, hasFocus, row, column);
                    if (isSelected) {cell.setBackground(Color.LIGHT_GRAY);return cell;}
                    return cell;
    for(int i=0; i<table.getColumnCount(); i++)
                table.getColumnModel().getColumn(i).setCellRenderer(renderer);
    Please help!
    PS I cant use Ctrl button in my program because all the changes in table are in table.isEnable(false)-mode-it is the condition of my work.

    Karl already gave the correct answer: once you touched any Color property of a DefaultTableCellRenderer, you have to do it always, that is in any of the logic branches. That's because DTCR has a nasty color "memory" which basically is the net result of inapproriate subclassing (no compelling reason for a renderer to-be a component) and frozen api (couldn't add a setRendererXXColor) at the particular moment of evolution when it was needed. (Our SwingX wiki about swingx renderer/highlighter support has more details)
    BTW, if I interpret your code snippet correctly, you are after a different selection color for all columns? If so you can set that color globally for your table instance (hint: api doc is your friend :-), no need for a custom renderer.
    HTH
    Jeanette

  • Dynamic Color for Workbook

    Hi Expert,
    by creating a colored workbook i notice the color was disappearing after the refresh.
    I decide to built a makro which can fix the color in each line.
    I done that manually.
    But i am looking for a makro which can dynamically color the cells.
    for example:
    1. Total sum--- > color red
    1.2 sub sum color yellow
    1.2.1 sub sum color grey
    I will not want to fix that, because if there is a change in  the result it can not match again.
    Thank for your help
    Gilo

    Banu / Gilo, i am going thru the same exercise. Our users wanted the TOP 15 customers, sub total and Overall total. We cannot achieve this in a query as a HTML page, so we decided to use precalculation server to broadcast as a workbook. I know we need to run the report in BEx and store the workbook and then do the broadcast. I want to know when we store it as a workbook can we write macro to get the Sub total and the overall total.
    Do u have any documentation or idea to achieve this. Once i get this i can play with formats and coloring.
    Thanks in advance.
    Anand

  • Dynamic Color Customization

    Does anybody know where I can get the source code (ie, color.pll and fmb) to implement the "Dynamic Color Customization" in the Oracle Forms?
    I saw this white paper in the Forms product center by Oracle Forms community and wondering about the source code.
    Thanks

    Hello,
    <p>The pl/sql code is available here</p>
    Francois

  • Creating vertical reports with alternating colored rows

    I wanted to create a vertical report with alternating colored rows. Creating a vertical report template was not a problem but I am not able to use different bgcolor for alternating rows.

    As I mentioned above, I used the follwoing code to generate the vertical report BUT i could not get the alternating rows in a diffrent color:
    Before Rows:
    <table class="default2">
    Before Each Row:
    OMIT
    Column Template 1
    <tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td width="500">#COLUMN_VALUE#</td></tr>
    Column Template 1 Condition
    Use for Odd rows
    Column Template 1
    <tr><td bgcolor="#CCCC99" width="200"><font color="#336699" #ALIGNMENT#><b> #COLUMN_HEADER#</td> <td bgcolor="#FFFFFF" width="500">#COLUMN_VALUE#</td></tr>
    Column Template 1 Condition
    Use for Even rows
    After Each Row
    OMIT
    After Rows
    </table>

  • Dynamic no of rows in tabular form

    Dear oracle forms experts,
    hope you all will be doing fine.
    Is it possable to that a tabular form take dynamic no of rows at run time, i mean if we i query mode if data contains 20 rows then it should expand to 20 rows and if it is only 5 rown then it should expand to 5 rown. and if i do not want to use side bar as well.
    Regards
    Abbas

    OK and thanks you too.
    now if i take it in this way that i have defied a tabular form for let say 20 rows and now in query mode if there are only 5 records then my form shuold show only first 5 rows that have data and rest 15 should get hidden..
    so now can it be possable in forms Developer 10g.
    Kind Regards
    Abbas

  • Adding Specific columns of dynamic internal table row into another column

    Hi Gurus,
    I need to add  few columns of a dynamic internal table row into another column:
    Article description hy01 hy02 total
    101      panza         10     12      22
    102      masht         12     12     24
    dynamic internal table is created and columns hy01 hy02.... can increase
    How to add the the values in hy01 hy 02... into total.
    Regards,
    Dep

    Hi,
    If you really want to have a dynamic table, then you will have to find a way to generate a whole new table, and then copy the data from the old table to the new one. There is no way to modify a type during runtime in ABAP.
    Here an example how to generate a dynamic table based on another internal table, hope this will help you.
    TYPE-POOLS: slis.
    PARAMETERS: p_nb_hy TYPE i DEFAULT 2. "Number of new HY columns to be added
    * Type ZST_T:
    *   matnr  TYPE matnr
    *   maktx  TYPE maktx
    *   hy01   TYPE i
    *   total  TYPE i
    TYPES: ty_t TYPE STANDARD TABLE OF zst_s.
    PERFORM main.
    *&      Form  main
    *       text
    FORM main.
      DATA: lt_fieldcat     TYPE slis_t_fieldcat_alv,
            lt_t            TYPE ty_t,
            lr_new_t        TYPE REF TO data.
      FIELD-SYMBOLS: <lt_new_t> TYPE STANDARD TABLE.
      "Add some lines to LT_T just to have something to display on screen
      DO 10 TIMES.
        APPEND INITIAL LINE TO lt_t.
      ENDDO.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZST_S'
        CHANGING
          ct_fieldcat      = lt_fieldcat.
      "Copy LT_T to LR_NEW_T
      PERFORM extend_and_copy_table USING lt_t p_nb_hy CHANGING lr_new_t lt_fieldcat.
      CLEAR lt_t. "Not needed anymore...
      ASSIGN lr_new_t->* TO <lt_new_t>.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          it_fieldcat = lt_fieldcat
        TABLES
          t_outtab    = <lt_new_t>.
    ENDFORM.                    "main
    *&      Form  extend_and_copy_table
    FORM extend_and_copy_table USING ut_t           TYPE STANDARD TABLE
                                     uv_nb_hy       TYPE i
                               CHANGING cr_t        TYPE REF TO data
                                        ct_fieldcat TYPE slis_t_fieldcat_alv
                               RAISING cx_sy_struct_creation cx_sy_table_creation.
      DATA: lo_tabledescr      TYPE REF TO cl_abap_tabledescr,
            lo_structdescr     TYPE REF TO cl_abap_structdescr,
            lo_new_structdescr TYPE REF TO cl_abap_structdescr,
            lo_new_tabledescr  TYPE REF TO cl_abap_tabledescr,
            lt_components      TYPE cl_abap_structdescr=>component_table,
            ls_component       TYPE cl_abap_structdescr=>component,
            lv_field_cnt       TYPE numc2,
            ls_fieldcat        TYPE slis_fieldcat_alv,
            lr_fieldcat        TYPE REF TO slis_fieldcat_alv.
      FIELD-SYMBOLS: <ls_old_s> TYPE ANY,
                     <lt_new_t> TYPE STANDARD TABLE,
                     <ls_new_s> TYPE ANY.
      "Get the list of all components from UT_T line structure
      lo_tabledescr  ?= cl_abap_tabledescr=>describe_by_data( ut_t ).
      lo_structdescr ?= lo_tabledescr->get_table_line_type( ).
      lt_components  = lo_structdescr->get_components( ).
      "The new columns will be from type of column HY01
      ls_component-type = lo_structdescr->get_component_type( 'HY01' ).
      "The new columns will have the same fieldcat info as column HY01
      READ TABLE ct_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'HY01'.
      "HY<lv_field_cnt> = new field name
      lv_field_cnt = uv_nb_hy + 1.
      "For each new column...
      DO uv_nb_hy TIMES.
        "Generate the new column field name
        CONCATENATE  'HY' lv_field_cnt INTO ls_component-name.
        ls_fieldcat-fieldname = ls_component-name.
        "Add the new field to the components of the new structure
        INSERT ls_component INTO lt_components INDEX 4.
        "Add the new field's fieldcat info to the fieldcat
        INSERT ls_fieldcat  INTO ct_fieldcat   INDEX 4.
        lv_field_cnt = lv_field_cnt - 1.
      ENDDO.
      "Adjust the COL_POS from fieldcat
      LOOP AT ct_fieldcat REFERENCE INTO lr_fieldcat.
        lr_fieldcat->col_pos = sy-tabix.
      ENDLOOP.
      "Create the new table
      lo_new_structdescr = cl_abap_structdescr=>create( p_components = lt_components ).
      lo_new_tabledescr  = cl_abap_tabledescr=>create( p_line_type = lo_new_structdescr ).
      CREATE DATA cr_t TYPE HANDLE lo_new_tabledescr.
      ASSIGN cr_t->* TO <lt_new_t>.
      "Copy all data from old to new table
      LOOP AT ut_t ASSIGNING <ls_old_s>.
        APPEND INITIAL LINE TO <lt_new_t> ASSIGNING <ls_new_s>.
        MOVE-CORRESPONDING <ls_old_s> TO <ls_new_s>.
      ENDLOOP.
    ENDFORM.                    "main

  • Has anyone been able to create a HtmlDataTable with dynamic col and rows?

    Has anyone been able to create a HtmlDataTable with dynamic col and rows?
    If so please explain. I am successfully able to dynamically add columns using the getChildren method of the htmldatatable object
    BUT for each new column created no data is displayed.
    I am only able to display data for columns originally created when i clicked and dragged the dataTable icon from the pallette in netbeans visual web kit.
    Any help on this is greatly appreciated. I have been searching the web and these forums for around 8 hours and no one seems to have a working example of this. Lots of similar posts asking how to do it though :(
    Thanks in advance.

    This might be useful: http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to add af:inputFile dynamically within each row of table?

    I need to add af:inputfile dynamically within each row of af:table, when the user hits a commandlink at the bottom of each row.
    I have tried wrapping af:inputfile with af:foreach:
    <af:table value="Bean.rows" var="row">
    <af:column>
    <af:forEach step="1" begin="1"
    end="#{Bean.filecount}">
    <af:inputFile label="Please upload a file"
    id="1"
    valueChangeListener="#{Bean.onClickUpload}"/>
    </af:forEach>
    <af:commandLink text="Add more file" id="cl3" actionListener="#{Bean.onAddFile}"/>
    </af:column>
    </af:table>
    in Bean.onAddFile, I have:
    public void onAddFile(ActionEvent event){
    filecount++;
    It works but there's no independent control of each row. When I click one commandlink, All rows now have 2,3,.... af:inputFile. The change affects all rows.
    The requirement should be that when I click one commandlink in a row, only that row shows additional af:inputFile.
    So why not leverage the row variable of the table, right? That's what I did, I changed the end attribute of foreach to the following:
    <af:forEach step="1" begin="1"
    end="#{row.fileRowCount}">
    the backing bean method changed to the following:
    public void onAddFile(ActionEvent event){
    int filerowcount = (Integer)JsfUtil.resolveExpression("#{row.fileRowCount}");
    Integer newcount = filerowcount+1;
    JsfUtil.setExpressionValue("#{row.fileRowCount}", newcount.toString());
    Note that "row" refers to an object that has a int field called "filerowcount". And the initial value is "1".
    Just for testing, I also added <af:outputText value="row.filerowcount"/>, to see if the count is what I expected it to be.
    I didn't see the any af:inputfile this time, but the outtext is showing the filerowcount properly. When I click the commandlink, the number changed to 2,3,..... Also in the backing bean newcount and filerowcount is incrementing correctly.
    I know the begin, end attribute means the index of a for loop. So I changed begin="0", it now shows one row of af:inputfile, but when I click the commandlink, no additional rows are shown. (Although the outputtext of filerowcount keeps incrementing as expected.
    So to sum up, the END attribute of af:foreach row CAN pick up the value from the backing bean and render af:inputfile dynamically, but it CANNOT pick up the value from the the field in VAR object of a table.
    Is is a known issue? Or I did something by mistake.
    Is there any other way to add af:inputFile dynamically within each row of table?
    Any advice/comment is appreciated.

    Hi,
    here is how it goes:
    - add an af:inputFile to the column and set its rendered property to point to a managed bean property. The managed bean property has a default value of "false" and the bean should be in viewScope
    - create another variable that holds the row number that should show the inputFile component. This is updated by the command link and evaluated by the get method of the managed bean property controlling the inputFile visibility
    - Define a property name for the table varStatus property
    - For the command link, define a attribute f:attribute with the name rowNumber and set its value to #{varStatusPropertyName.index}
    - define an action listener for the command link
    public void showInputFile(ActionEvent actionEvent){
    int rowNumber = ((RichCommandLink) actionEvent.getSource()).getAttributes().get("varStatusPropertyName");
    //set the value on the internal variable
    - In the getter of the property that defines the render value of the inputFile, use code like this
    public boolean get<whatever name you use>(){
    //access the following EL from Java #{varStatusPropertyName.index}
    int currentRenderedRow = <EL result here>;
    // compare the current row index with the one set by the command link, which is stored in the variable of the managed bean
    if true return true
    else return false
    - Set the PartialTriggers property of the table to point to the commandLink ID so the table is repainted when the command link is pressed
    This should then render the fileInput component for a single row (the one you clicked the command link in)
    Frank

  • Dynamic coloring of rows using FM (Reuse_alv_grid_display.)

    I need to color the rows depending on the condition dynamically . I am using FM Reuse_alv_grid_display for ALV . I have the code using Oops Concept, But i need to know how can we do using the Function Module. Please Clarify

    Hi,
    In the final internal table you declare one fieldsline_col(4) type c.
    Data: begin of itab occurs 0, "final internal table.
          line_col(4) type c,.
         end of itab.
    IF .......your condition.
        loop at itab.
          if itab-WERKS = '1000'.
            itab-line_col = 'C600'.
          endif.
          modify itab.
          clear itab.
        endloop.
    Next build your FIELDCATALOG ......
        gt_layout-zebra = 'X'.
        gt_LAYOUT-DETAIL_POPUP = ' '.
        gt_layout-info_fieldname = 'LINE_COL'.
    Next pass this to your FM.
    I hope this will help you.
    Thanks.
    If your issue is solved award points and close the thread if not revert back.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

  • Dial chart dynamic color range

    Hi
    I am trying to dynamically change range of the scalebar color.
    I see that I can give Apex a low and high value exactly for this reason.
        Invalid Dial chart query, use the following syntax:
         SELECT VALUE, MAX [, LOW, HIGH] VALUE FROM ...
        VALUE      Numeric column that defines dial value.
        MAX      Numeric column that defines Maximum dial value.
        LOW (optional)      Numeric column that defines the low value of a range to display on the dial. If this value is defined, a HIGH value is required.
        HIGH (optional)      Numeric column that defines the high value of a range to display on the dial. If this value is defined, a LOW value is required.
        This query should return one row.I would hope for Apex to use those value in the #SCALE_DATA# in the Chart XML.
    <axis start_angle="90" sweep_angle="180" >
    #SCALE_DATA#
            <labels enabled="true" align="Inside" text_align="Near" rotation="0" >
                  <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:\,,thousandsSeparator: }%]]></format>
              <font family="Tahoma" size="10" color="#000000" />
            </labels>
    </axis>But it does not seems to work.
    I only need to add those lines
    <scale_bar enabled="false" />
    <color_ranges>
       <color_range start="0" end="25" color="Red" />
       <color_range start="25" end="90" color="Green" />
       <color_range start="90" end="100" color="Red" />
    </color_ranges>25 being the #LOW# value and 90 the #HIGH# value.
    I do not want to use custom XML everywhere.
    ANy iadea if I can modify the default XML or modify the behavior of the #SCALE_DATA# ?
    Thanks a lot
    Sebastien

    Hello,
    What do you mean by maximum value?
    The 10 in the query is to figure out values other than the dial itself there is not a graphical component that represents that number.
    The high line usually is used historical maximum value. Do you want to change the color of the dial when it hits 10?
    Carl

  • How to color row in ALV report?

    hi
    I am creating an ALV report using factory method.
    my report is based on itab which contain 3 coulms, 1 column is ERROR_TYPE . how can i color all the rows which contain E in error_type ???
    thanks
    Ami

    TABLES:LFA1.
    SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    REGIO LIKE LFA1-REGIO,
    SORTL LIKE LFA1-SORTL,
    CFIELD(4) TYPE C,
    END OF ITAB.
    data:col(4).
    data:num value '1'.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
    IN LIFNR.
    LOOP AT ITAB.
    concatenate 'C' num '10' into col .
    ITAB-CFIELD = col.
    num = num + 1.
    if num = '8'.
    num = '1'.
    endif.
    MODIFY ITAB.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA:EVE TYPE SLIS_T_EVENT WITH HEADER LINE.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
    LAYOUT-EDIT = 'X'.
    LAYOUT-info_fieldname = 'CFIELD'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    this is for coloring cols
    REPORT ZBHCOLOR_COLS.
    TABLES:LFA1.
    SELECT-OPTIONS:C_LIFNR FOR LFA1-LIFNR. " FOR GRID ONLY
    PARAMETERS:LIST RADIOBUTTON GROUP ALV DEFAULT 'X',
    GRID RADIOBUTTON GROUP ALV.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    SORTL LIKE LFA1-SORTL,
    REGIO LIKE LFA1-REGIO,
    COL TYPE LVC_T_SCOL,
    END OF ITAB.
    DATA:COLR TYPE LVC_S_SCOL.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
    LOOP AT ITAB.
    IF ITAB-LIFNR IN C_LIFNR.
    COLR-FNAME = 'NAME1'.
    COLR-COLOR-COL = '5'.
    COLR-COLOR-INT = '1'.
    COLR-COLOR-INV = '0'.
    COLR-NOKEYCOL = 'X'.
    APPEND COLR TO ITAB-COL.
    COLR-FNAME = 'LIFNR'.
    APPEND COLR TO ITAB-COL.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    LAYOUT-ZEBRA = 'X'.
    layout-coltab_fieldname = 'COL'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    IF LIST = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ELSEIF GRID = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ENDIF.
    Reward points if useful.

Maybe you are looking for

  • Class not found in jar

    I have a servlet that is using request.forward() to invoke a class in a jar file. This class is in the class path, as below. However, when that class runs, it cannot find other classes in that same jar file. In my resin.conf file I have: <web-app id=

  • How to retrieve a page item value in another page?

    Hi, how to retrieve a page item value in another page? say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COUR

  • A way to only sync album picks with iOS?

    I have a smart album that filters by 4 stars or above and I like to keep these photos synced at all times with my iphone/ipads. It works ok except that when we do multiple edits of the same photo in a stack they all get sync'ed. So if we have 7 diffe

  • Pipeline Input Help!

    Hi guys, I'm having a bit of difficulty turning a script of mine into a re distributable tool and I've spent the best part of two days on it so here I am looking for some guidance. Basically I am using Quest-AD cmdlets to copy users whilst adding uni

  • Dynamic PDF Creation

    Has anyone used server based PDF creation components? I am after some recomendations as I am sure someone here must have used one before. All I want to do is use a template on the server, and populate fields from a database when requested. It needs t