cancel
Showing results for 
Search instead for 
Did you mean: 

ToolBar Event OpenPopUp() How to find the Javascript?

Former Member
0 Kudos

Hello,

In the Toolbar at BP_HEAD (Overview) there is a button for the PDF Fact Sheet.

The Button-on_client_click = 'OpenPopUp()'.

As far as I understood -> this is a Javascript event/function somewhere in /bc/bsp/sap/bsp_wd_base/bspwdpopupscripts.js

(The sourcecode of the generated HTML Page points to this)

HOW can I have a look into this Javascript?

Or how to debugg this Event?!

Or is "ls_button-page_id = me->component_id." pointing to the Service of the PDF Fact sheet?

Any help is highly recommended...

Thanks

/Chris

PS: the Sourcecode of the whole Toolbar...


   IF lr_partner IS BOUND AND lv_enabled = abap_true.
        lr_partner->get_property_as_value( EXPORTING iv_attr_name = 'BP_GUID'"#EC NOTEXT
                                           IMPORTING ev_result    = lv_partner_guid ).
        IF lv_partner_guid IS NOT INITIAL.
*       ICF handler class prepares java script
          CALL METHOD cl_crm_afs_print=>get_url
            EXPORTING
              iv_object   = lv_object
              iv_key      = lv_partner_guid
              iv_role     = lv_business_role
              iv_language = sy-langu
              iv_form     = ' '     "read from customizing
              iv_format   = lv_format
            IMPORTING
              ev_url      = lv_url.
          IF lv_url IS INITIAL.
            lv_enabled = abap_false.
          ELSE.
            lr_cuco_head ?= get_custom_controller( 'BP_HEAD/Lifecycle' )."#EC NOTEXT
            IF lr_cuco_head IS BOUND.
*              CONCATENATE '"' lv_url '"' INTO lr_cuco_head->gv_preview_url.
              lr_cuco_head->gv_preview_url = lv_url.
            ENDIF.
          ENDIF.
        ENDIF.
        ls_button-text  = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BP/BP_PDF' )."#EC NOTEXT
        ls_button-tooltip  = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BP/BP_FS_PREVIEW' )."#EC NOTEXT
*        ls_button-on_click = 'PREVIEW'.
        ls_button-on_client_click = 'OpenPopUp()'.          "#EC NOTEXT
        ls_button-page_id  = me->component_id.
        ls_button-enabled = lv_enabled.
        ls_button-icon_src = '/sap/bc/bsp/sap/crm_ppm/w_pdf__s.gif' ."#EC NOTEXT
        APPEND ls_button TO rt_buttons.
        CLEAR ls_button.
      ENDIF.
    ENDIF.
  ENDIF.

From ...

Accepted Solutions (0)

Answers (2)

Answers (2)

sumit_mittal2
Active Contributor
0 Kudos

Hi Chris,

This funcion is the result of browser event (onClientlclick), which will be called immidiately in the browser before server round trip happens.

you can find the code of this function OpenPopup() in the BP_HEAD/AccountDetails html, from here you can debug and analyze what's happening in the application.

Hope this will help.

Cheers,

Sumit Mittal

Former Member
0 Kudos

Chris, Did you find out how to edit this java script?.

I need to look at the code as I suspect it accesses table CRMV_PRN_CONTROL, looking for a particular Role and it identifies the Smartform for the PDF Factssheet and the Class/interface. We have TWO PDF factsheets displayed on the 'More' tab on the Account screen and need to therefore have two Smartforms/interfaces per Role. This is not possible due to the keys of this table, so we may need to point it to a Ztable when the PDF form option is chosen.

Therefore I might need to change the code in the Java script OpenPopUp() if that's where this table lookup takes place.

Almost 300 reads of this posting and no comments made. That's unusual.

Jason