Add grid rows in panel grid layout in adf UI page

I'm using panel grid layout in adf UI page. I need to add a dynamic grid row in panelGridLayout. Or in simple way programatically I need to add grid rows in panel grid layout in adf UI page.Timo Hahn Frank Nimphius Shay Shmeltzer-Oracle

Hi Shay,
It is a dynamic grid.
there can be one dropdown, two dropdown.... n dropdown.
Please tell me if there is any specific method to add children.

Similar Messages

  • How to add 2 rows in the form layout?

    In the detail page,form layout only one row pick up from database and it displays please anyone have idea about how to display 2 rows or 3 rows in a page?
    how to add 2 rows in the form layout?
    It's very urgent
    Thanks in advance

    No. You can only achieve this with smart custom templates. Here is sample code which will display multiple employees in form layout:
    <af:forEach items="#{bindings.EmployeesTable.rangeSet}" var="row">
    <af:panelForm rows="1" maxColumns="2" width="10%" id="RegionsFormItems">
    <af:inputText id="EmployeesEmployeeId" value="#{row.LastName}" label="EmployeeId" .... />
    <af:selectInputDate id="EmployeesHireDate" value="#{row.HireDate}" label="HireDate" ...... >
    <af:convertDateTime pattern="#{nls.datepattern}"/>
    </af:selectInputDate>
    </af:panelForm>
    </af:forEach>
    Steven Davelaar,
    JHeadstart Team.

  • Partial Trigger is not working with Panel Group Layout using ADF 11g.

    Friends,
    I have a requirment , Based on the <af:selectBooleanCheckbox> value I have to render <af:panelGroupLayout> dynamically. If the check box is checked then I have to display panel group layout otherwise not. The problem what I am facing here is Partial Trigger is not working, If I Un check the boolean box and refresh the page then I see it is working. If I don't refresh the page I am not seeing this is working as expected.
    Below is the snippet
    <af:selectBooleanCheckbox value="#{bindings.ChkBoolean.inputValue}"
    shortDesc="#{bindings.OtherOptChk.hints.tooltip}"
    id="OtherOpt" immediate="true" autoSubmit="true"
    />
    <af:panelGroupLayout id="pgl11" partialTriggers="ChkBoolean"
    rendered="#{bindings.ChkBoolean.inputValue}"">
    Am I doing anything wrong here
    Thanks in Advance

    Hi,
    I started to document common pitfalls like this. The problem has been reported last month too and is documented in here: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
    Frank

  • Add/Delete rows from ALV-grid

    Hi to all,
    i have 2 questions concerning alv-grids:
    i have an alvgrid displaying a table and what i need is some functionality to add or delete rows from the alvgrid - how can i do that ?
    within one row i have one field containing the status and i want to be able to select the status from a combo/dropdown-field and set it for this particular row.
    thanks in advance!

    Hi,
    Report BCALV_EDIT_04 shows how to append and delete rows.
    Report BCALV_EDIT_06 shows drop down list for cells in a column.
    These report should be available in any R/3 system including all ABAP Preview versions.
    Hope this can help.
    Regards, Johan

  • Delete grid row using button in row

    I want to create a grid, with each row containing several
    textInputs and one delete button.
    I will have another button that will add rows to the grid.
    I can't find out how to tie the button in each row to delete
    that row...
    Alos, what is the best way to add a row to the grid ?
    Please advise
    Thanks.

    Hi,
    Why don't you use the function "excel inplace" in the ALV?  With the ALV you have some buttons "SORT/TOTAL/FILTER... and you have PRINT and EXCEL INPLACE"?
    Do you use the method   call method g_grid->set_table_for_first_display in order to display your data alv?
    Best regards

  • (2nd POST) The correct way to do "custom layout" with ADF Faces

    Hi all,
    I need the capability to do custom layout of ADF Faces page (other than the default layout we got after we drag data controls). For example I need layout like below :
    Order Number : xxxx ............................................................Gross : 999,999
    Order Date : xx/xx/xxxx ........................................................Discount : 999,999
    Customer : code - name.........................................................Tax : 999,999
    Salesman : code - name.........................................................Netto : 999,999
    (the dotted line represents spaces)
    Currently I do it with </afh:rowLayout> plus.. many..many </h:panelGrid>, so I am looking a better way. what is that ?
    Below is sample of my code :
    <afh:rowLayout>
    <h:panelGrid columns="1" width="100" style="font-size:80.0%;">
    <f:verbatim>
    Order Number.
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="400">
    <af:outputText value="#{bindings.SphView1Spno.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10"/>
    <h:panelGrid columns="1" width="60" style="font-size:80.0%;">
    <f:verbatim>
    Gross
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100" style="text-align:right;">
    <af:outputText value="#{bindings.SphView1Gross.inputValue}"
    inlineStyle="font-size:80.0%; text-align:right;">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SphView1Gross.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100"
    style="padding:1.0%; text-align:left;">
    <af:outputText value="#{bindings.Valuta.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    </afh:rowLayout>
    <afh:rowLayout>
    <h:panelGrid columns="1" width="100" style="font-size:80.0%;">
    <f:verbatim>
    SP Date
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="400">
    <af:outputText value="#{bindings.SphView1Spdate.inputValue}"
    inlineStyle="font-size:80.0%;">
    <f:convertDateTime pattern="#{bindings.SphView1Spdate.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10"/>
    <h:panelGrid columns="1" width="60" style="font-size:80.0%;">
    <f:verbatim>
    Discount
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100" style="text-align:right;">
    <af:outputText value="#{bindings.SphView1DiscBp.inputValue}"
    inlineStyle="font-size:80.0%;">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SphView1DiscBp.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100"
    style="padding:1.0%; text-align:left;">
    <af:outputText value="#{bindings.Valuta.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    </afh:rowLayout>
    Thank you very much,
    xtanto

    Xtanto,
    yes. The way to build such layouts is to nest containers
    Frank

  • The correct way to do "custom layout" with ADF Faces

    Hi all,
    I need the capability to do custom layout of ADF Faces page (other than the default layout we got after we drag data controls). For example I need layout like below :
    Order Number : xxxx ............................................................Gross : 999,999
    Order Date : xx/xx/xxxx ........................................................Discount : 999,999
    Customer : code - name.........................................................Tax : 999,999
    Salesman : code - name.........................................................Netto : 999,999
    (the dotted line represents spaces)
    Currently I do it with </afh:rowLayout> plus.. many..many </h:panelGrid>, so I am looking a better way. what is that ?
    Below is sample of my code :
    <afh:rowLayout>
    <h:panelGrid columns="1" width="100" style="font-size:80.0%;">
    <f:verbatim>
    Order Number.
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="400">
    <af:outputText value="#{bindings.SphView1Spno.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10"/>
    <h:panelGrid columns="1" width="60" style="font-size:80.0%;">
    <f:verbatim>
    Gross
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100" style="text-align:right;">
    <af:outputText value="#{bindings.SphView1Gross.inputValue}"
    inlineStyle="font-size:80.0%; text-align:right;">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SphView1Gross.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100"
    style="padding:1.0%; text-align:left;">
    <af:outputText value="#{bindings.Valuta.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    </afh:rowLayout>
    <afh:rowLayout>
    <h:panelGrid columns="1" width="100" style="font-size:80.0%;">
    <f:verbatim>
    SP Date
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="400">
    <af:outputText value="#{bindings.SphView1Spdate.inputValue}"
    inlineStyle="font-size:80.0%;">
    <f:convertDateTime pattern="#{bindings.SphView1Spdate.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="10"/>
    <h:panelGrid columns="1" width="60" style="font-size:80.0%;">
    <f:verbatim>
    Discount
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1">
    <f:verbatim>
    </f:verbatim>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100" style="text-align:right;">
    <af:outputText value="#{bindings.SphView1DiscBp.inputValue}"
    inlineStyle="font-size:80.0%;">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SphView1DiscBp.format}"/>
    </af:outputText>
    </h:panelGrid>
    <h:panelGrid columns="1" width="100"
    style="padding:1.0%; text-align:left;">
    <af:outputText value="#{bindings.Valuta.inputValue}"
    inlineStyle="font-size:80.0%;"/>
    </h:panelGrid>
    </afh:rowLayout>
    Thank you very much,
    xtanto

    Unfotunately nesting layouts or creating custom layouts is the best approach at this time. You may want to take a look at the folloing library to replace of your verbatim tags.
    http://jsftutorials.net/htmLib/

  • Panel Grid Layout: Column Span unexpected behavior.

    Whenever in a Panel Grid Layout, when i give a cell to span over multiple columns(2,3,4 or any), the cell is spanned over the entire row only.. Why does this behavior happens? In JDeveloper, the spanning is shown correctly in design tab and preview tab.

    Hi Amanda,
    I believe I have discovered the cause of the issue you are facing.
    The problem is with the "Alert Region" region template and that it does not have any display points specified so indicate the number of grids that can fit in its region body. Without having any display points, the grid layout system attempts to use all columns available to its container. However, because the Alert Region has additional padding within, the columns will not fit and wrap to the next line.
    To fix this issue, you will have to modify the "Alert Region" region template, go to "Display Points" and click Add Row. You will need to enter the following fields:
    Name: Region Body
    Template Substitution: BODY
    Grid Support: Checked
    Maximum Fixed Grid Columns: -1
    This will fix the issue for you. I've logged a bug within our bug system to track this so we can fix it in a future release of APEX.
    Best,
    Shakeeb

  • Add new row and update on grid

    Hi all !
    Can you help me ?
    I want to add new row on grid ,but I canu2019t add .I donu2019t know ,have I written code correct?
    This is code that I used belown.
    I connect to database  as code :SetApplication()
    Public Sub SetApplication()
            Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            SboGuiApi.Connect(sConnectionString)
            SBO_Application = SboGuiApi.GetApplication()
        End Sub
    Sub ItemEvent_Add(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, _
                                ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If "frmGrid" = pVal.FormType And pVal.BeforeAction = True And pVal.ItemUID = "AddNew" Then
                If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                    SetApplication()
                    oGrid.DataTable.Rows.Add()
                End If
            End If
    End Sub
    <a href="http://imageshack.us">[IMG]http://img402.imageshack.us/img402/2763/updateandaddnewnf2.png[/IMG]</a>
    <a href="http://g.imageshack.us/img402/updateandaddnewnf2.png/1/">[IMG]http://img402.imageshack.us/img402/updateandaddnewnf2.png/1/w699.png[/IMG]</a>

    Hi all !
    To day, I want to ask you about 2 problem .
    1:I want to update data as I changes data of column Name.I used code for this function update:
    If (pVal.ItemUID = "1") Then
                    Dim frm As SAPbouiCOM.Form = SBO_Application.Forms.Item(FormUID)
                    If frm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then
                        Dim n1 As String
                        Dim col As SAPbouiCOM.GridColumns
                        Dim i As Integer
                        col = oGrid.Columns.Item(1)
                        n1 = col.String()
                        Dim b1 As String
                        b1 = oGrid.Columns.Item(2)
                        Dim n2 As String
                        n2 = oGrid.Columns.Item(3)
      frm.DataSources.DataTables.Item(0).ExecuteQuery("UPDATE OHEM SET U_NameChild = '" & n1 & "',U_Birthdate = '" & b1 & "' ,U_*** = '" & n2 & "'")
                        frm.Update()
                    End If
                End If
    However,This code donu2019t work ,because it not get value of column Name :col = oGrid.Columns.Item(1)
                                                                     n1 = col.String()
    Can you help me test this function and can rewritten it?
    2:I want to add new child to database pass grid.
    If FormUID = "frmGrid" And pVal.BeforeAction = False And (pVal.ItemUID = "AddNew") Or pVal.ItemUID = "1" And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                'Try
                If (pVal.ItemUID = "AddNew") Then
                    Try
                        OForm = SBO_Application.Forms.ActiveForm
                        oGrid = OForm.Items.Item("MyGrid").Specific
                        oGrid.DataTable.Rows.Add()
                        oGrid.AutoResizeColumns()
                        'OForm.Freeze(True)
                    Catch ex As Exception
    MessageBox.Show("Can't add new row on Grid", "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error)
                    End Try
                End If
    But, it only add new row on grid ,so it donu2019t add on database.
    Could you help me ?
    <a href="http://imageshack.us">[IMG]http://img404.imageshack.us/img404/1980/addandupdatepr8.png[/IMG]</a>
    <a href="http://g.imageshack.us/img404/addandupdatepr8.png/1/">[IMG]http://img404.imageshack.us/img404/addandupdatepr8.png/1/w700.png[/IMG]</a>

  • Changing font size(bold) or color of a particular row in ALV Grid Digplay

    Hi Experts ,
    I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
    Please give me some inputs .
    Thanks in Advance.
    Vijyeta

    Hi
    Coloring An Entire Row
    Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
    First you have to declaration of our list data table u201Cgt_listu201D.
    DATA BEGIN OF gt_list OCCURS 0 .
    INCLUDE STRUCTURE SFLIGHT .
    DATA rowcolor(4) TYPE c .
    DATA END OF gt_list .
    Adding the field that will contain row color data
    As you guess, you should fill the color code to this field.  But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
    e.g.
    ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
    You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
    Try this link also:
    Possible functionalities in ALV
    Regards
    Neha

  • Can you add video to a fluid grid project in CS6

    Hi Again;
    I'm thinking about the upgrade to CS6  to help with my video problem in CS 5.5 and was wondering if you can add video to a fluid grid web project.  From what I watched on the web, it looks like everything is a one page web site with links to an area on the index page.  I need to get video into my website as examples of what I do and the fluid grid looks great.  I'm also guessing that I could put a link to a video site like Vimeo.
    Thanks for your help.
    Tom

    was wondering if you can add video to a fluid grid web project. 
    Sure.  You can drop in your own HTML5 videos or embed  Vimeo, YouTube, etc... 
    From what I watched on the web, it looks like everything is a one page web site with links to an area on the index page.
    Not true.  jQuery Mobile and Fluid Grid Layouts differ quite a bit, don't get them confused. 
    JQuery Mobile is essentially a one page web site for mobile devices.
    With Fluid Grid Layouts however, you can make a responsive web site layout in a few minutes and then SaveAs Template.  Use File > New page from Template to create the rest of your site pages. Or, you can use jQuery Tabbed Panels inside your Fluid Grid Layouts.  It's entirely up to you.
    Nancy O.

  • Deactivate the double click/ hot spot for a particular row in alv grid.

    Hello,
       As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
    Regards,
    Saroj

    where u define layout there is a field hotspot.like
    data: var.
    if con is true
    var = 'X'. (show hotspot)
    else.
    var = ' '. (deactive hotspot)
    elseif ws_fieldcat-fieldname = 'DMBTR'
                    AND ws_fieldcat-tabname = 'T_MTAB'.
          ws_fieldcat-do_sum = C_X.
          <b>ws_fieldcat-hotsopts = var.</b>
          MODIFY Wt_fieldcat FROM ws_fieldcat
                  TRANSPORTING   DO_SUM.
    It is helpful for u. if any problen send me ur coding i will change it.
    Regards
    Manish Kumar

  • Header row in ALV Grid, based on the data in the table

    Hi All,
    I have a requirement wherein, based on the data in the table used for ALV, i need to add rows as sort of header in the ALV display.
    For e.g. my table has
    Appl No.  Item  Material  Desc.           Cost                 -> Column Heading
    1             10     400        Excavation    10.00               -> Data
    1             20     400        Footing         10.00
    2             10     400        Excavation    10.00
    2             20     400        Footing         10.00
    For every new Appl No., i need to add a row, or sort of header specifying the appl no. details. means
    Appl No.  Item  Material  Desc.           Cost
    Appli. No. 1                   Date: 01/01/1009                   -> my requirement
    1             10     400        Excavation    10.00
    1             20     400        Footing         10.00
    Appli. No. 2                   Date: 02/01/1009
    2             10     400        Excavation    10.00
    2             20     400        Footing         10.00
    Is this possible in ALV my any means? Currently i m using normal ALV Grid
    Regards,
    Janaki

    Hi..
         Try like this... I think u have Application number and date in ur table ... First get the total table data into internal table.. and to add the row
         *Declare the var1 as 0 and var2.
    loop at internal table
         *var1 = var1 +1
    when application number =var1
             concatenate : 'Appli. No.' (table- appli no field) 'Date:'  (table-date field) into var2.
    perform display(some name)
         *endloop.
         *form display...
              alv display part.. first give that var2 like eg.. wa_alv-field= 'var2'.
    end form.
        Hope this will help u .....
    Regards,
    Abaper

  • Color a row with ALV GRID

    Hi my friends,
    I have written a small ALV Grid where some rows should be colored, dependend on their status in a table. But it's not working and I can't find out, why it is not working. I've already studied all the topics in this forum, which are related to 'row color alv grid', but I can't find the mistake in my code. Is anyone able to find out what is wrong here?
    Thanks a lot for your help!
    *& Report  /BMC_TST_SHOWLOG
    REPORT  /BMC_TST_SHOWLOG.
    TYPES: BEGIN OF log_table.
      TYPES:  log_level TYPE /bmc_log_message,
              cr_date TYPE /bmc_cr_date,
              message TYPE /bmc_log_message,
              linecolor(4) TYPE c.
    TYPES: END OF log_table.
    DATA: lt_log TYPE TABLE OF log_table with HEADER LINE,
          lt_log2 TYPE TABLE OF log_table with HEADER LINE,
          lt_log_list TYPE TABLE OF log_table,
          lt_line LIKE LINE OF lt_log_list,
          container_r TYPE REF TO cl_gui_custom_container,
          grid_r TYPE REF TO cl_gui_alv_grid,
          gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_LOG',
          fieldcat_r TYPE lvc_t_fcat,
          layout_r TYPE lvc_s_layo,
          logA TYPE /bmc_log_level,
          logB TYPE /bmc_log_level,
          logC TYPE /bmc_log_level,
          logD TYPE /bmc_log_level,
          logE TYPE /bmc_log_level,
          ls_ct TYPE lvc_s_scol,
          ok_code LIKE sy-ucomm.
    *DATA BEGIN OF ls_log_list OCCURS 0.
    *DATA: log_level TYPE /bmc_log_message,
    *      cr_date TYPE /bmc_cr_date,
    *      message TYPE /bmc_log_message,
    *      rowcolor(4) TYPE c.
    *DATA END OF ls_log_list.
    *DATA: lt_log_list TYPE TABLE OF log_table.
    PARAMETERS: loglevlA  TYPE c AS CHECKBOX,
                loglevlB  TYPE c as CHECKBOX,
                loglevlC  TYPE c As CHECKBOX,
                loglevlD  TYPE c aS CHECKBOX,
                loglevlE  TYPE c AS CHECKBOX,
                dateA     TYPE /bmc_cr_date OBLIGATORY,
                dateB     TYPE /bmc_cr_date.
    CALL SCREEN 0200.
    MODULE user_command_0200 INPUT.
      CASE ok_code.
        WHEN 'BACK'.
          SET SCREEN 0.
          MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'DYNPRO200'.
      SET TITLEBAR 'D0200'.
    ENDMODULE.
    MODULE display_alv OUTPUT.
      PERFORM display_alv.
    ENDMODULE.
    FORM display_alv.
      IF grid_r IS INITIAL.
    *----Creating custom container instance
      CREATE OBJECT container_r
      EXPORTING
        container_name = gc_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        others = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT grid_r
        EXPORTING
          i_parent = container_r
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init = 2
          error_cntl_link = 3
          error_dp_create = 4
          others = 5.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          PERFORM get_log_data.
    *----Preparing field catalog.
          PERFORM prepare_field_catalog CHANGING fieldcat_r.
    *----Preparing layout structure
          PERFORM prepare_layout CHANGING layout_r.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
          CALL METHOD grid_r->set_table_for_first_display
          EXPORTING
            is_layout = layout_r
          CHANGING
            it_outtab = lt_log2[]
            it_fieldcatalog = fieldcat_r
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error = 2
            too_many_lines = 3
            OTHERS = 4.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
          ELSE.
            CALL METHOD grid_r->refresh_table_display
          EXCEPTIONS
            finished = 1
            OTHERS = 2.
          IF sy-subrc <> 0.
    *--Exception handling
          ENDIF.
        ENDIF.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD grid_r->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDFORM.
    FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
        DATA ls_fcat TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = '/BMC_LOG'
      CHANGING
        ct_fieldcat = pt_fieldcat[]
      EXCEPTIONS
        inconsistent_interface = 1
        program_error = 2
        OTHERS = 3.
      IF sy-subrc ne 0.
    *--Exception handling
      ENDIF.
      LOOP AT pt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'UUID'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'LOG_LEVEL'.
            ls_fcat-coltext = 'Meldungsart'.
            ls_fcat-outputlen = '25'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_DATE'.
            ls_fcat-coltext = 'Erstellungsdatum'.
            ls_fcat-outputlen = '20'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'CR_TIME'.
            ls_fcat-no_out = 'X'.
            MODIFY pt_fieldcat FROM ls_fcat.
          WHEN 'MESSAGE'.
            ls_fcat-coltext = 'Nachricht'.
            ls_fcat-outputlen = '50'.
            MODIFY pt_fieldcat FROM ls_fcat.
        ENDCASE.
    *    CASE ls_fcat-value.
    *      WHEN '1'.
    *        ls_fcat-line_color = 'c100'.
    *    ENDCASE.
      ENDLOOP.
    ENDFORM.
    FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X'.
      ps_layout-grid_title = 'Log'.
      ps_layout-smalltitle = 'X'.
      ps_layout-info_fname = 'linecolor'.
    ENDFORM.
    FORM get_log_data.
      if loglevlA = 'X'.
        logA = '1'.
      ENDIF.
      if loglevlB = 'X'.
        logB = '2'.
      ENDIF.
      if loglevlC = 'X'.
        logC = '3'.
      ENDIF.
      if loglevlD = 'X'.
        logD = '4'.
      ENDIF.
      if loglevlE = 'X'.
        logE = '5'.
      ENDIF.
      IF dateB ne 0.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA and cr_date <= dateB.
      ELSE.
        SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
          OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA.
      ENDIF.
    *    and cr_date >= dateA.
        SORT lt_log_list ASCENDING.
        LOOP AT lt_log_list INTO lt_line.
        IF lt_line-log_level = '1'.
          lt_line-log_level = 'Info'.
          lt_line-linecolor = 'C100'.
        ENDIF.
        IF lt_line-log_level = '2'.
          lt_line-log_level = 'Warning'.
          lt_line-linecolor = 'C200'.
        ENDIF.
        IF lt_line-log_level = '3'.
          lt_line-log_level = 'Error'.
          lt_line-linecolor = 'C300'.
        ENDIF.
        IF lt_line-log_level = '4'.
          lt_line-log_level = 'Debug'.
          lt_line-linecolor = 'C400'.
        ENDIF.
        IF lt_line-log_level = '5'.
          lt_line-log_level = 'Trace'.
          lt_line-linecolor = 'C500'.
        ENDIF.
        APPEND lt_line TO lt_log2.
        ENDLOOP.
    ENDFORM.
    SELECTION-SCREEN BEGIN OF SCREEN 0100 TITLE text-001 AS WINDOW.
    SELECTION-SCREEN END OF SCREEN 0100.

    > change to this
    >
    > <b>ps_layout-stylefname = 'LINECOLOR'.</b>
    >
    > sorry ignore the above line
    >
    > just debug and check what is happening
    >
    > Message was edited by:
    >         Chandrasekhar Jagarlamudi
    Hi,
    I've changed the line to <b>ps_layout-stylefname = 'LINECOLOR'.</b>, but then I'm getting a runtime error 'ASSIGN_TYPE_CONFLICT' in program 'SAPLSLVC in line 2975'...
    I don't have any idea what is causing that.

  • Updating Row in a Grid

    Hi All
        I m extracting data from SQL table onto xMII Dashboard using Grid template.I have one column named comments.
        I need that the supervisor using the Dashboard can change the comments as required and it should be reflected on the dashboard as well as It is updated in the database.
         Can anyone tell me how can I achieve this ? I am concerned whether I would be able to change an xMII Grid row ....
    Regards
    Amit

    Hi Amit,
    Add a cell selection event in your iGrid template definition
    e.g.
    <APPLET NAME="appDashBoard" WIDTH="100%" HEIGHT="250" CODE="iGrid" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
         <PARAM NAME="QueryTemplate" VALUE="/your/query/template">
         <PARAM NAME="DisplayTemplate" VALUE="/your/display/template">
         <PARAM NAME="InitialUpdate" VALUE="true">
         <PARAM NAME="CellSelectionEvent" VALUE="JavaScriptFunctionName">
    </APPLET>
    Create a query template to update new comment in database
    <APPLET NAME="appUpdateComment" WIDTH="1" HEIGHT="1" CODE="iCommand" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
    <PARAM NAME="QueryTemplate" VALUE="/update/comment">
    </APPLET>
    In your Java script function check whether the selected cell is part of the comment's column
    if (appDashBoard,getSelectedCellColumn() == 'Comment'){
       //capture new user comment
       var comment = prompt('Enter comment', '');
       //get record id from igrid for the selected comment
       var cellRow = appDashBoard.getSelectedCellRow();
       var rID = getCellValue(cellRow, columNumberOfID);
       var appUpdateCommentQry= appUpdateComment.getQueryObject(); 
       appUpdateCommentQry.setParam(1, rID);
       appUpdateCommentQry.setParam(2, comment );
       if(appUpdateComment.executeCommand()) {
       } else {
       appDashBoard.updateGrid(true);

Maybe you are looking for

  • Another user modified table rdr3

    Hi I got error "Another user modified table rdr3" when try to update additional expenses on sales order form. Case: Update Add. expences through my code based on condition and document updated well with add. expenses but after that if i update add. e

  • Screen flash and other small problems

    why does my screen flash when on internet and history sometimes deletes. I also have multiple apps i didn't have a week ago. on the 30th a pop up during a movie flashed and said something about blocking a remote connect. it showed up in the debug  th

  • Camera not working on mac air

    the camera seems to be disabled.

  • I installed the iphone 2.0 and now iTunes will not connect....

    after installing the iPhone 2.0 software update I get a message in iTunes saying that "We could not complete your iTunes store request. The network connection was reset. Make sure your network connection is active and try again". I have been trying f

  • Can't append keywords to multiple selection

    Only the first selected image gets the keyword and no other from the whole selection, always worked fine. Any help please? Thanks