Button's Event Handler Method not getting triggered
To add a button I have written the following code:
clear ls_button.
l_import = 'Mass Upload'.
l_enabled = 'X'.
clear ls_button.
ls_button-on_click = 'UPLOAD'. "IMPORT FILE
ls_button-text = l_import.
ls_button-enabled = l_enabled.
INSERT ls_button INTO rt_buttons INDEX 5.
Created a new Event Handler method for it and wrote the following code:
gr_file_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'ZSRQM_INCID_H/FileUploadwindow'
iv_usage_name = 'ZCufileupload'
iv_title = l_title ).
gr_file_popup->set_on_close_event( iv_view = me iv_event_name = 'upload' ).
gr_file_popup->open( ).
When i run in th component in debug mode,my event is not getting triggered.
Please suggest.
Regards
Najam
Try the following code in first part...
clear ls_button.
l_import = 'Mass Upload'.
clear ls_button.
ls_button-on_click = 'UPLOAD'. "IMPORT FILE
ls_button-text = l_import.
ls_button-page_id = me->component_id.
ls_button-enabled = abap_true.
INSERT ls_button INTO rt_buttons INDEX 5.
Similar Messages
-
Event Handler is not getting trigger for Freely Programmed search help
Hi All,
I am having a component comp1 defined for value help with one event. In component comp2 i want to call the comp1 but the event handler which i have created is not getting triggered. Any reasons for it.
Thanks
RaghavendraHi Kumar,
Please check these forum threads.
Re: Help required on Freely Programmed Input help
Re: Custom search help -
Event Handler is not being triggered- 11G Release2
Hi all,
I developed a postprocess event handler which I am expecting to be triggered when my custom task for trusted reconciliation run. I have deployed my event handler using plugin registration utility. I put a static block in my class to see if my class iz being initialized. I see that iti is initialized but event handler is never triggered (execute method is never called). Why it is not triggered? Any help is strongly appreciated... Below is my configuration for the event handler..
<?xml version='1.0' encoding='utf-8'?>
<eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel/orchestration-handlers.xsd">
<action-handler class="com.tcmb.iam.plugin.eventhandler.PostProcessEventHandler"
entity-type="User"
operation="ANY"
name="PostProcessEventHandler"
stage="postprocess" order="1002"
sync="TRUE"/>
</eventhandlers>
<?xml version="1.0" encoding="UTF-8"?>
<oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
<plugin pluginclass=
"com.tcmb.iam.plugin.eventhandler.PostProcessEventHandler"
version="1.0"
name="PostProcessEventHandler">
</plugin>
</plugins>
</oimplugins>
Tahnaks in advance,
BR
ALİYEHi Nayan,
I have cheked the plugins table and my plugin is in there.Thenchecked mds_paths table I have four records there (I have deployed and undeployed few times) wich are as follow:
path element name
http://www.oracle.com/schema/oim/platform/kernel action-handler
http://www.oracle.com/schema/oim/platform/kernel action-handler
http://xmlns.oracle.com/schema/oim/platform/kernel eventhandlers
http://www.oracle.com/schema/oim/platform/kernel eventhandlers
Which schema is corrent? Is there something wrong with these records that causes my handler to do not trigger ?
Thanks a lot
BR
Aliye -
Error handling workflow not getting triggered
Hi all,
I'm creating a outbound IDoc. And for error handling workflow.. I created a organization structure in PPOME and assigned users. I gave this position number thus created in the partner profile in post processing permitted agent tab.
But when the Idoc is in error, this is not coming to my inbox.
Can someone please help me with this.. and let me know what went wrong.
Thanks in advance.Here you need to be careful,
if the agent assignment is not maintained properly, there may be a chance everyone in the organization will get the item.
I hope you have created a single workitem for error handling. goto additional data-> agent assignment-> maintain. make sure the attribute is defined as general forwarding allowed. or you maintain the role/position/user/whatever.as the possible agents. still you dont get the result, debugging the default rule in the task ->default rule -> agent.
hope this helps.
with regards,
Sudhahar R -
in the code my event subtot_text is not getting triggered .... any solution plz
REPORT zver_alv_basic.
TYPE-POOLS slis.
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
netwr LIKE vbap-netwr,
END OF itab.
DATA: fcat TYPE slis_t_fieldcat_alv,
wa_fcat TYPE slis_fieldcat_alv,
i_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
i_event TYPE slis_t_event.
SELECT vbeln
posnr
matnr
netwr
FROM vbap
INTO TABLE itab
UP TO 30 ROWS.
I_SORT-FIELDNAME = 'POSNR'.
I_SORT-TABNAME = 'ITAB'.
I_SORT-UP = 'X'.
I_SORT-SUBTOT = 'X'.
APPEND I_SORT.
Perform to populate ALV event
PERFORM sub_get_event.
To prepare field catalog
PERFORM sub_field_catalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
it_fieldcat = fcat
it_events = i_event
it_sort = i_sort[]
TABLES
t_outtab = itab.
*& Form SUB_FIELD_CATALOG
FORM sub_field_catalog .
PERFORM sub_fill_alv_field_catalog USING:
'01' 'VBELN' 'ITAB' 'VBELN' 'VBAP' ,
'02' 'POSNR' 'ITAB' 'POSNR' 'VBAP' ,
'03' 'MATNR' 'ITAB' 'MATNR' 'VBAP' ,
'04' 'NETWR' 'ITAB' 'NETWR' 'VBAP' .
ENDFORM. " SUB_FIELD_CATALOG
*& Form SUB_FILL_ALV_FIELD_CATALOG
FORM sub_fill_alv_field_catalog USING p_rowpos
p_fldnam p_tabnam p_ref_fieldname p_ref_tabname .
wa_fcat-col_pos = p_rowpos.
wa_fcat-fieldname = p_fldnam .
wa_fcat-tabname = p_tabnam .
wa_fcat-ref_fieldname = p_ref_fieldname .
wa_fcat-ref_tabname = p_ref_tabname.
IF P_FLDNAM = 'NETWR'.
wa_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_fcat TO fcat.
CLEAR wa_fcat.
ENDFORM. " SUB_FILL_ALV_FIELD_CATALOG
*& Form SUB_GET_EVENT
FORM sub_get_event .
DATA: wa_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event.
READ TABLE i_event INTO wa_event
WITH KEY name = 'SUBTOTAL_TEXT'.
IF sy-subrc = 0.
MOVE 'SUBTOT_TEXT ' TO wa_event-form.
MODIFY i_event FROM wa_event INDEX sy-tabix.
ENDIF.
ENDFORM. " SUB_GET_EVENT
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtot_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'VBELN'.
p_subtot_text-display_text_for_subtotal
= 'VENDOR level total'(009).
ENDIF.
Plant level sub total
IF p_subtot_text-criteria = 'POSNR'.
p_subtot_text-display_text_for_subtotal = 'POSNR level total'(010).
ENDIF.
ENDFORM. "subtotal_text*& Report ZVER_ALV_BASIC
REPORT zver_alv_basic.
TYPE-POOLS slis.
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
matnr LIKE vbap-matnr,
netwr LIKE vbap-netwr,
END OF itab.
DATA: fcat TYPE slis_t_fieldcat_alv,
wa_fcat TYPE slis_fieldcat_alv,
i_sort TYPE slis_t_sortinfo_alv ,
wa_sort TYPE slis_sortinfo_alv,
i_event TYPE slis_t_event.
START-OF-SELECTION.
SELECT vbeln
posnr
matnr
netwr
FROM vbap
INTO TABLE itab
UP TO 30 ROWS.
wa_sort-spos = '01' .
wa_sort-fieldname = 'VBELN'.
wa_sort-tabname = 'ITAB'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
Wa_sort-spos = '02' .
wa_sort-fieldname = 'POSNR'.
wa_sort-tabname = 'ITAB'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
Perform to populate ALV event
PERFORM sub_get_event.
To prepare field catalog
PERFORM sub_field_catalog.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
it_fieldcat = fcat
it_events = i_event
it_sort = i_sort[]
TABLES
t_outtab = itab.
*& Form SUB_FIELD_CATALOG
FORM sub_field_catalog .
PERFORM sub_fill_alv_field_catalog USING:
'01' 'VBELN' 'ITAB' 'VBELN' 'VBAP' ,
'02' 'POSNR' 'ITAB' 'POSNR' 'VBAP' ,
'03' 'MATNR' 'ITAB' 'MATNR' 'VBAP' ,
'04' 'NETWR' 'ITAB' 'NETWR' 'VBAP' .
ENDFORM. " SUB_FIELD_CATALOG
*& Form SUB_FILL_ALV_FIELD_CATALOG
FORM sub_fill_alv_field_catalog USING p_rowpos
p_fldnam p_tabnam p_ref_fieldname p_ref_tabname .
wa_fcat-col_pos = p_rowpos.
wa_fcat-fieldname = p_fldnam .
wa_fcat-tabname = p_tabnam .
wa_fcat-ref_fieldname = p_ref_fieldname .
wa_fcat-ref_tabname = p_ref_tabname.
IF p_fldnam = 'NETWR'.
wa_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_fcat TO fcat.
CLEAR wa_fcat.
ENDFORM. " SUB_FILL_ALV_FIELD_CATALOG
*& Form SUB_GET_EVENT
FORM sub_get_event .
DATA: wa_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event.
READ TABLE i_event INTO wa_event
WITH KEY name = 'SUBTOTAL_TEXT'.
IF sy-subrc = 0.
MOVE 'SUBTOT_TEXT ' TO wa_event-form.
MODIFY i_event FROM wa_event INDEX sy-tabix.
ENDIF.
ENDFORM. " SUB_GET_EVENT
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtot_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'VBELN'.
p_subtot_text-display_text_for_subtotal
= 'VENDOR level total'(009).
ENDIF.
Plant level sub total
IF p_subtot_text-criteria = 'POSNR'.
p_subtot_text-display_text_for_subtotal = 'POSNR level total'(010).
ENDIF.
WRITE :/ 'cow'.
ENDFORM. "subtotal_text } -
Enhance standard class with event handler method
In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method. The specific example is a new method to handle the event CL_GUI_ALV_GRID->USER_COMMAND.
I notice that the flag called Active has not been ticked - see image below. Perhaps this is the reason why the event handler is not being triggered.
Note that there is an event handler for the same event in the standard class which obviously is executed as expected. Any ideas on limitations in the system or I am missing a step?
Thanks
JohnThank you for your replies.
There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug".
I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.
Cheers,
John -
Repetitive call of event handler method
hi,
i ve some 8 screens with alv grid controls on each...i'm using
same subroutine for event handling for all the controls...the problem
is whenever i navigate from 1 to the other and return back to the same,
after data change, the event handler method is getting called as many times
i ve navigated....for toolbar actions i used befor user command event and
overcame but for data changed i got struck... Plz tel me the reason and how can we avoid.....
Thanks
Swaminathan.Hello Swami
The following sample report shows how to handle the same event for different control instances. The crucial point is to check for the sending control.
* 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. " sending control !!!
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.
CASE sender. " check for the sending control (this is known!!!)
WHEN go_grid1.
READ TABLE gt_customer1 INTO ls_knb1 INDEX e_row_id-index.
MESSAGE 'Do event handling for 1st ALV grid!' TYPE 'I'.
WHEN go_grid2.
READ TABLE gt_customer2 INTO ls_knb1 INDEX e_row_id-index.
MESSAGE 'Do event handling for 2nd ALV grid!' TYPE 'I'.
WHEN OTHERS.
RETURN.
ENDCASE.
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
The sample report contains two screens showing two parts of the selected data (just for demonstration). Please do note that it does not matter at all whether the ALV lists are on the same screen or on different screens or whether they are displayed in subscreens of the same dynpro.
*& Report ZUS_SDN_ALVGRID_EVENTS_4
* Both screens have the same flow logic and do not contain any elements:
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
REPORT ZUS_SDN_ALVGRID_EVENTS_4.
DATA:
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking1 TYPE REF TO cl_gui_docking_container,
go_docking2 TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_customer1 TYPE STANDARD TABLE OF knb1,
gt_customer2 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.
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.
CASE sender.
WHEN go_grid1.
READ TABLE gt_customer1 INTO ls_knb1 INDEX e_row_id-index.
MESSAGE 'Do event handling for 1st ALV grid!' TYPE 'I'.
WHEN go_grid2.
READ TABLE gt_customer2 INTO ls_knb1 INDEX e_row_id-index.
MESSAGE 'Do event handling for 2nd ALV grid!' TYPE 'I'.
WHEN OTHERS.
RETURN.
ENDCASE.
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
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_customer1
WHERE bukrs = p_bukrs
AND kunnr <= '0000300000'.
SELECT * FROM knb1 INTO TABLE gt_customer2
WHERE bukrs = p_bukrs
AND kunnr > '0000300000'.
* Create docking container
CREATE OBJECT go_docking1
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 OBJECT go_docking2
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_docking1
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.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_docking2
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 ALL INSTANCES.
* 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_customer1
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.
CALL METHOD go_grid2->set_table_for_first_display
CHANGING
it_outtab = gt_customer2
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_docking1->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.
CALL METHOD go_docking2->link
EXPORTING
repid = syst-repid
dynnr = '0200'
* 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'.
CASE syst-dynnr.
WHEN '0100'.
SET SCREEN 0. LEAVE SCREEN.
WHEN '0200'.
SET SCREEN 100. LEAVE SCREEN.
ENDCASE.
WHEN 'NEXT'.
SET SCREEN 200. 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' ).
ls_fcat-hotspot = abap_true.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe -
Getter & Setter Method not getting called for a field enhanced through AET
Hello,
I am new to SAP CRM 7.0 and working on a requirement.
A Z-field was added by our functional guy in CRM 7.0 WebGui through AET in the 'Create Opportunity' transaction (Header data).
Now the requirement is, as soon as the opportunity is created through the WebGui, I should post a document in R/3 and paste that document number back to the enhanced Z-field in opportunity.
Work done by me:
I pressed F2 on the enhanced Z-field in the WebGui screen and took the details of view, component name etc. After this I went to normal SAP CRM system and open tcode "BSP_WD_CMPWB", located the corresponding view "BT111H_OPPT/Details" and right clicked & enhanced the same.
Then I opened the structure of this view, expanded context node, located context "BTOPPORTH" and inside this, located my Z-attribute. Now right clicked on the Z-attribute & selected the option "Generate SETTER & GETTER Methods" and these were generated successfully.
Problem:
The problem is even after putting external break points in these methods, these methods are not getting called while creating, modifying & displaying the Opportunity in WebGui.
I hope that for the requirements that I have, I have to do the coding in "Getter & Setter" methods. But since these are not getting called, I am unable to proceed.
Please help/suggest how to achieve this.
Thanks in anticipation.
Best Regards,
Rahul MalaniHi,
If you can see the field in UI and still get_ method is not being triggered then try to regenerate these methods. If it still doesn't work then please look for SAP notes or raise an OSS.
There should be some note for the issue you faced.
please refer:
Help Needed immediately - AET getter setter methods not getting triggered
Regards,
BJ -
View not copied or enhanced with wizard Error while creating Event Handler method in Z Component
Hello Friends,
In one Z Component (Custom Component), in one of the views, while creating event handler, it gave me error message that view not copied or enhanced with wizard.
I am aware that in Standard Component, if we want to create the event handler method then we need to first Enhance the Component and then we need to enhance the view.
But, in the Z Component (Custom Component), how to create event handler method in one of the views as while creating event handler method i am getting view not copied or enhanced with wizard error.Hi,
Add a method in views impl class with naming convention eh_on__* with htmt and html_ex parameters. I dont have have the system right now. Please check any existing event import export parameters.
Check out do handle event method in the same class.
Redefine that method. Call that event method in this handle method. See existing code for reference.
Attach that event to the button on click event in .htm page.
Regards,
Bhushan -
Workflow not getting triggered from webdynpro event
Hello gurus,
I have a requirement in which if an employee changes his own information on the ESS portal, then an approval should be done by HR. For this i created a custom webdynpro application in which i fetch the employee data and check it with old data in one view and when user clicks save button the approval workflow should be triggered.
For this i created a custom BO using transaction SWO1. I added a 'CHANGE' event and 'send_data_to_wf' method.
In SWDD i created the workflow which is working fine when i test it in SWDD only. But when i trigger it using FM 'SWE_CREATE_EVENT', only the event is getting triggered and not the workflow. I checked the trace in transaction SWEL in which i can see the 'CHANGE' event under Event column but Name of Reciever Type column is emty. It should display my custom workflow ID. Please let me know where i m lacking or going wrong.
Regards,
Yayati EkboteHello Ricardo,
Thanks for immediate reply. Yes, the linkage is active in SWE2. My custom object type is ZHRAD and event is change. I also tried the FM 'SAP_WAPI_CREATE_EVENT'. But in this FM the event also doesn't get triggered. Using FM 'SWE_CREATE_EVENT' atleast triggers the event. I debugged the FM. The container inside the FM is remaining initial. I am posting my code which i am using.
DATA: pernr TYPE pa0001-pernr VALUE '40000001'.
DATA: objtype TYPE swr_struct-object_typ VALUE 'ZHRADCHO',
objkey TYPE sweinstcou-objkey,
event TYPE swr_struct-event VALUE 'CHANGE',
it_wfcont TYPE STANDARD TABLE OF swcont,
wa_wfcont TYPE swcont,
event_id TYPE swedumevid-evtid,
ret_code TYPE swedumevid-evtid.
wa_wfcont-element = 'PERNR'.
wa_wfcont-value = '40000001'.
APPEND wa_wfcont TO it_wfcont.
wa_wfcont-element = 'SUBTY'.
wa_wfcont-value = '1'.
APPEND wa_wfcont TO it_wfcont.
wa_wfcont-element = 'ENDDA'.
wa_wfcont-value = sy-datum.
APPEND wa_wfcont TO it_wfcont.
wa_wfcont-element = 'BEGDA'.
wa_wfcont-value = sy-datum.
APPEND wa_wfcont TO it_wfcont.
objkey = pernr.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = objtype
objkey = objkey
event = event
* CREATOR = ' '
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* RECEIVER_COUNT =
TABLES
EVENT_CONTAINER = it_wfcont
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK. -
How to run a dialog's method from a button's event handler?
I've created my first dialog from the samples, but I am having trouble figuring out how to run a method in my dialog from an button's event handler. Can anyone please point me in the right direction?
function CreateDialog()
this.windowRef = null;
CreateDialog.prototype.run = function()
//...declare a bunch of vars
// Create a window of type palette.
var win = new Window("dialog", "Element Spray Generator",[iTop,iLeft,iTop + iWidth,iLeft + iHeight] ); // bounds = [left, top, right, bottom]
this.windowRef = win;
// Add a frame for the contents.
win.btnPanel = win.add("panel", [iPadding,iPadding,iWidth-iPadding,iHeight-iPadding], "");
.... add a bunch of other stuff ...
win.btnAdd = win.btnPanel.add("button", [win.btnRemove.bounds.left - iPadding - iButtonWidth,win.lstImages.bounds.bottom + iSmPadding,win.btnRemove.bounds.left - iPadding,win.lstImages.bounds.bottom + iSmPadding +iTextHeight], "Add");
win.btnAdd.onClick = function() {
//todo implement this
var f = File.openDialog("Open File") ;
win.lstImages.add("item", f.displayName );
this.EnableControls(); //<--- problem is on this line here!!
this.EnableControls(); //<--- this works
// Display the window
win.show();
return true;
CreateDialog.prototype.EnableControls = function (){
var result = true;
result = result && (this.windowRef.ddlPaths.selection != "");
result = result && (this.windowRef.lstImages.items.length > 0);
this.windowRef.btnOK.enabled = result;This may not be the reason, but when using the way I create dialogs 'this' inside of an onClick points to the control.
win.btnAdd.onClick = function() {
//todo implement this
var f = File.openDialog("Open File") ;
win.lstImages.add("item", f.displayName );
this.EnableControls(); //<--- I would expect it to call another function of btnAdd
// this.parent.EnableControls() might be what you want if the control is not in some other container -
Getting error in event handler method onPlugFromStartView
Hi,
I am getting error in event handler method onPlugFromStartView java coding. The error message is u201CThe method wdGetwelcome componentcontroller() is undefined for the IPrivatevieew.
Plese explain how to resolve this error to deploy the webdynpro application successfully.
Thanks,
Kundan.Hi
1.It seems some thing corrupt or some problem .
2. Do one exercise Create one new Dc --component -View ,In component write one method.
a) Open the view and then try to add that component.
Let us know the result
Best Regards
Satish Kumar -
Events in USER objects type not getting triggered in PFCG
Hi,
We need to send some notifications to the concern person at the time of assiging roles to the user . There is an object type USER and has events like created,cloned, deleted, roles_changed. But these events not getting triggered.
I need to trigger the workflow. How do we activate the events as the entry doesnot exits in SWE2 tooo . Is ther any other way?HI munish
If the entry is not in swe2 Put the entry for the business object USER and use the receiver type as your workflow number.
Regards
vijay -
Plugin events not getting triggered
Hello,
APEX version 4.1.0.00.32 and 4.2.3.00.08
Browser: latest version of Chrome browser
I'm trying to include plugin events for the Select2 APEX plugin but facing one rather annoying issue; the dynamic actions based on the plugin events are not getting triggered. These are the steps I have taken:
1. Registered several events with the plugin (e.g. slctchange, slctopen, slcthighlight, etc.). These events are based on the official Select2 documentation.
2. Modified the render function to include event handlers that trigger the appropriate Select2 event.
$("' || l_item_jq || '").on("change", function(e) {
apex.jQuery(this).trigger("slctchange", { val:e.val, added:e.added, removed:e.removed });
$("' || l_item_jq || '").on("select2-opening", function(e) {
apex.jQuery(this).trigger("slctopening");
$("' || l_item_jq || '").on("select2-open", function(e) {
apex.jQuery(this).trigger("slctopen");
$("' || l_item_jq || '").on("select2-highlight", function(e) {
apex.jQuery(this).trigger("slcthighlight", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-selecting", function(e) {
apex.jQuery(this).trigger("slctselecting", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-clearing", function(e) {
apex.jQuery(this).trigger("slctclearing");
$("' || l_item_jq || '").on("select2-removed", function(e) {
apex.jQuery(this).trigger("slctremoved", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-focus", function(e) {
apex.jQuery(this).trigger("slctfocus");
$("' || l_item_jq || '").on("select2-blur", function(e) {
apex.jQuery(this).trigger("slctblur");
I can confirm that the slctchange event (the first event in the list) is working properly both in APEX 4.1 and 4.2. Please note that I had to use apex.jQuery instead of $ to get it to work in 4.1. Might be because I overloaded jQuery in 4.1. Anyway, all others events are not getting triggered for some reason. The event handlers are getting executed for the appropriate event; that's not the problem. I guess the source of the problem lies with the trigger function. It simply doesn't trigger any of my dynamic actions.
To make things even more complicated, it is possible to trigger the events manually in console. So if I execute this statement:
apex.jQuery("#P20_SINGLE_VALUE_NEW").trigger("slctopen");
Then I get back the result from the dynamic action.
I tried a lot of different ways to trigger the plugin event. For example:
$("' || l_item_jq || '").on("select2-open", function(e) {
apex.jQuery(this).trigger("slctopen");
$(this).trigger("slctopen");
apex.jQuery(this).trigger("slctopen.BE_CTB_SELECT2");
$(this).trigger("slctopen.BE_CTB_SELECT2");
apex.jQuery("' || l_item_jq || '").trigger("slctopen");
$("' || l_item_jq || '").trigger("slctopen");
apex.jQuery("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
$("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
Nothing gets triggered...
Can anyone tell me what the problem is here? Thanks in advance.
Best regards,
NickHello,
APEX version 4.1.0.00.32 and 4.2.3.00.08
Browser: latest version of Chrome browser
I'm trying to include plugin events for the Select2 APEX plugin but facing one rather annoying issue; the dynamic actions based on the plugin events are not getting triggered. These are the steps I have taken:
1. Registered several events with the plugin (e.g. slctchange, slctopen, slcthighlight, etc.). These events are based on the official Select2 documentation.
2. Modified the render function to include event handlers that trigger the appropriate Select2 event.
$("' || l_item_jq || '").on("change", function(e) {
apex.jQuery(this).trigger("slctchange", { val:e.val, added:e.added, removed:e.removed });
$("' || l_item_jq || '").on("select2-opening", function(e) {
apex.jQuery(this).trigger("slctopening");
$("' || l_item_jq || '").on("select2-open", function(e) {
apex.jQuery(this).trigger("slctopen");
$("' || l_item_jq || '").on("select2-highlight", function(e) {
apex.jQuery(this).trigger("slcthighlight", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-selecting", function(e) {
apex.jQuery(this).trigger("slctselecting", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-clearing", function(e) {
apex.jQuery(this).trigger("slctclearing");
$("' || l_item_jq || '").on("select2-removed", function(e) {
apex.jQuery(this).trigger("slctremoved", { val:e.val, choice:e.choice });
$("' || l_item_jq || '").on("select2-focus", function(e) {
apex.jQuery(this).trigger("slctfocus");
$("' || l_item_jq || '").on("select2-blur", function(e) {
apex.jQuery(this).trigger("slctblur");
I can confirm that the slctchange event (the first event in the list) is working properly both in APEX 4.1 and 4.2. Please note that I had to use apex.jQuery instead of $ to get it to work in 4.1. Might be because I overloaded jQuery in 4.1. Anyway, all others events are not getting triggered for some reason. The event handlers are getting executed for the appropriate event; that's not the problem. I guess the source of the problem lies with the trigger function. It simply doesn't trigger any of my dynamic actions.
To make things even more complicated, it is possible to trigger the events manually in console. So if I execute this statement:
apex.jQuery("#P20_SINGLE_VALUE_NEW").trigger("slctopen");
Then I get back the result from the dynamic action.
I tried a lot of different ways to trigger the plugin event. For example:
$("' || l_item_jq || '").on("select2-open", function(e) {
apex.jQuery(this).trigger("slctopen");
$(this).trigger("slctopen");
apex.jQuery(this).trigger("slctopen.BE_CTB_SELECT2");
$(this).trigger("slctopen.BE_CTB_SELECT2");
apex.jQuery("' || l_item_jq || '").trigger("slctopen");
$("' || l_item_jq || '").trigger("slctopen");
apex.jQuery("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
$("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
Nothing gets triggered...
Can anyone tell me what the problem is here? Thanks in advance.
Best regards,
Nick -
Event not getting triggered for a few users in production
Hi Experts!!
We have a workflow that gets triggered on the event REQUESTCREATED of BUS2089. In production, we see that for a few users the event is getting triggered and even the workflow is. But for a few users, the workflow is not getting triggered. However, we didn't check SWEQADM yet and are waiting to get auth to check the same. But before that, I need your valuable suggestions on this.
When I check SWEL, I cannot see any entries at all. Not even for the successfully processed ones.
Auth objects cannot be a reason, as all the users have same auth. Please suggest me on what else can be the reasons.
Your help is highly appreciable.Hello Srinivas !
Check in SWEQADM to know whether the event is on queue.If so, redeliver it.
If there is no event on queue, check the RFC queue( transaction SWU2 ) and ST22 for possible ABAP dumps.
Call work item list report (transaction SWI1) and check event linkages (transaction SWETYPV )of the users for whom the event is not triggered.Are you using BAdI or user- exit to trigger the workflow ? If so, check whether those are in active state.
Refresh the workflow buffers(transaction SWU_OBUF).Check either of the workflow versions are in active state.
Regards,
S.Suresh
Maybe you are looking for
-
Hey all, I'm very new to these forums and would appreciate if anyone out there could lend me some assistance with the above issue. I have looked over the apple support website and the only resolution that I have found is to restore the iPod, but I fe
-
How to remove windows 7?
How do I completely remove Windows 7 from my Mac? I've tried Boot Camp Assistant but I'm not able to select "Install or remove Windows 7 or later version". I tried erasing Boot Camp from Disk Utility but I've no idea what formal I should choose?
-
Can't Restore Gen 1 iPod Touch - Serial Number n/a and Unknown Error 1
I had just bought a Gen 1 iPod Touch off of eBay. It is said to be fully functional and was restored to factory settings. It also appears to be in great shape (just as it was claimed to be). When I plugged it to my PC and it said, "iTunes has detecte
-
Can I use my Nikon D810 RAW files in Photoshop CS6?
I have just got a Nikon D810 and I am using CS5 at the moment but the Raw files are not working, if I get CS6 will I be able to use the camera files? Thanks Chris
-
Hi, I'm using Captivate Version 1.0.1188 Build 1188 full version. I have successfully used this version of Captivate to complete and elearning module previouse to this. I've just completed capturing a movie for another project and I have discovered t