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.
Thanks

Hi,
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

Similar Messages

  • 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

  • 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 Shankar

    hi 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.

  • How to trigger workflow from WDA and read workflow container into WDAscreen

    Dear Expert,
      Please suggest the solution for the following requirement:
       1. Create 1 leave request from WDA and submit for approval
       2. When User press "submit" button in WDA screen, workflow will be triggered for processing approval  .
       3. When 1 request is sent to approver, he logon into portal and access to UWL to process task himself.
       4. After he press approval link, the system will call WDA screen to process approval ( this screen will contain full information of requester.)
       5. After finishing process, the result will return workflow and end of process.
    Please send simple example for step 1 and one for get data from workflow into WDA screen at step4
    Any help would be appreciated
    Thanks and best regards,
    DucTV.

    Hi,
      I am not sure for what reasons you are developing a application but SAP has its own standard workflow process for applying leave from ESS portal..
    1. AS soon as you click on the submit button of the applicaiton then you need to trigger a workflow right in that case you make sure that you need to pass some data to the workflow container I hope you might be using either SAP_WAPI_CREATE_EVENT or SAP_WAPI_START_WORKFLOW to start the workflow  in both the function module you have to fill this table in Order to pass the values from ABAP    program to workflow container.
      The answer to your question is it depends on the type of the work item ID you are passing to the SAP_WAPI_READ_CONTAINER if you are passing a top work item ID  then you will have workflow container in LT_CONTAINER if you are passing any of the child or dependent work item ids of the top work item id then you have that respective task container value.
    2. You can make use of the any foreground activity or a decision step, it depends on how you want to get back the result, if you use a foreground activity step then in that case you have to populate the result back to the task container and if let say you are using a decision step then in that case you do not have to populate the result there will be standard  container element _RESULT in the decision step it will be filled.
    Make sure if you are expecting some work item in UWL and as soon as you click on the work item your application should open then configure in SWFVISU transaction and maintain DTD in UWL any portal consultant can perform this steps in few seconds.
    3. When the workflow is started then the work item which you are able to get back is the one which helps to identify dependent work item ids it is the TOP or PARENT work item ID.
    Regards
    Pavan

  • 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
    Sanam

    hello,
    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 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 &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    &lt;a string literal with character set specification&gt;
    &lt;a number&gt; &lt;a single-quoted SQL string&gt; 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 &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; 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,
    Nischal

    Hi,
    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 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,
    Bharath

    I 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?

  • Pass value from Java to Perl

    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.
    Thanks

    Pl do not post duplicates - Concurrent Program Parameter

  • 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 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

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

Maybe you are looking for

  • OLD RFC export structure being referred to

    Hello all, I am testing a XI to RFC call in PI. The structure of the export parameter was changed after being imported into IR and accordingly I did re-import the modified RFC into IR. The export parameter in IR reflects the latest correct structure.

  • Macbook pro key lost sensitivity

    My friend spilled a sugary drink on part of my keyboard, and now my touch pad is a bit weird but more annoyingly, the space bar is substantially post it's sensitivity. It's because the key is a little sticky and takes more pressure to push down the b

  • New Facebook page for the ERP textbook

    [Integrated Business Processes with ERP Systems|https://www.facebook.com/IBPERP]

  • Navigate to ulr

    why if I put the 2 pieces togheter they don't work? Can anybody help me please var adobeSite:URLRequest = new URLRequest("cbr_generalSpec.swf"); generalSpec_btn.addEventListener( MouseEvent.MOUSE_UP, function(evt:MouseEvent):void { navigateToURL(adob

  • 10.2.0.4 upgrade - dbua FINISH button does not process

    I am using dbua to upgrade database from 9.2.0.6 to 10.2.0.4 I have a problem at the last screen in the DBUA. ("Database Summary Screen"). +[skScheduler timer] [16:50:47:173] [CompManager.setUpForOperation:5623] isDierctory dir=/data/MORADEV2/moradev