Linked button in a Grid (SBO 2005)

Hy,
Is it possible to add a linked button in a grid? I saw some posts for linked buttons in a matrix but this doesn't work for me.
The code that I use to fill the grid is:
               Item GOrder = form.Items.Item("GOrder");
               Grid gOrder = ((Grid)(GOrder.Specific));
               int intCountDatatable = 0;
               try
                    form.DataSources.DataTables.Item("TOrder").ExecuteQuery(strSQL);
               catch
                    return;
               gOrder.DataTable = form.DataSources.DataTables.Item("TOrder");
If you (all) need more info, just let me know. Hope you can help...
Joeri

Hey Joeri!
My guess it isn't possible; if you look through the UI-API, you'll see that there isn't a BoLinkedObject property, and no possibility to set a column to a linkedbutton type...
Good luck,
Rowdy
PS: Waar was je afgelopen donderdag op de SAP Partner Dag? Behoorlijk interessante/leerzame sessie smiddags met betrekking tot de SDK...

Similar Messages

  • Link button in a grid column

    hi friends,
    I am trying to insert a link button in my grid (column1)
    I created  a user form with a grid.
    Now in that grid (first column) i want to insert a link button,which will call a system form(like sales order screen)
    i'm pasting piece of code (vb.net)related to my grid
    so plz send me code how to get link button in my grid and where i can insert that code
    ' Add a Grid item to the form
            oItem = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID)
            ' Set the grid dimentions and position
            oItem.Left = 20
            oItem.Top = 100
            oItem.Width = 520
            oItem.Height = 300
            ' Set the grid data
            oGrid = oItem.Specific
            oForm.DataSources.DataTables.Add("MyDataTable")
            oForm.DataSources.DataTables.Item(0).ExecuteQuery("select DocNum from [@SALCO_H]")
            oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable")
            ' Set columns size
            oGrid.Columns.Item(0).Width = 50
            'oGrid.Columns.Item(1).Width = 60
            'oGrid.Columns.Item(2).Width = 130
            ' Get the added form object by using the form's UID
            oForm = SBO_Application.Forms.Item("frmGrid")
    Thanks & Regards
    SARAN

    Thenks for u r reply , i gone through that link it is helpful for me but still i have a problem,
    now i'm getting linkbutton but it is not performing any function,though i gave the code for that link button and related screen id like <b>2</b> for business partner or like <b>bplist</b>
    and <b>one more problem</b> i was facing with grid is
    i created a grid in my user screen and i want to get the <b>form settings</b> for that grid(if i click <b>(tools--->form settings)</b>.then it display form settings screen for perticular userscreen.
    is it possible to get form settings for a screen having grid
    Thanks & regards
    SARAN

  • Link button in data grid

    hi
    Can anyone tell me why the click action is not working when
    the link button is placed in datagrid.
    <mx:DataGridColumn dataField="edit" headerText="">
    <mx:itemRenderer>
    <mx:Component>
    <mx:LinkButton label="edit" click = "click1();">
    </mx:LinkButton>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    even if button is placed in the datagrid it is not working.

    When you use the <mx:Component> tag you create a new
    scope. Its as if all of the content of the <mx:Component>
    were in another file. If you used a separate file for your renderer
    you wouldn't expect click() function to be recognized, right?
    You can modify your renderer like this to make it work:
    <mx:LinkButton label="edit" click =
    "outerDocument.click1();">
    Another option is to take advantage of the bubbling feature
    of the click event. Instead of putting the click handler on the
    LinkButton, put it on the DataGrid itself. Any click on the
    DataGrid will then trigger the event handler.
    The drawback to that is that EVERY click will call the event
    handler - either the LinkButton's click on a click on the header.
    Your event handler just has to examine the event data to determine
    what control originated the event.
    In this case, using outerDocument.click() is far easier, but
    you might need the bubbling property of the event at some point in
    the future.

  • Link Button In Grid or Matrix ?

    Hello,
    I'm trying to populate a grid with data from a SQL query, using a datatable datasource, but I don't know how to specify which fields are to have drill-down(link buttons). After looking at this thread :
    Linked button in a Grid (SBO 2005)
    I'm left wondering how the Business One Report Generator can generate a grid with link buttons attached to the appropriate fields, when it is only given a SQL query.
    I'm thinking I might have to use a matrix, but how can i populate the matrix when if i don't know what the SQL query will be in advance?, also can I achieve the grouping using a matrix that the grid automatically does ?

    Hello Welch,
    Both Matrix and Grid can work with LinkButton. And regarding Grid, first of all, you need to define the gridcolumn type as gct_EditText, then in EditTextColumn Object, there is a property named LinkedObjectType, please set the property as in Matrix column.
    ' First define the column as EditText type
    oCol = oGrid.Columns.Item("Col1")
    oCol.LinkedObjectType = 4
    Hope this helps,
    Nick

  • Link Button to UDO in my Grid

    hi,
    is ther a way to implement a link button im my Grid Column and bind it to an existing UDO ?
    I'm using SBO 2007A SP00 PL37.
    the following code, shows the link button and links to an item
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    i tried to link to my udo by the following but without success:
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = "UDO_VM_CONTRACT"
    I'm looking for a way of direct linking. Now i try to do the following workaround, but maybe there is a better way to solve this problem:
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                            If pVal.BeforeAction = False Then
                                BubbleEvent = False
                                moSboApplication.ActivateMenuItem("VmContract")
                            End If
    best regards
    Markus
    Edited by: Markus Rewak on Jul 10, 2008 11:11 PM
    Edited by: Markus Rewak on Jul 10, 2008 11:12 PM

    Hi Madhu,
    the udo object type is not working. To get the drill down functionality you have to use the item-object (4) and catch the matrix link pressed event and search the udo by your own logic.
    ' Add a link button to a column
            oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                                If pVal.ColUID = "Vnr" And pVal.BeforeAction = True Then
                                    BubbleEvent = False
                                Dim sLink As String
                                Dim oGrid As SAPbouiCOM.Grid
                                oGrid = oForm.Items.Item("Gcont").Specific
                                oGrid.DataTable = oForm.DataSources.DataTables.Item("DTcont")
                                sLink = oGrid.DataTable.GetValue(0, pVal.Row)
                                moSboApplication.ActivateMenuItem("VMarkus")
                                moSboApplication.Forms.ActiveForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                moSboApplication.Forms.ActiveForm.ActiveItem = "txtdocnum"
                                moSboApplication.Forms.ActiveForm.Items.Item("txtdocnum").Specific.value = sLink
                                moSboApplication.Forms.ActiveForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                                End If
                    End Select
    This works very well.
    have fun
    Markus

  • Link button to User Defined Object in Grid

    Hi,
    I'm using SAP B1 8.81 with B1DE.
    I have added a grid which is populated from a DataTable to a form.
    One of the columns in the grid contains the DocEntry of a User Defined Object.
    How can I display a link button on the grid ?
    Regards,
    Ben

    Hello Ben,
    You need to set the column object type.
    Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific
    oGrid.Columns.Item("DocEntry").Type = BoGridColumnType.gct_EditText
    Dim oEditCol As SAPbouiCOM.EditTextColumn = oGrid.Columns.Item("DocEntry")
    oEditCol.LinkedObjectType = "2" 'The SDK documentation says you should use the value 0, but in previous versions it didn't work, so I recommend you user a value other than -1 or 0
    You then need to catch the et_MATRIX_LINK_PRESSED event and other your user form...
    From the SDK Help File regarding the BoLinkedObjectType enum
    lf_None -1 No target object
    lf_UserDefinedObject 0 User-defined object
    lf_GLAccounts 1 G/L account object
    lf_BusinessPartner 2 Business Partner object
    lf_Items 4 Item object
    lf_SalesEmployee 53 Sales employee object
    Regards,
    Vítor Vieira

  • How to add linked button in grid?

    Hi,
    Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works.
    Thanks a lot!
    P.S. For some reason, i can't use matrix because the data is from a SQL query.
    Lan

    Hi,
    as far as I know it is not possible, since this adjustment is made for the whole column. I have created a grid and I open the shown document by double clicking the row header. In the grid I can see if it is sales or purchase and so I use a workaround by opening the specific system form (e.g. sales invoice) in find mode and search the document by document number (also shown in the grid).
    Sample:
    oSBOapp.ActivateMenuItem("2053"); //sales invoice
    oForm = oSBOapp.Forms.ActiveForm;
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("8").Specific;
    oEdit.Value = Convert.ToString(dNum);
    oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    By the click event, you get the specific row number. Hope it helps...
    Regards
    Sebastian

  • Link button in grid column to UDO

    Hi,
    I read through the posts regarding linking to user-defined objects, but I found it very confusing.  Some posts say that it is not possible to create a link button to a UDO; others say you need to use the extended-object property. 
    Does anyone have code that I could use to designate a grid column as a link to a UDO?
    The code I'm using is:
    oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
    txtColumn = oGrid.Columns.Item(1)
    txtColumn.Width = 83
    txtColumn.LinkedObjectType = ???
    I need to fill in the "???".
    If I designate an SAP B1 object type it works.
    Thanks,
    Mike

    Rasmus,
    Thanks for taking the time to provide a detailed explanation.  I think though that SAP needs to solve these kinds of problems.  It is my understanding that the main design goal of Business One is to provide an infrastructure that would reliably enable customization around it.  There is no such thing as accounting software that does not need some kind of adaptation to make it work for specific kinds of business models.  So a design that makes customization easier makes a great deal of sense. 
    If it is necessary to improvise in order to do what you need, then this design goal has not been met.  It also means that Business One is not what is managing the process because you are effectively going around it.  This in my view is actually worse than if Business One made these links work.  By forcing us to go around it, we effectively loose the data protection that Business One should be providing.  This is my take on it anyway.
    We solved the problem by opening the appropriate form with the appropriate data in it by using the double-click event.  The reason we have to do it this way is because the SDK will not even display the link button in a grid if its target is a UDO.  This brings up another reason for the SDK to be more cooperative with these efforts.  SAP has provided a detailed document describing the need to not deviate from Business One’s look and feel.  Perhaps SAP needs also to provide an SDK that more reliably and easily enables that caveat.
    If Business One had been designed from the ground up using SOA, its original design goal would be a lot easier to meet.  Maybe this is the real problem.
    Thanks,
    Mike

  • Link button on Grid

    Hi everybody:
       Just I'd like to know if I can have a link button in a grid object, such as it exists in the matrix object, an how i can get it.
       Thanks in formward
      Regards.
      Misael Reséndiz.

    Misael,
    If you use the Search feature in this forum on "link button on grid", you should find many helpful posts such as this one ...
    Link button in Grid
    Eddy

  • SP01 PL03: Click on Grid Link button, add-on disconnected error occured

    Hi Frank,
    I upgrade my add-on to SP01, there is an error when click Link button which in a UDT bound grid, the error shows 'System Message' with three option buttons, [Restart Add-on],[Log off the current company] and [Continue working without this Add-on], this error does not occur on SAP 2005 PL7,PL8, PL9 & PL10, but occurred on SP01 and SP01 PL03.
    The grid Link button link to master like BP, G/L Accout and Item.
    Hope there is a workaround way.
    Thanks.

    What version / PL was your Add-On compiled with before?
    Was it done with 2005A SP00 PL?? ?
    Anyway, I am happy to hear that it works now...
    regards,
    Frank

  • Link Button In Grid

    Hai To All,
                 Iam creating reports for my module. For that iam using grid to  display the fields. Now my issue is i want to place the link button(Orange arrow) for specific fields.
    For Example,
    For Supplier Code iam placing the following code so that i can able to get view the link button and if i click i can able to open the Business Partner.
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = 2
    Similar to that i want to create link button for my user defined screen that is my screen.I registered as UDO as "PI_UDO"
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = "PI_UDO"
    If i give "PI_UDO" as my linked object it is not accepting.No error display also....
    If i use none option for linked button,
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = -1
    I cant able to view the link button......
    Weather we can able to create link button for our screen???
    In Forum someone told that we can....But some told as cannot??
    What is the solution for this???
    Its an urgent requirement can anyone help me.......
    Regards,
    Anitha
    Edited by: ani nazir on Jul 30, 2008 11:06 AM

    Thanks Petr,
    If i use like that i can able to open the screen but there is an error
    "No Matching Records found in Business Partner"
    In Matrix Item Link press event i made bubbleevent=false
    Regards,
    Anitha

  • Linked Button in Grid

    Is it possible to have a linked button (drill down) in a gird object?

    Hi,
    Can you put this code too:
    SAPbouiCOM.EditTextColumn oEditCol;
    oEditCol = ((SAPbouiCOM.EditTextColumn)(oGrid.Columns.Item("Column Name")));
    oEditCol.LinkedObjectType = "X";
    For example, in C# :
    SAPbouiCOM.EditTextColumn oEditCol;
    oEditCol = ((SAPbouiCOM.EditTextColumn)(oGrid.Columns.Item(0)));
    oEditCol.LinkedObjectType = "2";

  • Buttons in ALV Grid cell need focus to be clicked :-(

    Hi,
    I have an ALV Grid with single cells displayed as buttons (dependend on the data in the corresponding row). Unfortunatelly the button-cells need focus to be clicked. So you need two clicks: one to get the focus to the desired cell and one to really click the button.
    Any ideas how to make this work with one single click ? (Setting a hotspot does not work, cause hotspots have the same problem.)
    Regards,
    Tobi

    Hello Tobias
    The proposal by Naimesh is valid for CL_GUI_ALV_GRID, too. You may have a look at sample report ZUS_SDN_ALVGRID_EVENTS_HOTSPOT. Put the focus on any non-button cell and next click on any customer button.
    *& Report  ZUS_SDN_ALVGRID_EVENTS_HOTSPOT
    *& Thread: Buttons in ALV Grid cell need focus to be clicked :-(
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1009251"></a>
    REPORT  zus_sdn_alvgrid_events_hotspot.
    DATA:
      gd_okcode        TYPE ui_func,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid.
    DATA:
      go_table              TYPE REF TO cl_salv_table,
      go_grid_adapter       TYPE REF TO cl_salv_grid_adapter.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    PARAMETERS:
      p_bukrs      TYPE bukrs  DEFAULT '2000'  OBLIGATORY.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender,  " grid instance that raised the event
          handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
            IMPORTING
              es_col_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    *   define local data
        DATA:
          ls_knb1     TYPE knb1,
          ls_col_id   TYPE lvc_s_col.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CASE e_column_id-fieldname.
          WHEN 'KUNNR'.
            SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
            SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          WHEN 'ERNAM'.
    *        SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
    *        NOTE: no parameter id available, yet simply show the priciple
            CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
    *       do nothing
        ENDCASE.
    *   Set active cell to field BUKRS otherwise the focus is still on
    *   field KUNNR which will always raise event HOTSPOT_CLICK
        ls_col_id-fieldname = 'BUKRS'.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
            is_row_id    = e_row_id
            is_column_id = ls_col_id.
      ENDMETHOD.                    "handle_hotspot_click
      METHOD handle_button_click.
    *   define local data
        DATA:
          ls_knb1     TYPE knb1.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX es_row_no-row_id.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
        SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
        CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
      ENDMETHOD.                    "handle_button_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    **  TRY.
    **      CALL METHOD cl_salv_table=>factory
    ***      EXPORTING
    ***      LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
    ***      R_CONTAINER    =
    ***      CONTAINER_NAME =
    **        IMPORTING
    **          r_salv_table   = go_table
    **        CHANGING
    **          t_table        = gt_knb1.
    **    CATCH cx_salv_msg .
    **  ENDTRY.
    **  go_table->display( ).
    **  go_table->get_metadata( ).
    **  EXIT.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent = cl_gui_container=>screen0
          ratio  = 90
        EXCEPTIONS
          OTHERS = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent = go_docking
        EXCEPTIONS
          OTHERS   = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_hotspot_click FOR go_grid1,
        lcl_eventhandler=>handle_button_click  FOR go_grid1.
    * Build fieldcatalog and set hotspot for field KUNNR
      PERFORM build_fieldcatalog_knb1.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        CHANGING
          it_outtab       = gt_knb1
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog_knb1 .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT gt_fcat INTO ls_fcat
              WHERE ( fieldname = 'KUNNR'  OR
                      fieldname = 'ERNAM'  OR
                      fieldname = 'BUKRS' ).
        IF ( ls_fcat-fieldname = 'BUKRS' ).
          ls_fcat-style = cl_gui_alv_grid=>mc_style_button.
          " column appears as button
        ELSEIF ( ls_fcat-fieldname = 'KUNNR' ).
          ls_fcat-style = cl_gui_alv_grid=>mc_style_button.
          ls_fcat-hotspot = abap_true.
        ELSE.
          ls_fcat-hotspot = abap_true.
        ENDIF.
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG_KNB1
    Regards
      Uwe

  • How to use a link button in a matrix

    Hi, I'm trying to create a matrix with a column that uses a link button to call a Sales order.. how can i do it? i'm new in SBO!

    Hi,
    You can do it in 2 differents ways:
    1. With the ScreenPainter. Set the column property "Type" with the value "et_LINK_BUTTON" and the property "LinkObjectType" with the value of the Business Object (for Sales Orders, the value is "17").
    2. Directly on the XML file. You can see and example below.
    <column uid="col" type="116" title="Parte" description="" visible="1" AffectsFormMode="0" width="55" disp_desc="0" editable="1" right_just="0" val_on="" val_off="" backcolor="-1" forecolor="-1" text_style="0" font_size="-1">
          <databind databound="1" table="" alias="col"/>
    <ExtendedObject linkedObject="17" LinkedObjectType="17"/>*
    </column>
    The most important things are the properties "type" (116 for linked button) and "linkedObject" and "LinkedObjectType" (17 for Sales Orders).
    I hope this can help you.
    Regards,
    Cristian Rivero

  • Delete Last Row in Matrix on SBO 2005

    Hi,
    Im using SAPB1 2005 SP1 with B1DE.
    I've seen a post that indicates that the following code should delete a row from a matrix (even the last row) when using SBO 2005
    I still find that all rows except last row of matrix are removed from the database.
    <b>How do I delete the last row from the Del button event handler????</b>
    I'm using
    <i>        [B1Listener(BoEventTypes.et_CLICK, false)]
            public virtual void OnAfterClick(ItemEvent pVal)
                bool ActionSuccess = pVal.ActionSuccess;
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                Item item = form.Items.Item("del");
                Button button = ((Button)(item.Specific));
                // ADD YOUR ACTION CODE HERE ...
                int row;
                Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
                DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
                row = oMtx.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                oMtx.DeleteRow(row);
                if (oMtx.RowCount == 0)
                    oDBDS.RemoveRecord(0);
                if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
                    form.Mode = BoFormMode.fm_UPDATE_MODE;
                }</i>

    Hi Ben,
    [B1Listener(BoEventTypes.et_CLICK, false)]
    public virtual void OnAfterClick(ItemEvent pVal)
    bool ActionSuccess = pVal.ActionSuccess;
    Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
    Item item = form.Items.Item("del");
    Button button = ((Button)(item.Specific));
    // ADD YOUR ACTION CODE HERE ...
    int row;
    Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
    DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
    Rest of your code will remain same.
    I am making the modification here. I am using the RowCount property that gives me the address of the last row of the matrix.
    <b>row = oMtx.RowCount;</b>
    Every time this will return you the last row and that row will be deleted.
    <b>row = oMtx.RowCount;</b>
    oMtx.DeleteRow(row);
    if (oMtx.RowCount == 0)
    oDBDS.RemoveRecord(0);
    if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
    form.Mode = BoFormMode.fm_UPDATE_MODE;
    Regards,
    Prashant

Maybe you are looking for

  • Photoshop (12) editor doesn't work in iPhoto?

    In advanced preferences in iPhoto I indicated photos were to be edited in Photoshop Elements (12) Editor yet when I highlight a photo in iPhoto and hit edit nothing happens - I don't go to the edit function in Photoshop or in iPhoto.  I want to file

  • Is TM in Snow Leopard Compatible Excel 2004?

    I had a problem upgraded from Leopard to Snow Leopard this weekend that required me to execute PRAM. Now that I have got it done I can't preview Excel files in Time Machine. I can preview .pdf files and I can restore Excel files but when I click on a

  • Query on time stamp

    Hi, suppose that i have region and sales columns and prompt column as month. if i select a prompt the corresponding sales will now along with tha i want sales from starting of the year. let us consider prompt value is 5-11-2010 then i want sales valu

  • Create Language specific text for Service MAster

    Hi All, Can Someone help me to maintain language dependent text for Service Master. I need to maintain it for different languages. Regards, Smita

  • Problem with Re Activation

    Does anyone still use Adobe 7 Pro?