cancel
Showing results for 
Search instead for 
Did you mean: 

ON_CLIENT_CLICK for link in assignmentblock table

Former Member
0 Kudos

Hello,

on the header of opportunities we have an own button which opens the corresponding record in SAP recordsmanagement with


    ls_button-text     = 'Presales-Akte'(001).
    ls_button-type     = cl_thtmlb_util=>gc_icon_foldershortcut.
    ls_button-tooltip  = 'Presales-Akte'(001).
    ls_button-page_id  = me->component_id.
    ls_button-enabled  = lv_enable.
    ls_button-on_client_click = 'OpenRMPopUp()'.

In the table assignmentblock of opportunities BP_BPBT/AccountOpportunitiesOV i want to have for each line an icon which does the same.

I already realised the icon with link to an eventhandler.

But i don´t know how to call this "on_client_click" inside of the eventhandler.

Could one of you experts please assist?

Thanks a lot.

Best regards

Manfred

Accepted Solutions (1)

Accepted Solutions (1)

CarstenKasper
Active Contributor
0 Kudos

Hello Manfred,

if it is OneClickActions you are talking about it is not possible without modification.

cheers Carsten

Former Member
0 Kudos

Hi Carsten,

it is not a real oneclickaction in terms of CRM.

It is just a link in one table column which calls at the moment an eventhandler.

Any idea for my requirement?

Thanks a lot.

Kind regards

Manfred

arne_husemann
Explorer
0 Kudos

Hey Manfred,

i would give the table iterator a try. You can use it to add standard htmlb buttons to a table.

The button in turn has the desired attribute onclientclick.

Regards, Arne

Former Member
0 Kudos

Hello Arne,

could you please describe a bit more how to add standard htmlb buttons to a table?

Or could you provide an example?

Thanks a lot.

Kind regards

Manfred

arne_husemann
Explorer
0 Kudos

Hey Manfred,

first you need an implementation of IF_HTMLB_TABLEVIEW_ITERATOR.

In method RENDER_CELL_START you need some code like this:

 
  case p_column_key.
    WHEN 'COLUMNOFINTREST'.
      p_replacement_bee = cl_htmlb_button=>factory(
      id = '123'
       text     = 'Presales-Akte'
      tooltip  = 'Presales-Akte'
      onclientclick = 'myfunction()'
      ).

.

The table of intrest has to know the iterator, you have to reference it using the attribute iterator in the html part of your component. In the BSP forum are lot of threads about the usage of a table view iterator.

Regards, Arne

Answers (0)