Default method - how to pass value to method container?
Hello,
I am dealing with a hyperlink in 'Objects and Attachements' section of the workitem.When i click on the link, the default method of the business object gets called automatically.
My question is: How to pass values to the default method (i.e. method container) as i don't invoke the method in my workflow explicitly? The method gets called when we click on the hyperlink.
Regards,
Monica.
Hello Monica,
a default method doesn't require parameters (and cannot make use of them), as they are designed to be called from various situation, such as the view from a workflow container, the display button within a workitem or the attachment list. So this is part of the system design.
To make an object dependent of workitem values I usually follow two different design patterns:
<b>1) Using a flowitem/workitem instance with a special default method</b>
- Create a subobject from type WORKITEM (if I'm going to use values from the current workflow instance) or subobject from type WORKINGWI (if I'm going to use values from the current dialog workitem).
- Do not make a general substitution for this new object type
- If using a ZWORKITEM, create an instance of this object type before the dialog step and then pass this object to the dialog workitem
- If using ZWORKINGWI, assign the object instance during the data flow to the step.
- In the properties of the object choose (any one) default method
- Within the coding you have the reference to the workitem/flowitem as object-key-... and you can further use functions/methods to read the workitem/flowitem container and do whatever has to be done
<b>2) Retrieving values from the current workitem on-the-fly</b>
Within the coding of the default method call the function module SWO_QUERY_REQUESTER that returns the instance/id of the current workitem-in-work (with is also set when using the hyperlink from a workitem). If the list is empty, there's no active workitem, otherwise use functions/methods to read the workitem container.
--> edit: Solution is not release safe, is it aint working with SAP R/3 Enterprise and higher
Best regards,
Florin
Message was edited by:
Florin Wach
Similar Messages
-
Urgent - How to pass value to Multiline container element in workflow
Hi,
I hav a requirement as below...
1) In a Bus. Object, there is a method with a parameter which is Multiline.
2) When I execute it directly from Bus. Object, I am able to populate any no. of lines to the multiline parameter & execute it. It is working correctly.
3) Now I have created a task for the same Method & used it in my workflow.
4) I want to pass multiline values to the parameter from workflow.
5) I dont have any internal table being filled in the previous steps. I directly want to assign variables or constants to it.
How can I do it????
Thanks,
Sivagamihi sivagami,
Please help me. I am also facing same type of problem. i am new to workflow. i am using using FM sap_wapi_write_container. to write into the container. but here my problem is i don know wat is the element name to refer to the value. if i give any element naem its taking as separate element & not as the same multiline container. i hope u will be able to assist me since u have worked on the same type of problem.
If u help i will be highly thankful to u.
Thanks & Regards
Nigesh -
How to pass value to Multiline container element in workflow ?
Dear Experts,
I am using the BAPI "SAP_WAPI_WRITE_CONTAINER" to write into the workitem container elements. now i want to write the data into a multiline container element. i am unable to do the same. please guide me how to write the data into multiline container.
I am getting the data from portal so i am using the BAPI to populate the container.
Please help me out...
Thanks & Regards
NigeshHi,
Use the following code:
DATA: lv_text TYPE string,
lt_cont_vals TYPE swconttab,
lt_cont_defs TYPE swbconttab,
lo_oref TYPE REF TO cx_root,
lo_workitm_cntxt TYPE REF TO cl_swf_run_workitem_context,
lo_wi_conv TYPE REF TO if_swf_cnt_conversion,
lo_wi_cnt TYPE REF TO cl_swf_cnt_container,
lif_wi_cnt TYPE REF TO if_swf_ifs_parameter_container,
lo_exception_return TYPE REF TO cx_swf_cnt_container.
***--- Get work Item Context
TRY.
CALL METHOD cl_swf_run_workitem_context=>get_instance
EXPORTING
im_wiid = im_wi_id
RECEIVING
re_instance = lo_workitm_cntxt.
CATCH cx_swf_run_wim INTO lo_oref.
lv_text = lo_oref->get_text( ).
ENDTRY.
***--- Get Instance of the work Item Container
CALL METHOD lo_workitm_cntxt->if_wapi_workitem_context~get_wi_container
RECEIVING
re_container = lif_wi_cnt.
***--- Type casting work item container into class CL_SWF_CNT_CONTAINRER
lo_wi_cnt ?= lif_wi_cnt.
***-- Set the value
TRY.
lo_wi_cnt->if_swf_cnt_element_access_1~element_set_value(
EXPORTING
name = 'ITEM'
value = t_item[]
CATCH cx_swf_cnt_cont_access_denied. " Change Access to Container Not Allowed
CATCH cx_swf_cnt_elem_not_found. " Element Not Found
CATCH cx_swf_cnt_elem_access_denied. " Element Must Not Be Changed
CATCH cx_swf_cnt_elem_type_conflict. " Type Conflict Between Value and Current Parameter
CATCH cx_swf_cnt_unit_type_conflict. " Type Conflict Between Unit and Current Parameter
CATCH cx_swf_cnt_elem_def_invalid. " Element Definition (For Example, Type Name) Is Invalid
CATCH cx_swf_cnt_invalid_qname. " Qualified Name Invalid/Already Being Used
CATCH cx_swf_cnt_container. " Exception in the Container Service
ENDTRY.
* VERY IMPORTANT -- Save changes to DB
TRY.
lo_wi_cnt->save_to_database( ).
CATCH cx_swf_cnt_invalid_por. " Invalid Persistent Object Reference
ENDTRY.
lo_workitm_cntxt->publish( ).
COMMIT WORK AND WAIT. -
How to pass values to Oracle store procedure in Crystal Report
Hi all,
I am newbie on passing values to stored procedure parameters. I created a Crystal Report using the Crystal Report wiward with PULL method and data come from Oracle stored procedure. In an ASP.NET page, I have stored two values in Session and need to pass them as input parameters to Oracle stored procedure to print the report. In Crystal reports 2010 once you connect to a stored-procedure as data source, it automatically creates the parameter fields with Crytal Report Viewer. Please show me how I pass values to store procedure at runtime automatically.
'Set the parametter value
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
End Sub
I tried to apply above codes from Brian Bischof book but display the error from the following lines:
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
I also enclosed my code. Any experts, please let me know anything wrongs on my code . I tried several methods that searching via google, but did not solve my issues. Thanks.
Edited by: avt2K7 on Mar 15, 2011 7:02 AMHi,
Thank you for your response. Here are the detailed code and error as following:
Please show what I am missing in my below VB.NET codes:
===========================================================================================
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
LogonToTables("username", "password", "servername", "")
End Sub
Private Sub LogonToTables(ByVal myUserId As String, ByVal myPassword As String, ByVal myServerName As String, ByVal myDataBaseName As String)
Dim Course, Class As String
Course = Session.Item("CourseNumber"))
Class = Session.Item("ClassNumber"))
Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport.Load(Server.MapPath("CrystalReport1.rpt"))
Dim myTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
'Set the database properties and security credentials
Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
myConnectionInfo.ServerName = "servername"
myConnectionInfo.DatabaseName = ""
myConnectionInfo.UserID = "username"
myConnectionInfo.Password = "password"
'Apply the ConnectionInfo to the report tables
Dim myTables = myReport.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
'Set the parametter value to Crystal Report parameter named P_COURSE and P_CLASS
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
End Sub
=================================================================================
I put a break point to debug but display the error at the following lines:
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
Eventhough, if I set a specific value to Course=1000 and Class = math and still receive the error:
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
I tried several sources from Google search but it is not working. I really appreciate any detailed code either in C# or VB.NET to solve my issues. Thanks in advance. -
How to pass values between views in FPM - GAF
Hi Experts ,
i have a doubt in FPM how to pass values between views .
For Example: i am having 2 views - 1 ) overview , 2 ) edit using the GAF
in 1st view (overview ) i have a table displaying the employee details , i will select a single employee from that table for editing .
how to pass the selected employee details to the 2 nd view (edit ) .
Thanks & regards
chinnaiya PHi chinnaiya pandiyan,
Please follow below steps:
1. To achieve this u need to create two context nodes in the component controller.
2. Say one is EMPLOYEE_DATA and other is SELECTED_DATA.
3. Set the Cardinality of EMPLOYEE_DATA to 0..n and SELECTED_DATA to 1..1.
4. Add same attributes to both nodes. (probably all those fields that are required in table and/or in edit view.
5. Map both these nodes to OVERVIEW view.
6. Map only SELECTED_DATA node to EDIT view.
7. Create table in OVERVIEW view based on EMPLOYEE_DATA node.
8. Create edit form in EDIT view based on SELECTED_DATA node.
9. While navigating from OVERVIEW view to EDIT view, read the selected element of EMPLOYEE_DATA node and copy it to an element of SELECTED_DATA node. This should be written in PROCESS_EVENT method of component controller inherited from FPM component.
10. Now u got the selected data in SELECTED_DATA node which will be displayed in EDIT view.
Regards,
Vikrant -
How to Pass values between one webdynpro application to another
Hi ,
I know How to Pass Values Between the Application by URL But For My Requirement NO need The Pass in URL Rather Than That Please any one TEll me How to GEt VAlues BEtween the application......
Thanks
ANANTH.If you dont want to pass values through URL, then you must have to use component Usage with interface node.
Or you can try like this,
by appending field value to url,
Data w_url type string,
w_value type string.
get the url of calling aplication
call method cl_Wd_utilities->construct_wd_url
exporting application name = name of second application( to which u want to pass parameter )
importing out_absolute_url = w_url.
***Make the value type compatible that has to passed with url.
w_string = lv_pernr
***Now attach the parameter and its value with url that have to passed to 2nd application
call method cl_http_Server=>append_field_url
exporting name = 'pernr'
value = ' w_value'
changing url = w_url.
then popup window for 2nd application with above url
lo_window = lo_window_manager->create_external_application ( url = w_url ).
lo_window -> open( ).
***now in wddoinit of 2nd application
data lv_param type string
lv_param = wdr_task=>client_window->get_parameter( ' pernr ').
Now you can use lv_param in 2nd application.
Regards
srinivas -
How to pass values of the prompt through Action Link - URL in 11g
Hi All,
I am in OBIEE 11g v6.
Let's say, I have two dashbaord pages P1 and P2.
P1 page contains
1. Prompt PR1 - containing a single column EmpName
2. Report R1
P2 page contains
1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
2. Report R2
Requirement :
Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
Thanks,
RonnyHmm can you give a try one more time with
Add EmpName name and hide it on report R1 on page P1
and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
Other option is read this doc once that helps you how to pass value thru url.
http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
You need to have a EmpName as Is Prompted on report R2 on page P2
If helps pls mark -
How to pass values at runtime in JDBC - XI - File scenario
Hi friends,
In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
here are my queries:
1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
Thanks and regards,
Nitin aggarwal.Hi Nitin,
"..So i want to know if i can write multiple select statements in the stored procedure.."
Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
<i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
Read this, again from the documentation:-
<i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
Regards,
Sushumna -
How to pass value to select-option parameter using SET PARAMETER Command
Hi,
Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
Passing values to parameter id
set parameter id 'VKS' field kschl.
set parameter id 'VKO' field vkorg.
set parameter id 'VTW' field vtweg.
set parameter id 'KDA' field erdat.
set parameter id 'MAT' field matnr_from.
Change condition price.
call transaction 'VK12' and skip first screen.
Thanks in advance.
Regards,
Balamurugan.Hi,
instead of using set parameters and dden call transaction use this..........
submit RV13A004 WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Notes
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
Cheers
Will. -
How to passing value into Captivate from html?
How to passing value into Captivate from html?
Or
How to communicate between objects in one slides?Hi czhao0378 and welcome to the forums!
Captivate does not natively allow you to communicate your own
data, either internally or externally. The only way to make this
happen is to create your own functionality, either via custom-built
Flash objects or JavaScript code executed in the browser or a
combination of both.
The only example I've seen of any "data passing" inside
Captivate is a custom text input/output solution that was posted on
the Captivate Developer Exchange:
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
This solution consists of an input box that takes information
from the user on one slide and a second box that displays that
information on another slide. The functionality was built in Flash
and is embedded in Captivate as a Flash "animation". Unfortunately,
since this is a custom functionality, the information is not
included in the user completion results Captivate can pass to a
Learning Management System.
Since the solution mentioned above relies on a Flash
Actionscript variable to hold the information that is displayed,
you can also pass the information from HTML to Captivate using the
"SetVariable" command in JavaScript. This would at least allow you
to display your own HTML-based data inside Captivate.
Beyond that, I'm not aware of any other way to gather and
pass data in Captivate. -
How to pass values to select options of custom transactions?
I have to call custom transaction-ZMM_POST from my custom report.
I have to pass values to select options(Not to parameters) of ZMM_POST from my report only.
Please tell me how to pass values to select options of custom transactions?Have you tried this?
DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
T_RSPARAMS-SELNAME = "S_BUKRS".
T_RSPARAMS-KIND = "S".
T_RSPARAMS-SIGN = "I".
T_RSPARAMS-OPTION = "BT".
T_RSPARAMS-LOW = "100".
T_RSPARAMS-HIGH = "300"
APPEND T_RSPARAMS.
SUBMIT Z_DUMMY WITH SELECTION-TABLE T_RSPARAMS.
Greetings,
Blag. -
How to pass value from jsp to java bean
I have huge problem . How to pass value from jsp value to java bean.Please replay me soon
Use the <jsp:setProperty> tag. There are several ways to use it. The one you probably want is:
<jsp:setProperty name="bean_name" property="property_name" value="the_value_you_want_to_set"/> -
How to pass value between two forms.
Hi all,
how to pass value between two forms(using :parameter),...
Thanks
RajeshTo use parameters, create a parameterlist with the named parameters
DECLARE
pl_id PARAMLIST;
pl_name VARCHAR2(10) := 'tempdata';
BEGIN
pl_id := Get_Parameter_List(pl_name);
IF not Id_Null(pl_id) THEN
DESTROY_PARAMETER_LIST(pl_id);
END IF;
pl_id := Create_Parameter_List(pl_name);
ADD_PARAMETER (pl_id,'MYPARAMETER',TEXT_PARAMETER,:BLOCK.VALUE);
CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE, NO_QUERY_ONLY, pl_id);
END;In the new form you can then just access the parameters via :PARAMETER.MYPARAMETER;
An alternative is the usage of globals:
:GLOBAL.MYPARAM:=:BLOCK.VALUE;
-- call the emp-form
CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE);and in the new form use:
DEFAULT_VALUE(NULL, 'GLOBAL.MYPARAM');
IF :GLOBAL.MYPARAM IS NOT NULL THEN
...The advantage of gloabls is that they can also return values back to the calling form, which is not possible using parameters -
How to pass values between pages?
Hi
Anybody know how you pass values like ids between pages using buttons?
Cheers
dan
Message was edited by:
user551484Hi
Why do you want to do this? You can access values from other pages so if you are on page 2 and there is an item on page 1 called P1_ID you can simply assign it to an item on page 2 by typing in P1_ID in the source value for your page 2 item.
Or you could reference it direct in your pl/sql process by typing &P1_ID. (note the fullstop)
If you did want to pass a value using a button you can do so by clicking on the button name in then scroll down to the section called optional URL redirect.
set target is a - to page in this application
then select the page you want the button to send you to
then click the flashlight icon next to set these items
you can then select the page item you want to send the value to and the page item you are getting the value from.
Danny
Message was edited by:
Danny Roach -
How to pass value from Javascript function to a Java class method
Hi All,
I want to pass a value, which I catch in a Javascript function to a method in a Java class. I have tried many combinations but it gives me error.
This is the way I am doing
function assignBill() {
proj = projPh.substring(0,indSlash);
<% myproject.getProj(" project_cd = '" + proj + "'");%>
proj is the variable which I want to pass to getProj methods.
If any one has done this, please let me know. Thanks for your help.
Ritesh MehtaThe only way to receive something from clients page is to submit it somehow: through a form or link, but the info has to make it back to the server obviously. I dont know how your app works, but you can use the the javascript -location.href- function(i think) to submit the var to the server and process it there.
Maybe you are looking for
-
Quads, Fans, and Classic
Every time I have to run an app. in Classic, the fans on my quad go nuts. Any ideas?
-
Dynamic Select with different number of rows
Hi all, I have a procedure who receives a table name and array of column names of that table. I need to create a specific select statement with this parameters. Of course, this could change because the number of column names may differ from each invo
-
Many rows in DBA_UNDO_EXTENTS
Hi, in my DBA_UNDO_EXTENTS I have many and many rows with status = UNEXPIRED I'm reading these link: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm and Oracle® Database 2 Day DBA but i don't know how i can delete these row. I
-
Setting Application Item On New Instance problem
Trying to set several application items using application computations set to fire On New Instance (ie. new login). None of them are firing on a new login. I did successfully fire them when I made page rendering computations after the header, but whe
-
Help needed for javax.naming.Context and javax.naming.InitialContext
I need help on this two.. I am currently doing a project which required Connection Pooling. And this is the first time i'm exposed to all this.. I know nothing about these files.. But, i manage to get help from someone on DataSource. But i can't find