How to Enter Event Parameters in FM SAP_WAPI_CREATE_EVENT_EXTENDED
Hi,
I am trying to trigger theEvent 'START_RM_WEBREQ' for an ABAP Class 'CL_HREIC_RM_WORKFLOW' using the above mentioned FM.
Usually this can be done using SWUE, however I am asked to do it create a custom program that would do the functionality for SWUE.
Problem is I cannot figure out how do I enter the Parameters of the Event via this FM SAP_WAPI_CREATE_EVENT_EXTENDED.
The event parameters for the event 'START_RM_WEBREQ' is Object Type and Key. Usually when doing it via SWUE we are prompted with a dynamic screen which asks us to populate the values.
Please help.
Thanks,
Pablo
Hi,
Thank you for your response. But I am facing the same problem there. I am not able to populate the value of the Parameter for the event START_RM_WEBREQ.
The code I had written initially is similar to the one in the link that you have sent:
TABLES: swotobjid.
SELECT-OPTIONS: s_notif FOR swotobjid-objkey NO INTERVALS .
DATA: lv_objtype TYPE sibftypeid,
lv_event TYPE sibfevent,
lv_objkey TYPE sibfinstid,
lr_event_parameters TYPE REF TO if_swf_ifs_parameter_container,
lv_param_name TYPE swfdname,
lv_value TYPE char80.
lv_objtype = 'CL_HREIC_RM_WORKFLOW'.
lv_event = 'START_RM_WEBREQ'.
LOOP AT s_notif.
lv_objkey = s_notif-low.
*Instantiate an empty event container
CALL METHOD cl_swf_evt_event=>get_event_container
EXPORTING
im_objcateg = cl_swf_evt_event=>mc_objcateg_cl
im_objtype = lv_objtype
im_event = lv_event
RECEIVING
re_reference = lr_event_parameters.
*Set up the name/value pair to be added to the container
lv_param_name = 'NOTIFICATION'.
CONCATENATE 'BUS7051' lv_objkey INTO lv_value SEPARATED BY space.
*Add the name/value pair to the event conainer
TRY.
CALL METHOD lr_event_parameters->set
EXPORTING
name = lv_param_name
value = lv_value.
CATCH cx_swf_cnt_cont_access_denied .
CATCH cx_swf_cnt_elem_access_denied .
CATCH cx_swf_cnt_elem_not_found .
CATCH cx_swf_cnt_elem_type_conflict .
CATCH cx_swf_cnt_unit_type_conflict .
CATCH cx_swf_cnt_elem_def_invalid .
CATCH cx_swf_cnt_container .
ENDTRY.
Raise the event passing the prepared event container
TRY.
CALL METHOD cl_swf_evt_event=>raise
EXPORTING
im_objcateg = cl_swf_evt_event=>mc_objcateg_cl
im_objtype = lv_objtype
im_event = lv_event
im_objkey = lv_objkey
im_event_container = lr_event_parameters.
CATCH cx_swf_evt_invalid_objtype .
CATCH cx_swf_evt_invalid_event .
ENDTRY.
COMMIT WORK.
MESSAGE s736(wz).
ENDLOOP.
Similar Messages
-
How to use event parameters?
Hi
I've made simple eem applet for shutdown the port which trigered storm control event.
It is look like that:
event manager applet shut-storm
event storm-control
action 1.0 cli local python bootflash:shut-storm.py
and the script is
from cisco import CLI
from cisco import cli
import sys
import datetime
import time
import re
whitelist = [
"Ethernet1/1",
"Ethernet1/2"]
shlog = CLI('sh logg last 100 | i ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD | last 3',False).get_output()
pat = re.compile(r'(\d{4} \w{3} \d{2} \d\d:\d\d:\d\d) \S+ \%ETHPORT-5-STORM_CONTROL_ABOVE_THRESHOLD: Traffic in port (Eth\S+|[Pp]o\S+)')
now = datetime.datetime.now()
delta = datetime.timedelta(seconds=180)
for l in shlog:
mobj = pat.match(l)
if mobj:
port = mobj.group(2)
logTimeStr = mobj.group(1)
logTimeObj = time.strptime(logTimeStr, "%Y %b %d %H:%M:%S")
logTime = datetime.datetime(*logTimeObj[:6])
if now-logTime < delta:
if port not in whitelist:
cli("conf t")
cli("interface %s" % port)
cli("shutdown")
But the python script is a bit complecs because it shoud find triggered interfece in log.
Is it possible to use event parameters? And how?
I know that they are:
sw1# sh event manager history events det
Event ID Time of Event Event Type Slot Policies
32 09/30/2013 15:40:51 storm_control active(1) shut-storm
interface = "Ethernet1/16", cause = "storm-control"Thank you Joseph.
It works.
Now the applet looks like:
event manager applet shut-storm2
event storm-control
action 1.0 cli local python bootflash:shut-storm2.py $interface
And the script:
from cisco import cli
from syslog import syslog
import sys
whitelist = [
"Ethernet1/1",
"Ethernet1/2"]
port = sys.argv[1]
if port not in whitelist:
cli("conf t")
cli("interface %s" % port)
cli("shutdown")
syslog(2, "Interface %s was shutdown due to storm conditions" % port) -
HOW TO ENTER MAILER PARAMETERS
In standalone oracle WF, while installation i have not entered mailer parameters in workflow configuration assistant. Now i want to do entry for mailer parameters, so should i need to run workflow configuration assistant again?
If yes then whether it will again run all scripts?
is there any other way to enter mailer parameters?
Thank you in advance
Regards,
jakpunYou can use Workflow Manager UI from Enterprise Manager to configure Notification Mailer. You should not run Workflow Config Assistant again.
Thanks -
How to enter events that will occur in another time zone?
I want to enter an event in another time zone so when in that time zone the correct time is displayed on my iCal.
Hey twc2629,
Thanks for the question. If I understand correctly, you want to change the time zone of an event. I would recommend that you read this article, it may be able to help the issue.
Calendar: Change an event’s time zone
Thanks for using Apple Support Communities.
Have a good one,
Mario -
How to enter more than 132 characters in a Parameters Field
Hi Everyone,
I have a field of type file_table-filename as Parameters in my Selection-screen. The size of the filename is 1024 characters as declared in the structure file_table. But when i am trying to enter the path into this field, its allowing not more than 132 characters....how is it possible to enter more characters? Even in debugging mode the maximum value we can scroll is upto 128/132 characters..if we want more then we should use the Offset option...but how to enter more than 132 chars into this field?
Best regards,
ramaHai,
I did the same in my program...i get the filename along with the path into this field...but then there is a chance that the User wants to say edit the filename..here comes the problem.
Best regards,
rama -
How to register "Enter" event in sap xrpm
all expert:
how to register "Enter" event in sap xrpmall expert:
how to register "Enter" event in sap xrpm -
How enter event or change event in screen dialog program
Hi anybody
I want use enter event or change event in screen dialog program.
how do i use it? anybody please tell me.
Thanks
S.Muthu.Hi Subu,
From your thread i understood like you want to use enter key from keyboard.
write the statement as below your eneter event will be triggered,
When Next or ''.
call screen 100. " or what ever you want to trigger.
If this is not the answer you were expecting revert bacl more precisely what you expect actually.
Cheers!!
Venkat -
How to trigger ENTER event in oo ALV grid
Hi,
Can anybody help me out in catching the ENTER event in the oo ALV Grid. My requirement is as follows,
I have oo ALV Grid displaying hell lot of columns, in that vendor number column is an editable field so when the user enters the vendor number the immediate next cell showing the vendor name should be populated with the corresponding name as soon as he press enter button, I have search help also for vendor field.
Please give me some sample program which i can just do the copy+paste sort of as today is the deadline for the object.
Regards,
SumanHi,
This example is working. Please try this one.
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed e_onf4 e_ucomm.
ENDCLASS. "lcl_event_receiver DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_data_changed.
DATA : modi TYPE TABLE OF lvc_s_modi ,
modis TYPE lvc_s_modi,
wa LIKE LINE OF git_alv_items,
lv_matnr TYPE matnr.
modi = er_data_changed->mt_mod_cells .
LOOP AT modi INTO modis WHERE fieldname = 'MATNR'.
MOVE modis-value TO lv_matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = lv_matnr
IMPORTING
output = lv_matnr
EXCEPTIONS
length_error = 1
OTHERS = 2.
READ TABLE git_alv_items INTO wa INDEX modis-row_id .
IF sy-subrc = 0.
SELECT SINGLE maktx FROM makt
INTO wa-maktx
WHERE matnr = lv_matnr
AND spras = sy-langu.
MODIFY git_alv_items FROM wa INDEX modis-row_id.
ENDIF.
ENDLOOP.
IF sy-subrc = 0.
CALL METHOD alv_grid->refresh_table_display
EXPORTING
is_stable = gs_stbl.
ENDIF.
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
DATA : eventreceiver TYPE REF TO lcl_event_receiver.
SET HANDLER eventreceiver->handle_data_changed FOR alv_grid.
CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = layo_alv
i_bypassing_buffer = 'X'
i_buffer_active = ''
CHANGING
it_outtab = git_alv_items
it_fieldcatalog = fcat_alv
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter. -
How to pass background event parameters to ABAP program in SM36
Hi team,
I want to pass background event parameters to ABAP program on job scheduling in SM36. For example, Background jobs will trigger, once background event triggered from Non-SAP system using SAPEVT command with parameters.
I want to pass the event parameter values to the ABAP program . Can you please help me on this.
Regards,
Anand KrishnanHi,
Which ABAP program - the one that will be executed as a job step? If yes, I don't believe you can "pass" something to it because it will be started by "job starter" of SAP background processing run-time system. The ABAP program executed in background can, however, get the job run-time information using FM GET_JOB_RUNTIME_INFO, which also returns EVENTID and EVENTPARM. Is that the event parameters you were looking for?
cheers
Jānis -
How to open the Drop Down List on the "enter" event?
I am trying to find a way for the users to see the expanded drop down list options without using their mouse to click on the down-arrow.
I am able to add script to the "enter" event so when user key-broad-tabbed into the drop down field, the first items of the list shows up:
dropdown1.selectedIndex = 0
However, it would be nice if at the same time, they can also see the rest of the options within the drop down expanded.
Any help/hints would be appreciated
Thanks in advance
pIt would even be nice if the PDF could default with the small arrow already displaying instead of having having to click the field, then click the arrow. I'm just hoping adobe would add this in a future version.
-
How to enter an event in the Birthday calendar?
I just stated to enter events on my iPad calendar, but can't seem to enter on the Birthday Calendar.
when you edit the contact there's an option for 'other fields'. tap on that and you can enter their birthdays which will then appear in your calendar
-
Enter event not triggering for read-only checkbox
I have some objects in a form that get "locked" when the user signs the form. I'm not using the digital signatures. Instead, when the user types their name into the signature text field, a script runs on the change event that makes all of the fields in the form read only. It also unlocks the fields if the signature is deleted.
I was worried that we would get a lot of phone calls with users that didn't understand that the form had locked ("Why doesn't this form work?!"), so I added some code to the enter event for all of the fields that would pop up a messagebox to explain to people trying to edit a signed form that the form was locked and that they would need to delete the signature to edit the form.
This plan works perfect for my text fields and decimal fields. It does NOT work at all for my checkboxes. For some reason, the enter event is never triggered for read-only checkboxes. I don't see any other events that would obviously work for me though. Any ideas?
ThanksThanks, those are reasonable suggestions.
In the first suggestion, I'm unclear about one aspect of how I would accomplish this. I assume I would allow people to modify fields in the form, but that when they did, a msgbox would pop up that would inform them that, if they continued with this modification to a signed form, the signature would be removed. I'm all good to that point. But if they answered that they do not want to continue modifying that field and removing the signature, how can I code it to set the value back to what it was before the change? Is there some method that will give me access to the value of the field BEFORE the attempted modification? I went looking for something like $.previousvalue, but found nothing.
I'd suggest that I could use a two-stage solution, in which I store the previous value on the enter event, and save it just in case they do not want to change the field when prompted by the msgbox, but since the enter event does not exist for checkboxes (my original problem), that seems like it won't work.
As far as radio button suggestion, I like radio buttons very much except for one fatal flaw: they aren't (as far as I can tell) clearable. That is a shame. Clearly some people (like me) want both exclusivity AND clearability. And we'd like the controls to have an enter event. But I know I'm demanding Anyway, as it is, I just end up having to use checkboxes and create a boatload of silly code to make them exclusive.
Emily -
Different 'mouse enter' event / 'set busy' vi behaviour in LV8?
In my program, I used the mouse curcor 'set busy' vi to lock the front panel during a measurement. However, I did want the 'cancel measurement' button to be available. I solved that by adding a 'mouse enter' and 'mouse leave' event for that button, that would enable the mouse when it was over the button. (And disable when it left again)
Worked fine in LV7, but it seems that in Labview 8, this little trick doesn't work anymore...
Apparantly, now the 'mouse enter' event only fires when the cursor isn't set to 'busy'. How do I perform something similar to my old trick in Labview 8?I too had a similar issue when upgrading my application source code from LabVIEW 7.1 to 8.0. There are a couple of things you could try.
1) Keep calling the "set cursor busy" vi, but don't disable mouse clicks (a boolean input to the set busy VI). Now add a new event to your event structure to monitor the panel for any "mouse down?" events. Whenever this event occurs, the user is trying to click somewhere, so wire a TRUE to the "Disabled?" input of the event. Now to keep your cancel button from being filtered out, add some code to determine if the x,y coordinates of the mouse down event are over your cancel button, if so then don't filter this event.
2) Keep calling the "set cursor busy" vi, but again don't disable the mouse clicks. Now whenever you want to disable all user events on your front panel controls, open a reference to each front panel control and set it to disabled (all except the cancel button of course). This sounds difficult, but it is actually really easy. There is a VI property you can read to get references to each FP control.
I personally used the 2nd option in my code to do something similar. I've attached the VI you can use to disable all you FP controls (with exceptions), and also an example of how I used it. It's a very small VI.
Hope this helps.
Attachments:
SetAllCtrlsToDisabled.zip 24 KB -
How to create optional parameters in discoverer 10.1.2
I am new to discoverer, Can any one tell me how to create optional parameters in Discoverer desktop edition in 10.1.2
I looked at the following thread which says optional parameters can be created in 10.1.2 but doesn't tell how tro create it
How to create optional parameters in Discoverer
Thanks in AdvanceHi.
In the thread you quoted Michael Armstrong-Smith says that optional parameters can be created in Plus but not in Desktop and that's true.
So your question "how to create optional parameters in Discoverer desktop" is already answered in that thread.
Assume that it is a typo and you wanted to ask how to create optional parameters in Plus.
Then the answer is simple: Just uncheck the "Require users to enter a value" checkbox when creating new parameter.
Regards Jakub -
How does works default parameters in a program with logical database PNP?
Hi Friends,
I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
How does works period parameters in a program with logical database PNP?
This it's the program example, i use the default category.
REPORT ZRPHRTEST.
tables: pernr.
infotypes: 0001.
start-of-selection.
get pernr.
write: pernr-pernr, p0001-begda, p0001-endda.
end-of-selection.
write 'fin'.Hi,
Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
Syntax: Tables pernr.
Get pernr.
Try, activate and test. This should solve your problem.
Regards,
Abhijeet
Maybe you are looking for
-
Quicktime 10.2 wont open also FCP7 wont open
I am running 10.8.4 and all of the sudden quicktime wont play and notice fcp7 wont open also. here is my error report from quicktime. Process: QuickTime Player [4873] Path: /Applications/QuickTime Player.app/Contents/MacOS/QuickTim
-
Unable to login to cmc after installing business objects xi 3.0
Hi Friends, I'm new to Business Objects, i've installed bussiness objects XI 3.0 and i did not specify the user name and password during installation (since there was a checkbox option to configure it later after installation). Now i've troble loggin
-
Provide me with a simple tar file
I have just started prepairing for Weblogic Admin Cert Exam. I am using Weblogic Server 10 on Red Hat Linux. Can someone please provide me with a simple tar/gz file which I can deploy using the weblogic console and see how weblogic works (i am not a
-
Hello , I have question regarding scvmm 2012 server We have successful installed and configure scvmm 2012 server along with sql on same server configuration for hyper v servers and now we want to change the name & IP address of the server. I tested
-
My problem is that I cannot let me phone turn off or sleep too long without it going into recovery mode! It becomes very stubborn to get out and also extremely annoying! Need a permant fix!! No warranty left -_-