Passing value from event to workflow container
Hi experts,
I have triggered a workflow using SAP_WAPI_CREATE_EVENT fm. I have declared 3 parameters in the BO for the event. Similarly i have created the 3 parameters in workflow container to receive the values.When the user clicks a button i trigger the workflow using the fm. I have to pass values of these 3 parameters to 3 parameters of the workflow container. Can you please tell me how should i pass the value from event to workflow container. Is there any way i can set workflow container parameter values while calling the fm itself.
INPUT_CONTAINER LIKE SWR_CONT Input container (name-value pairs)
The above tables parameter is used to transfer the values from FM to workflow.
declare a internal table of type SWR_CONT
DATA:
lt_cont TYPE STANDARD TABLE OF swr_cont,
ls_cont TYPE swr_cont.
ls_cont-element = 'ELEMENT NAME 1'.
ls_cont-value = <Variable which holds the value>
APPEND ls_cont TO lt_cont.
ls_cont-element = 'ELEMENT NAME 2'.
ls_cont-value = <Variable which holds the value>
APPEND ls_cont TO lt_cont.
ls_cont-element = 'ELEMENT NAME 3'.
ls_cont-value = <Variable which holds the value>
APPEND ls_cont TO lt_cont.
pass lt_cont to the parameter INPUT_CONTAINER
Similar Messages
-
Passing values from and to workflow container
Hi Guys,
I am reading and writing back into the workflow container element from task container using FM.
But its not writing back the values into workflow container.
here is my code.
swc_get_element container 'TripNumber' trip_no.
Fetch Personal No. from Trip No.
SELECT SINGLE pernr FROM ptrv_head INTO l_pernr
WHERE reinr = trip_no.
IF sy-subrc NE 0.
EXIT.
ENDIF.
Fetch Employee Name
SELECT SINGLE ename FROM pa0001 INTO l_ename
WHERE pernr = l_pernr
AND endda >= sy-datum
AND begda <= sy-datum.
Fetch Employee Email id
select single usrid_long from pa0105 into l_email
where pernr = l_pernr
and usrty = '0010'
and endda >= sy-datum
AND begda <= sy-datum.
Set Personal No.
swc_set_element container 'Pernr1' l_pernr.
Employee Name
swc_set_element container 'Ename' l_ename.
Email ID
swc_set_element container 'Email' l_email
Am I missing anything here.
ThanksHi,
I faced the same issue and i found that it is not sufficient to just have proper bindings and using macros with exact container names.
You need to create IMPORT and EXPORT parameters for that METHOD with names matching with container element names. Once you do this, you see a GREEN binding icon right below the BO and Method name in the TASK. Click that icon and create binding between TASK and METHOD.
This should resolve your problem.
All - Please correct me if am wrong as i am new to the workflow.
Thanks,
SKJ -
Passing file from report to workflow container
My requirement is a report will will upload a file from the desk top.
After uploading the file a workflow should trigger from the program
for which i am using the FM "SWE_EVENT_CREATE".
Apart from uploading the file, the report will fetch some data from
tables and i am passing the data to workflow using the above FM. Now
how can i pass the file to this FM, so that the file is available in
the workflow container.You have to follow the below sequence of steps.
1)You are uploading the data from your desktop and the data will be in an internal table. Collect the entire data which you want to pass to the Workflow in a single internal table.
2)Export this internal table to memory using Export statement. See syntax to use this statement for exporting internal table data.
for example :
EXPORT : T_PO_STATUS FROM T_PO_STATUS TO MEMORY ID 'PR_PO_STATUS'.
3)Now when You trigger your workflow using the said FM, in the code of a Method associated to a particular Task, you have to import the internal table data using IMPORT statement.
for example :
IMPORT : T_PO_STATUS TO T_PO_STATUS FROM MEMORY ID 'PR_PO_STATUS'.
4) after importing you have to pass this data to the internal table which is declared in the workflow container. for this use the below statement.
SWC_SET_TABLE CONTAINER 'POStatus' T_PO_STATUS.
5) The internal table structures must be same both in the report program and in the workflow container. This way you can get the required data from report program to the workflow container. -
Passing value from method to Workflow
Hi All,
I am new to workflow. I am trying simple examples to understand the concepts of work flow.
I have copied a std business object and I have a method in that. Now, I am trying to pass some value to this method from the work flow and get back some value after manipulation with in this method.
In the program for the method, I need to get 2 parameters as input and one parameter as outut. With in this method I am trying to write the code for adding this 2 nos. I have seen some Help docs and came to know I should use SWC_GET_ELEMENT_CONTAINER and SWC_SET_ELEMENT_CONTAINER for this. But, I am ot sure of the syntax.
Can you help me with a sample program for this...
Any help is highly appreciated.
Thanks,
Jai Shankarhi Jai Shankar,
I give you the sample code of the method where i am finding number of agents
BEGIN_METHOD ZLCPRNUMBEROFUSERS CHANGING CONTAINER.
DATA:
TEMAILID LIKE SOLI OCCURS 0,
TAPPROVERS LIKE ZSAFAPPROVERS OCCURS 0,
WAPPROVERS LIKE TABLE OF ZSAFAPPROVERS WITH HEADER LINE.
DATA NUMBER LIKE VBAK-VBTYP.
DATA emailid TYPE STRING.
data userid type string.
this is the coding where the value that you give the method container
SWC_GET_TABLE CONTAINER 'TEmailId' TEMAILID.
SWC_GET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
SWC_GET_ELEMENT CONTAINER 'NUMBER' NUMBER.
here you can use your own coding like (select query or any other)
CALL FUNCTION 'Z_LC_PR_NUMBER_OF_USERS'
TABLES
T_EMAIL_ID = TEMAILID
T_APPROVERS = TAPPROVERS
EXCEPTIONS
OTHERS = 01.
CASE SY-SUBRC.
WHEN 0. " OK
WHEN OTHERS. " to be implemented
ENDCASE.
SWC_SET_TABLE CONTAINER 'TEmailId' TEMAILID.
SWC_SET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
READ TABLE TAPPROVERS INDEX NUMBER INTO WAPPROVERS.
CALL FUNCTION 'Z_LC_GET_EMPLOYEE_INFO'
EXPORTING
USER_ID = WAPPROVERS-APPROVER_USRID
IMPORTING
EMP_EMAIL = emailid.
here i am doing some manupulation in the function module and i am getting that value to the method container as below.
SWC_SET_ELEMENT CONTAINER 'EMAILID' emailid.
SWC_SET_ELEMENT CONTAINER 'USERID' WAPPROVERS-APPROVER_USRID.
SWC_SET_TABLE CONTAINER 'EMAILID' emailid.
SWC_SET_TABLE CONTAINER 'TApprovers' TAPPROVERS.
END_METHOD.
I think it is helpful for you,
Regards,
Balaji E. -
Re: Help needed in passing values from workflow to Approve Forms
Dear Experts,
how do I pass values from a workflow to a step (Form) - approve form?
I am using a customized table structure as my data source (FORMCONTAINERELEMENT) but am stuck on how to access the data when i get to to the screen painter's flow logic... What am i missing? Can you give me a step by step example. the ones i see on the net are input fields that update the screen... nothing that shows value being passed from the outside.
I need to pass an exisitng value in the workflow into the form for approval of the the assigned agent.
Please help!!
Thank you.Hello !
Create a method just before the form step.This method should populate the values for the fields maintained in the form.
Pass the values populated from this method to your customized table structure (data source).In other words, you have to pass all the values to the workflow container.
To the step, pass this workflow container by binding.In the control tab of form step, you have to do the binding.
Regards,
S.Suresh -
Passing value from JSP to JApplet
Hello,
I am stuck up with a problem, can anyone please tell me how do i pass a value from a JSP page
to a JApplet,
and the parameter passed through JSP should be displaed in the JTextArea.
It would be kindful if any of you could help.
Thanks
Sanamhello,
thanks for reply.
I know how to pass parameters from html,
I want to pass values from jsp page,
and i dono how to do it, may be we cann pass values through url connection but i dono how.
if anone knows plz help me in solving this.
i hvae posted my applet code.
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.JToolBar;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JPanel;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.sql.*;
<applet code = "DocApplet" width = 500 height =5000>
</applet>
public class DocApplet extends JApplet
private JPanel jp;
private Container cp;
private JTextArea jt;
private JToolBar tb;
private JScrollPane sp;
private String annotation;
private String url;
private Connection con;
private Statement stmt;
public void init()
jp = new JPanel();
cp = getContentPane();
jt = new JTextArea();
tb = new JToolBar();
sp = new JScrollPane(jt);
repaint();
public void start()
jp.setLayout(new BorderLayout());
jp.add(tb, BorderLayout.NORTH);
jp.add(sp, BorderLayout.CENTER);
jt.setBackground(Color.BLACK);
jt.setForeground(Color.WHITE);
setContentPane(jp);
addButtons(tb);
repaint();
public void run()
repaint();
public void paint()
private void addButtons(JToolBar tb)
JButton button = null;
button = new JButton("Save");
button.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
tb.add(button);
} -
Passing value from one jsp to another?
how to pass value from one jsp to another? i have a value assigned in the link, i want to pass that value to another jsp page?
please help with code?Instead of the value being passed, i am getting a null value.
Here is my calendar code:
<%@page import="java.util.*,java.text.*" %>
<html>
<head>
<title>Print a month page.</title>
</head>
<body bgcolor="white">
<%
boolean yyok = false;
int yy = 0, mm = 0;
String yyString = request.getParameter("year");
if (yyString != null && yyString.length() > 0)
try
yy = Integer.parseInt(yyString);
yyok = true;
catch (NumberFormatException e)
out.println("Year " + yyString + " invalid" );
Calendar c = Calendar.getInstance( );
if (!yyok)yy = c.get(Calendar.YEAR);
mm = c.get(Calendar.MONTH);
%>
<table align="center">
<tr>
<td>
<form method=post action="calendar.jsp">
Enter Year : <select name="year">
<%
for(int i= yy;i<=2010;i++)
%>
<OPTION VALUE= <%=i%> > <%=i%> </option>
<%
%>
</select>
<input type=submit value="Display">
</form>
</td>
</tr>
<tr>
<table>
<%!
String[] months = {"January","February","March",
"April","May","June",
"July","August","September",
"October","November", "December"
int dom[] = {
31, 28, 31, 30,
31, 30, 31, 31,
30, 31, 30, 31
%>
<%
int leadGap =0;
%>
<div id="t1" class="tip"><table border="4" cellpadding=3 cellspacing="3" width="250" align="center" bgcolor="lavender">
<tr>
<td halign="centre" colgroup span="7" style="color:#FF0000;">
</colgroup>
<tr>
<td>
<%
GregorianCalendar calendar =null;
for(int j=0;j<12;j++)
calendar = new GregorianCalendar(yy, j, 1);
int row = 1 ;
row = row + j;
%>
<table>
<tr>
<colgroup span="7" style="color:#FF0000;">
</colgroup>
</tr>
<tr align="center">
<th colspan=7>
<%= months[j] %>
<%= yy %>
</th>
</tr>
<tr>
<td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td>
</tr>
<%
leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
int daysInMonth = dom[j];
if ( calendar.isLeapYear( calendar.get(Calendar.YEAR) ) && j == 1)
++daysInMonth;
out.print("<tr>");
out.print(" ");
for (int h = 0; h < leadGap; h++)
out.print("<td>");
out.print("</td>");
for (int h = 1; h <= daysInMonth; h++)
out.print("<td>");
out.print("<a href=desc.jsp>" + h + "</a>" );
out.print("</td>");
if ((leadGap + h) % 7 == 0)
out.println("</tr>");
out.println("</tr></table></div>");
if( row%3 != 0)
out.println("</td><td>");
else
out.println("</td></tr>\n<tr><td>");
%>
</html>I need to pass the value in 'h' to the desc.jsp page.
my code for desc.jsp is :
<html>
<head>
</head>
<body bgcolor="lightblue">
<form method=post action="Calenda.jsp">
<br>
<%= request.getParameter("h") %>
<h2> Description of the event <INPUT NAME="description" TYPE=TEXT SIZE=20> </h2>
<BR> <INPUT TYPE=SUBMIT VALUE="submit">
</form>
</body>
</html>But i am not able to pass the value. The 'h' value contains all the date. i want to pass only a single date, the user clicks to the other page. please help -
How can I pass values from one node to another
Give a standard and efficient way to pass values from child to parent
hai Prathap
You can use the custom event for passing values from child to parent -
Passing values from a FORM to another FORM
Hi,
I have to pass values from FORM "A" to FORM "B". What is the best way to do this?\
Can I use a GLOBAL variable?
Thanks,
Marc.I think he meant the global namespace.
You set a :global_your_name_here to a value and that value is available in your entire application. See the help file section on the global namespace for more information.
Forms parameters are parameters that you form picks up from the outside when it starts. The calling entity must supply them in the URL or they will be set to null. You set them up in the object navigator in the Parameters node. -
Script fails when passing values from pl/sql to unix variable
Script fails when passing values from pl/sql to unix variable
Dear All,
I am Automating STATSPACK reporting by modifying the sprepins.sql script.
Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
From the sprepins.sql script
variable bid number;
variable eid number;
begin
select begin_snap into :bid from db_snap;
select end_snap into :eid from db_snap;
end;
This fails with the following error:
DB Name DB Id Instance Inst Num Release Cluster Host
RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
:ela := ;
ERROR at line 4:
ORA-06550: line 4, column 17:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
The symbol "null" was substituted for ";" to continue.
ORA-06550: line 6, column 16:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev su
But when I change the select statements below the report runs successfully.
variable bid number;
variable eid number;
begin
select '46' into :bid from db_snap;
select '47' into :eid from db_snap;
end;
Even changing the select statements to:
select TO_CHAR(begin_snap) into :bid from db_snap;
select TO_CHAR(end_snap) into :eid from db_snap;
Does not help.
Please Help.
TIA,
NischalHi,
could it be the begin_ and end_ Colums of your query?
Seems SQL*PLUS hs parsing problems?
try to fetch another column from that table
and see if the error raises again.
Karl -
Passing values from javascript in pop up window to parent jsp
Hi
I am trying to pass values from a pop up window to the main window that popped this child window , with the idea to have the parent window refresh itself with value from pop up window.But the values are not going through.I do a request on the hidden variable but when the parent
jsp refreshes , the variable is still null...
The following is the code i have .
Parent jsp:a.jsp
<form name='summary'>
<input type=hidden name=customerid value="">
<input type="button" class="textButton" name="action" value="customerlist" onClick="javascript:openWin('b.jsp','800','350')">
<script>
function openWin(loc, w, h) {
var newWin = window.openloc,"HTML",'dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
newWin.window.focus();
</SCRIPT>
<%
String optionVal = request.getParameter("customerid");%>
var user = "<%= optionVal%>";
</form>
child jsp- b.jsp (pop up window)
<script>
function closer(){
var val = document.formname.id.selected.value;
window.opener.document.summary.customerid.value = val;
window.opener.location.reload();
</script>
<form name = formname>
<input type="text" name="id" value = ''>
<input type="button" class="textButton" value="select"
onClick="closer();window.close();">
</form>
Any ideas on what i am missing
Thanks
Arnuse window.opener.document.forms[0].filedname.value = 'value u need to set'
-
Passing Value from Crystal Report (special function) to Business View parameter
Friends,
Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
Eg : CurrentCEUsername (func in crystal report)-- gives login user which i should pass to parameter in a Business view (used in the same report).
Will be able to explain more if required.
Thanks in Advance,
BharathI guess you got the picture wrong. User_id is not a report_level parameter .
In Data Foundation, below query is used..
select Acc_Number, Account_Group,User_id from Accounts where user_id={?User_id}
where in {?User_id} is the BV parameter...
The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
How do i pass the CurrentCEUsername to {?User_id}
Value should ve CurrentCEusername always. so that query will be
select Acc_Number, Account_Group,User_id from Accounts where user_id=CurrentCEusername
It will restrict the data pulled from DB to BV .. right? -
Anyone knows how to pass value from Java to Perl program?
Did you write the perl program? Can you change it? Or are you trying to interface to something that already exists? This will limit your options, of course.
Anyway the first option is simple. The java program does this:
System.out.println("This is a line of input.");The perl program does this:
while(<>)and in that block, $_ is assigned to each line of input.
Then you can invoke both like this:
$ java MyJavaProgram | perl MyPerlProgram.pl -
Pass Value from Excel to custom program
Hello,
I want to pass value from Excel to Custom Program being called in the Custom Integrator and i am using the Import in the Importer section but it is not getting passed.
Please advise and i am on R12.1.3.
ThanksPl do not post duplicates - Concurrent Program Parameter
-
Passing value from Webdynpro ABAP to Adobe form..
Hi experts,
In first view of web dynpro, im getting employee id as input and after clicking the create new button, an adobe form is called
to create the employee details ( in form i used the submit button and i stored the details ). so, in tat form i used the employee id as read only mode and it has to display the value which i given as input. But in tat form im not getting the value from web dynpro..
can anyone plz help me out for this..
Thanks in advance..Hi,
Try to set your values in Method->"wddomodify" of the View in which Adobe Form is present. If you want to pass values from one view to another then check this link [Passing Local Parameters between views in an ABAP Web Dynpro Application|http://wiki.sdn.sap.com/wiki/display/stage/PassingLocalParametersbetweenviewsinanABAPWebDynproApplication] or use Context declared in Component Controller.
Regards
Pradeep Goli
Maybe you are looking for
-
Imac desktop on tv different than that on my iMac possible?
If i copy my desktop on my tv by apple tv, can i then use my iMac screen diffferent from that on my tv? Coz I want to keep gaming while the misses watches a movie from my Imac on the tv
-
Datagrid scrolling problem when different items are in the same column
I have a datagrid which I am populating with different items (LinkButtons, Images, Labels). However when there are different types of items in the same column and when i try to scroll everything gets messed up (Images get overlapped with each other o
-
Decimal Places of Key Figure not displaying Correctly
Hi BW Gurus, I have a key Fig ZLENGTH of type Quantity. I am calculating length in Kilo Meters with this.When I am trying to load the data in my cube with flat file say if value for length is 8.123 Km it is showing in Cube 8.000 . As cklient requirem
-
Any free third-party apps that work with Photos.app?
Since iPhotos no longer work with iOS8 I was looking for a free good third-party app that could work with the Photos.app like the Photo Kit ones. I would really appreciate if someone could tell me.
-
How do I attach a picture to an email on my ipad?
How do I, if I can, attach a picture from my gallery to an email?