Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calling a JS function from iterator .

Hi All,

How can i call a function written in a page fragment of a BSP application , in the iterator used in the same BSp application. I tried as follows but getting JS error:

Iterator code:

DATA: o_fr TYPE REF TO cl_bsp_find_and_replace,
       o_ip TYPE REF TO cl_htmlb_inputfield,
       o_bee  TYPE REF TO cl_bsp_bee_table.
  DATA: find TYPE string.
  DATA: replace TYPE string.
  DATA: rowno TYPE string ,
        columnno TYPE string ,
        tvid TYPE string .
  CLEAR: find, replace .
WHEN 'DATE' .
find = '<input' .
replace = `< i n p u t   o n c h a n g e = " i s a d a t e ( ) " ` .







 o_fr = cl_bsp_find_and_replace=>factory( find = find
                                                        replace = replace
                                                          mode =  `FIRST_OCCURRENCE` ).



        o_ip = cl_htmlb_inputfield=>factory( id = p_cell_id type = 'date' showhelp = 'X').

        o_ip->value = m_row_ref->date.

        CREATE OBJECT o_bee.
        o_bee->add( level = 1 element = o_fr ).
        o_bee->add( level = 2 element = o_ip ).
        p_replacement_bee = o_bee.

      ENDIF.

The function isadate is written in a page fragment in the same BSP application.

Thanks,

Anubhav.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question