Skip to Content
avatar image
Former Member

Create PushButton.

Hi,

Is it possible to create push button for a field in table view in SAO CRM WEBUI?

Suppose tableview contains the fields Action, Cat Description, Date.

Now I want to put pushbutton for "Action" field for all the records in the table view.

Is it POssible.

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 13, 2010 at 02:46 PM

    Hi,

    yes it is possible to have buttons on top of an assignmentblock and it is also possible to have buttons on each line of the table.

    Please specify your requirement a bit more and we will try to help you.

    Kind regards

    Manfred

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 13, 2010 at 03:40 PM

    Hi Manfred,

    Thank you verymuch for your reply.

    My scenario is like this.

    I have a table view with the following fields Action, Cat Description, Date. These fields will get populated from Z-table.

    For Action field there are two values Run, Assess. For Action field I want to create pushbutton(Coloumnwise for all records).

    Regards,

    Pushpa

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Pushpa,

      if you want to work with all records in the tableview i recommend one button on top of the table assignmentblock.

      1. Create in the IMPL Class one new attribute GT_BUTTON (instance public) from type CRMT_THTMLB_BUTTON_T.

      2. Redefine "do_prepare_output" to code your button, see example:

      method DO_PREPARE_OUTPUT.
      
        DATA: ls_button  TYPE crmt_thtmlb_button.
      
        CALL METHOD super->do_prepare_output.
      
        DATA: lr_profile TYPE REF TO IF_CRM_UI_PROFILE,
                lv_profile_type TYPE CRMT_UI_PROFILE_TYPE,
                lr_uiu_channel_aspects TYPE REF TO object.
      
        lr_profile = cl_crm_ui_profile=>get_instance( ).
        lv_profile_type = lr_profile->get_profile_type( ).
      
        CASE lv_profile_type.
          WHEN if_crm_uiu_channel_aspects=>gc_profile_TYPE_UIU.
            IF gt_button IS INITIAL.
      *   here the name of the button and the event is determine
              ls_button-type     = cl_thtmlb_util=>gc_icon_new.
              ls_button-on_click = 'NEW'.
              ls_button-enabled = abap_true.
              APPEND ls_button TO gt_button.
              CLEAR ls_button.
      
            ENDIF.
        ENDCASE.
      
      endmethod.

      3. Go to the .htm page and add some lines like this:

      <thtmlb:areaFrameSetter toolbarButtons  = "<%= controller->gt_button %>"
                              maxButtonNumber = "1" />

      4. No create the eventhandler you have coded in ls_button-on_click and create your coding for the button click there.

      Good luck.

      Kind regards

      Manfred

  • avatar image
    Former Member
    Sep 14, 2010 at 05:12 PM

    Hi,

    I need to create pushbutton for every record in tableview but not on the top. Is it not possible?

    Regards,

    Add comment
    10|10000 characters needed characters exceeded