Starting event for MQSeries control
I am new to Integration. I'm testing a simple MQSeries control. I just want the control listen to a q, get the message and put the message on another q.
What is the starting event for this type of process? Do I have to use a message broker?
thanks.
You can use the control only from an already running process. I you need to start a new process, whenever a message arrives in a MQ queue, then use the event generator, which communicates via Message broker events.
-Kai
Similar Messages
-
Synchronous start event for a BPM process??
Hi,
If I trigger a BPM Process from say a BSP Application(Shld be able to do this as all I need is a Service Interface (Start Event) related to the BPM), If for some reason the process fails to start -- Is there a way of having a response that would let the triggering application know that the BPM process instantiation has failed...
What I am trying to understand is :
1)would the Service Interface for the BPM start Event, provide a response ?...??
2)Is it possible to have some kind of logic implementation for this Service Interface(that starts a BPM Process) ??
Eventhough there was a similar message in the forum, I wanted to have a clear picture ....
A detailed reply would be highly appreciated ..Thanks !
Best Regards,
ArunHi Arun,
I guess you need to distinguish 2 to 3 cases here:
In case you used a snychronous call in the service interface definition assigned to the process start event it will result in a SOAP fault, which says that the process started successfully. Reason for that is explained here: Starting a BPM Process - Where is the Service?
Problems within your process would also not be reflected in the SOAP message (e.g. if there is some issue within the first step after the process has been started). I guess that is somehow obvious as the process has been started after all, but I wanted to state it anyways.
Finally and that's possibly the most important point for you: If there are any problems during the instantiation and in the end no process has been started then this should be reflected in the SOAP result. If not I would consider it as an issue in the implementation and would like to ask you to open a ticket for it on http://service.sap.com/message
More details could be found in the documentation:
Starting a Process
https://help.sap.com/saphelp_nwce711/helpdata/en/62/a6d7ac03994e0796c6b949c8952547/frameset.htm
Creating Service Interface Definitions
https://help.sap.com/saphelp_nwce711/helpdata/en/47/62632a3c304359e10000000a42189c/frameset.htm
Hope that helps,
Martin -
Handling event for Tree Control Collapse
Hi,
Can any one suggest how to handle an event for 'Tree Node Collapse' . I have checked with all the exised tree events.
thanks,
VenuHi Venugopal,
If you are doing tree control programmin then i can suggest you a approach for tree node collapse and expand.
for doing this follow these steps.
1. create a toolbar (use class cl_gui_toolbar), add a button and assign a FCODE to it.
2. here you register the following the event for the toolbar.
gs_event-eventid = cl_gui_toolbar=>m_id_function_selected.
3. here you set the handler for the toolbar events
SET HANDLER gref_application->handle_function_selected
FOR gref_toolbar.
4. now in your class for gref_application you write a definition and implementation.
definition
handle_function_selected FOR EVENT handle_function_selected OF cl_gui_toolbar IMPORTING fcode.
implementation
CASE fcode.
when 'collapse'.
CALL METHOD xref_tree->collapse_all_nodes.
this method might change depending upon the class you use for creating the tree.
i hope this will help you.
in case of clarification do get back to me.
regards,
Kinshuk Saxena
PS mark helpful answers -
How to handle events for Tab Control
Hi,
I have a Tab control with 4 tabs and I would like when I go to a specific tab all the contents of that tab being updated. Could you please help me with this?
How should I set the event structure
ThanksTab Control->Value Change is the event you want. You can then use a case structure to do whatever you need it to based on the "New Value".
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Atempt to start OMS for Grid Control 11g fails with - Unexpected error occu
Hello,
I am running Grid Control 11g.
Repository DB is 11.2.0.1
Both the Grid Control and DB server are running in same machine - redhat 5.
When trying to start the oms, this fails with the below error:
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting WebTier...
WebTier Successfully Started
Starting Oracle Management Server...
Oracle Management Server is not functioning because of the following reason:
Unexpected error occurred. Check error and log files.
The emctl.log shows the following error which I am unable to debug:
2011-09-13 11:20:05,619 [main] DEBUG oms.StatusOMSCmd processStatusOMS.138 - HTTP port in emgc property file: 7202
2011-09-13 11:20:05,620 [main] DEBUG oms.StatusOMSCmd processStatusOMS.139 - HTTPS port in emgc property file: 7301
2011-09-13 11:20:05,620 [main] DEBUG oms.StatusOMSCmd processStatusOMS.155 - Using http port.
2011-09-13 11:20:05,620 [main] DEBUG oms.StatusOMSCmd processStatusOMS.195 - Attempting to connect to http://<host>.<domain>:7202/em/console/logon/logon
2011-09-13 11:23:05,596 [main] ERROR oms.StatusOMSCmd processStatusOMS.239 - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at HTTPClient.BufferedInputStream.fillBuff(BufferedInputStream.java:206)
at HTTPClient.BufferedInputStream.read(BufferedInputStream.java:126)
at HTTPClient.StreamDemultiplexor.read(StreamDemultiplexor.java:348)
at HTTPClient.RespInputStream.read(RespInputStream.java:147)
at HTTPClient.RespInputStream.read(RespInputStream.java:108)
at HTTPClient.Response.readResponseHeaders(Response.java:1107)
at HTTPClient.Response.getHeaders(Response.java:832)
at HTTPClient.Response.getStatusCode(Response.java:331)
at HTTPClient.RetryModule.responsePhase1Handler(RetryModule.java:92)
at HTTPClient.HTTPResponse.handleResponseImpl(HTTPResponse.java:872)
at HTTPClient.HTTPResponse.access$000(HTTPResponse.java:62)
at HTTPClient.HTTPResponse$2.run(HTTPResponse.java:839)
at HTTPClient.HTTPResponse$2.run(HTTPResponse.java:837)
at HTTPClient.HttpClientConfiguration.doAction(HttpClientConfiguration.java:666)
at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:837)
at HTTPClient.HTTPResponse.getStatusCode(HTTPResponse.java:242)
at oracle.sysman.emctl.oms.StatusOMSCmd.processStatusOMS(StatusOMSCmd.java:199)
at oracle.sysman.emctl.wls.OMSController.statusOMS(OMSController.java:867)
at oracle.sysman.emctl.wls.OMSController.startOMS(OMSController.java:606)
at oracle.sysman.emctl.wls.OMSController.main(OMSController.java:213)
2011-09-13 11:23:05,597 [main] INFO wls.OMSController statusOMS.950 - statusOMS finished with result: 9
In emgc.properties, I have MSPORT=7202.
I have used the notes in Metalink 1287904.1, but without resolution.
I am able to connect with sqlplus, with user sysman, without issues. There are no invalid objects under sysman.
emoms.trc shows the following:
2011-09-11 15:51:53,160 [JobWorker 22356:Thread-108] WARN jdbc.ConnectionCache _getConnection.353 - Invalid or Stale Connection found in the Connection Cache
java.sql.SQLException: Invalid or Stale Connection found in the Connection Cache
Thank you for support.
Regards,
Horia
Edited by: horia.berca on Sep 13, 2011 5:29 AM
Edited by: horia.berca on Sep 13, 2011 5:32 AM
Edited by: horia.berca on Sep 13, 2011 5:35 AM
Edited by: horia.berca on Sep 13, 2011 5:45 AMHello again;
Check the solution in this: ( and note the multiple versions of oracle it covers )
UNABLE TO FIND GRID INFRASTRUCTURE LISTENER (Doc ID 1483234.1)
Best Regards
mseberg -
Invalid input event for numeric control
Need to catch the event when invalid input being through out, customer doesn't like the notify.
George Zou
http://webspace.webring.com/people/og/gtoolboxI haven't had a big problem with this, and I plan to continue to use numeric controls instead of making everything strings, but it does seem strange that CVI doesn't catch this. I like the automatic range checking options, the programmable increment/decrement buttons, and the ease of use.
You can use a quirk in CVI to catch this: if you enter an invalid number like 1.2.3 or 3...14159 or 1-2, CVI triggers EVENT_VAL_CHANGED, but leaves the original number unchanged. So you can create a case in the callback for the numeric control for EVENT_VAL_CHANGED, and in that case check to see if the value is the same as the previous value. If it is, assume an invalid input. EVENT_VAL_CHANGED does not get fired if you just press Enter without changing the value.
There are a couple of limitations or drawbacks to this approach. It doesn't save your invalid entry, so you have to enter the whole thing again instead of just correcting your mistake. EVENT_VAL_CHANGED also gets fired if you use Delete or Backspace, even if the number you end up with is the same as the previous. So this approach will flag that as an invalid entry.
See the attached example.
Attachments:
TestInvalidInput.zip 6 KB -
Business objects and start events required for CO11N and CO13 transactions
Hi,
We do production order <b>confirmation</b> and <b>cancellation</b> in CO11N and CO13 respectively. Can somebody please tell me the corresponsing business objects and the start events for them? This is a very urgent issue, I will surely rewad good points.
I guess we need to use AFVC_PM object and "finalconfirmation" event for the confirmation.
Please confirm this and kindly suggest the same for cancellation.
Thanks,
MaxHi Max,
You will have to use the object BUS2005 - which is for Production order.
If you do not have Required events in the BO, you will have to extend object to add those custom events e.g. Cancellation event.
In this case you wil have to use Status management technique for raising events if standad transaction is not raising them.
Hope following SAP Help link might help you to start off..
http://help.sap.com/saphelp_47x200/helpdata/en/c5/e4aed5453d11d189430000e829fbbd/content.htm
Regards,
Akshay Bhagwat -
Is it possible to preserve dynamic run-time shortcut menu updates for a control?
Hello all,
I have a question about getting control run-time shortcut menus to persist after adding new items. I am hopeful that I'm simply missing something simple here.
Known Information
I understand the use of the "Shortcut Menu Activation?" event (for the control of interest) which provides the relevant control's menu reference for use with the menu VIs. No problems there.
Problem
I start with a control which has an .rtm file assigned as its run-time shortcut menu.
I then generate new items dynamically using the event/menu mechanism noted above.
The problem is that there doesn't seem to be a way to *preserve* those newly added items (ie. I have to re-create the new items everytime the menu is *activated*).
What I observe is that, unless I add all the items every time the right-click event occurs (in the "Shortcut Menu Activation?" event case), it defaults back to the original .rtm menu state.
Question
Does anyone know how to either:
get dynamically added menu items to "stick"
perhaps dynamically create (new) and load an .rtm for a *control*
Thanks in advance for any thoughts. I'm working in LabVIEW 8.6 for this particular project.
VMLooking at the second post link, it seems like you are trying to populate 10,000+ shortcut items on the Shortcut Menu for the control. I'm guessing these are tiered, since I don't think all of them would fit on the screen. If they are tiered, have you tried populating only the top level short cuts, and then populating more as the user navigates down the tree?
- Regards,
Beutlich -
In BPMN 1.1 specification, there are 6 Start Event Types.
I can Timer in BPM 10g studio.
Does Message Wait and Send Message in BPM 10g implement Message trigger at BPMN 1.1?
Where are None, Conditional, Signal, and Multiple in OBPM 10g?In BPMN 1.1 specification, there are 6 Start Event Types.I can Timer in BPM 10g studio.
Does Message Wait and Send Message in BPM 10g implement Message trigger at BPMN 1.1?
Where are None, Conditional, Signal, and Multiple in OBPM 10g? >
It's a valid point. In Oracle BPM 10g, you can achieve the effect of the 6 BPMN start events, but the icons representing the most of the start events did not all show up in the process modeling tool until 11g.
Plain - this event is the default Begin activity in the Oracle BPM 10g process. While BPMN 1.1 specifies that the first activity can be one of the 6 listed here, Oracle BPM 10g always uses the Plain start event in its model.
Message - I know this is non-intuitive, but process instances can be created in a variety of different ways (e.g. PAPI, a subprocess flow invoking it, a Global Creation, logic from inside an activity, etc.). As it gets created you have a choice to use the default set of input arguments - this is the "BeginIn" mapping. Alternatively, you can create any number of other mappings with different sets of input argument variables. If you use an argument mapping other than the default "BeginIn", then you can right mouse click the Begin activity and click "Add a Message Based Transition". This creates a BPMN message transition. In Oracle BPM 10g you will see that the process still has a Plain start event, but in this scenario you will see a Message transition coming out of the Begin. It's functionally working the same, but modelled differently than what you might expect to see.
Timer - this is one where the functionality is suppported but the icons do not show up in the process. You can create a timer start event by using a Global Automatic activity and setting it to create instances at specific times or intervals. Visually, you will see a Plain start event in the process, but you will also see a Global Automatic activity separate from the process. The Global Automatic controls the timer and is separate from the Begin activity. It's functionally working the same, but modelled differently than what you might expect to see.
Conditional - this is supported somewhat from both modeling and execution. Again there is not Conditional start trigger. There is still a Plain start event, but you achieve the same result by adding a conditional transition and have it leave the Begin activity in the process. it's functionally working the same, but modelled differently than what you might expect to see.
Signal - this is supported from inside the process, but the start event is handled by the Plain start event.
Multiple - this too is supported from inside the process, but the start event for Multiple is also caught by the Plain start event.
Dan -
Urgent - not able to add or change start events in workflow
Hi,
I have added one event as start event for a workflow. Now I want to change the event to some other event.
But it is not allowing me to do any changes to the start events.It is showing a pop up window with 'Client 002 has status 'not modifiable' & 'Choose 'Display object' or 'Cancel'.' But it is allowing me to do changes to my workflow steps.
Where is the problem?
Is there anything I need to check with some customizing? Is it a Basis related issue?
Thanks,
SivagamiWell it depends on the settings done by basis. But usually this message comes in when you try to modify a workflow/code in CLNT2 but the code was developed in CLNT1. The cause to it is the CTS is specific to the client in which it is created and you can`t add a task (subrequest ) to it in a different client.
Solution: Check the client you are working in . Should help you !!
Let me know if it does!
regards
Anuj Sethi -
Keyfocus for multiple controls in a cluster of clusters
Hello friends!
I have a front panel, which is made up of three tabs. Each tab has one cluster made up of a number of strict type deffed cluster of two numerics. User would be editing these controls. What I want to achieve is that the key focus should move to the appropriate numeric control when the user moves his mouse over it so that the value it contains become highlighted. The way I think it can be done is tediously long (i.e., create a mouse enter event for each control (several hundred of them) and using the control reference, in the event case, set the key focus to true) Is there an easier way to do that.Yes you can.
You have to use the property node from the Application palette & choose the appropriate VI Server Class to get the references of all the Controls/Indicators present on the FP or inside a Cluster & so on...
See the attached VI.
- Partha
LabVIEW - Wires that catch bugs!
Attachments:
Refs for Controls.vi 5 KB -
Create new event for BOR object for vendor creation
Hello,
I AM working on workflow.. Requrement is that , when a vendor is created I wanted the workflow to be triggered..
But I dont find any bussiness object for this...
Then I have created customized BOR object super type as LFA1. And created new event. Now I need to assign functionlity to this event, that is As soon as the vendor is created this event should be triggered so that I can use this as the start event for the workflow..
Plz guide me ...
Regards and Thanks,
Poornima...Hi Poornima,
Create a subtype and add the event in the BOR.
Now call the FM Userexit / BADI.
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
OBJECT_TYPE = 'ZKNA1'
OBJECT_KEY = OBJECT_KEY
EVENT = 'ONSAVE'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
TABLES
INPUT_CONTAINER = IT_CONTAINER
* MESSAGE_LINES =
* MESSAGE_STRUCT =
IF SY-SUBRC <> 0.
ENDIF.
&******************Reward Point if helpful*************************& -
How to Set A Default Start Time For New Events In Calendar?
How to Set A Default Start Time For New Events In Calendar?
John,
Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
Works just fine. Snippet from the listener follows
BindingContext bindingContext = BindingContext.getCurrent();+
*if ( bindingContext != null ) {*+
DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
Row currentRow = iterator.getCurrentRow();+
if ( currentRow.getAttribute("StartDate") == null)+
currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
if (currentRow.getAttribute("EndDate")==null)+
currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
*}* -
Event for the List Box in ALV Grid Control
Hello,
I have the below urgent requirment.
I have an ALV Grid Control built using ABAP Objects. In the grid, I have few fields and one of these fields is a List Box. Depending on the values selected, I need to enable or disable some fields. So, is there any event for the List box in ALV Grid Control.
For ex: I have 2 Fields, Designation and Commission. The designation field is a List Box field having 'Software Engineer' and 'Manager' as values. When I select 'Software Engineer', the commission field should be disabled. When I select 'Manager', the comission field should be enabled.
Early reply is hightly appreciated.
PriyaREPORT ZTEST1234 MESSAGE-ID ZZ .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
V_FLAG,
V_DATA_CHANGE,
V_ROW TYPE LVC_S_ROW,
V_COLUMN TYPE LVC_S_COL,
V_ROW_NUM TYPE LVC_S_ROID.
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM,
G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
GS_LAYOUT TYPE LVC_S_LAYO.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
COMISN(10),
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(20),
<b> HANDLE_STYLE TYPE LVC_T_STYL,</b>
END OF ITAB.
* CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
<b>**Handler to Check the Data Change
HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
OF CL_GUI_ALV_GRID
IMPORTING ER_DATA_CHANGED
E_ONF4
E_ONF4_BEFORE
E_ONF4_AFTER,</b>
**Double Click Handler
HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
METHOD HANDLE_HOTSPOT_CLICK .
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW_ID.
V_COLUMN = E_COLUMN_ID.
V_ROW_NUM = ES_ROW_NO.
MESSAGE I000 WITH V_ROW 'clicked'.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
ENDMETHOD. "handle_double_click
<b>**Handle Data Change
METHOD HANDLE_DATA_CHANGED.
DATA: X_CHANGE TYPE LVC_S_MODI,
X_FINAL TYPE ITAB,
L_FLAG,
LS_OUTTAB LIKE LINE OF ITAB.
DATA: LS_EDIT TYPE LVC_S_STYL,
LT_EDIT TYPE LVC_T_STYL.
LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO X_CHANGE.
IF X_CHANGE-FIELDNAME = 'DROP' AND X_CHANGE-VALUE = 'S/W ENGINEER'.
LS_EDIT-FIELDNAME = 'COMISN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 8.
INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
else.
LS_EDIT-FIELDNAME = 'COMISN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 8.
INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY ITAB INDEX X_CHANGE-ROW_ID FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
ENDIF.
ENDLOOP.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
EXCEPTIONS
FINISHED = 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.
ENDMETHOD. "HANDLE_DATA_CHANGED</b>
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
*& Global Definitions
DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
X_FIELDCAT TYPE LVC_S_FCAT,
LS_VARI TYPE DISVARIANT.
* START-OF_SELECTION
START-OF-SELECTION.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
END-OF-SELECTION.
IF NOT ITAB[] IS INITIAL.
CALL SCREEN 100.
ELSE.
MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
ENDIF.
*& Form CREATE_AND_INIT_ALV
* text
FORM CREATE_AND_INIT_ALV .
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
CREATE OBJECT G_GRID
EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
* Set a titlebar for the grid control
CLEAR GS_LAYOUT.
GS_LAYOUT-GRID_TITLE = TEXT-003.
<b>GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.</b>
GS_LAYOUT-ZEBRA = SPACE.
GS_LAYOUT-CWIDTH_OPT = 'X'.
GS_LAYOUT-NO_ROWMARK = 'X'.
GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
<b> CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.</b>
CREATE OBJECT G_HANDLER.
SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
<b> SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.</b>
DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
DATA: L_INDEX TYPE SY-TABIX.
"Here i am changing the color of line 1,5,10...
"so you can change the color of font conditionally
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
LS_CELLCOLOR-FNAME = 'VBELN'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
LS_CELLCOLOR-FNAME = 'POSNR'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
ENDLOOP.
* setting focus for created grid control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
PERFORM BUILD_FIELDCAT.
PERFORM SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
LS_VARI-REPORT = SY-REPID.
LS_VARI-HANDLE = SPACE.
LS_VARI-LOG_GROUP = SPACE.
LS_VARI-USERNAME = SPACE.
LS_VARI-VARIANT = SPACE.
LS_VARI-TEXT = SPACE.
LS_VARI-DEPENDVARS = SPACE.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
**Calling the Method for ALV output
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = LS_VARI
IS_LAYOUT = GS_LAYOUT
I_SAVE = 'A'
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
* Set editable cells to ready for input initially
CALL METHOD G_GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
* text
* -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA LS_EXCLUDE TYPE UI_FUNC.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_fieldcat
* Fieldcatalog
FORM BUILD_FIELDCAT .
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-HOTSPOT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Item'(025).
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
X_FIELDCAT-FIELDNAME = 'DROP'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-DRDN_HNDL = '1'.
X_FIELDCAT-DRDN_ALIAS = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Comissn'(025).
X_FIELDCAT-FIELDNAME = 'COMISN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-EDIT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " build_fieldcat
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
PERFORM CREATE_AND_INIT_ALV.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form SET_DRDN_TABLE
* text
FORM SET_DRDN_TABLE.
DATA:LT_DRAL TYPE LVC_T_DRAL,
LS_DRAL TYPE LVC_S_DRAL.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = 'S/W Engineer'.
LS_DRAL-INT_VALUE = 'S/W Engineer'.
APPEND LS_DRAL TO LT_DRAL.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = 'Manager'.
LS_DRAL-INT_VALUE = 'Manager'.
APPEND LS_DRAL TO LT_DRAL.
**Setting the Drop down table for Reason Code
CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM. " set_drdn_table
Regards
vijay -
Registering events for own GUI controls
Hi,
I refer to the blog
<a href="/people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework:///people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework
In the mean time I was successful regarding the display of the media player inplace in the SAPGUI. But I didn't succeed with event handling of native events. The redefined method 'dispatch' is never called, altough I registered events as:
DATA: my_simple_event TYPE cntl_simple_event.
DATA: my_simple_events TYPE cntl_simple_events.
****Register Media Player Events with CFW
my_simple_event-eventid = go_mp3->evt_endofstream.
Specify that it's an application event
my_simple_event-appl_event = 'X'.
APPEND my_simple_event TO my_simple_events.
Redefine SET_REGISTERED_EVENTS
CALL METHOD go_mp3->set_registered_events
EXPORTING
events = my_simple_events
EXCEPTIONS
illegal_event_combination = 1
OTHERS = 2.
****Set Event handler for Media Player
SET HANDLER g_application->handle_end_of_stream FOR go_mp3.
Does anybody have an running example, e.g. for the event handling of 'STOP button clicked' event in the media player?
Furthermore: Is there a free download of the OLE object viewer?
Thanks a lot,
ThomasHi Juergen,
Sorry - not an answer. But I would like to hear from you if you manage to solve this problem. I am also working on using a custom COM object (VB.NET) in the SAPGui and am battling to capture events triggered by the control.
In particular I am trying to find the eventID of an event so that I can register it in SAP - do you know how to capture and view the event ID of lets say the mouse 'click' event of your control?
How are you identifying your events and registering them in SAP?. I have very little experience in Delphi - but I'm hoping COM is universal enough?
Hope you find your answer! Sorry I only have questions!
Regards,
Neil
Maybe you are looking for
-
Hi this is my first time using the Apple Support Sytem. I am having a serious problem with someone who is hacking all of my Facebook account and the person has threated an is stating that they have hacked my iPod touch 8g as well as have images from
-
CUE 8.6.1 AA scripts - xfer to voicemail
Hi All, Under the new version of CUE the xfer to voicemail subflow has changed a little and for the life ofme i cant make it work. What are the Input Mappings and Ottput Mappings Sources and Subflow Destinations. Can someone give me a working example
-
What do I need to ensure a smooth roll out of multiple i pads within a primary school
I am intending on rolling out i pads within my primary school. can anyone informme of ways to bulk synch them and also about bulk purchases of apps etc etc
-
Mobileme picture gallery in my iphone
How can i see my Mobileme picture gallery in my Iphone? Please help me
-
WebLogic Server 5.1 SP11 starting error
Hi, I have installed WebLogic Server 5.1 SP11 in my home PC on Win NT and I tried to start the server, I got the message WebLogic server started, immediatly after that I got a message "IIOP Service not started as 1.3 vm was not found". Any help is ap