How to Initiate the Workflow from Java webdynpro?

Hi All,
I am developing Customized WD application for ESS, which in turn having integration with Workflow.
Now How to Initiate the Workflow coding part in Webdynpro Development.
Through Adaptive RFC Model, i created model using sap_wapi_start_workflow RFC
Can anybody provide the sample code on this!!!
What are the stpes i have to follow to this Workflow Initiation from WD Java..
Thanks In Advance
Krishna

Krishna,
What Alejandro is mentioning that create a RFC which accesses you workflow on ABAP end. At your Java side just make the call the BAPI.
So you need a BAPI say ZMYBAPI which accesses your ZWORKFLOW.  Now on Java side create a WD project which accesses ZMYBAPI.
For information on how to connect to a BAPI please refer this [link|https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15]
Chintan

Similar Messages

  • How to initiate the workflow from  pa40?

    dear experts
    I wanted to know how to trigger  or initiate my workflow from PA40. in PA40 if i givet he hiring process then the empid given there has to be passed to my customised workflow & ini tiate my workflow.
    please help me out.
    Thanks & regards
    Nigesh

    check this answer to a previous question of you:
    how to initiate workflow from PA30
    basically it's the same, procedures are infotype 0.
    Kind regards, Rob Dielemans

  • How to execute a workflow from a webdynpro application???

    hi friends....
    How to execute a workflow from a webdynpro application???
    we are using ep6, ecc5????

    If you want to start a workflow in the backend, you need to call a RFC that starts it.

  • How to trigger the workflow from the excel sheet

    hello friends,
    my problem is that i should trigger the workflow from a excel sheet which contains a list of appraisers and appraisees.how to do this. can anyone  help on this.
    thanks.

    Hi Murthy,
    If you are asking if a workflow can be started on R/3 while in Excel - may be possible if you can develop some fancy macros that can make RFC calls to an ABAP function module. I won't even attempt to travel that route.
    Save the excel sheet as CSV or Tab delimited file and process it using ABAP. You can use the WAPI function module SAP_WAPI_CREATE_EVENT (Rel 4.7)to start the Workflow by raising the relevant event. In earlier releases, see FM SWE_EVENT_CREATE.
    Please do keep in mind there could be performance and response time issues for dialog users of the system if you are going to start several workflows using a report program.
    Cheers,
    Ramki.

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • How to Trigger a Workflow from ABAP Webdynpro

    Hi All Gurus,
    I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
    I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
    Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
    Regards,
    Pratima Jain

    Hi,
    If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
    But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
    There are 3 layers  1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
    2. Workflow
    3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
    for more documentation, please refer it on help.sap.com.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
    hope this helps.
    Best Regards,
    Saujanya.

  • How to trigger the workflow from RFC

    Hi,
    I need to trigger a workflow from a RFC.How can I call the event and start my workflow?
    How can i do this?
    please advice.
    Thanks,
    Anand

    Hello Anand,
    Goto swetypv transaction.Mention the abap class/bor object with the corresponding event.
    In the receiver type, just mention some unique name.In the receiver function module mention the async RFC.
    Mention the SENDER     TYPE     SIBFLPORB                        Local Persistent Object Reference - BOR Compatible
    EVENT     TYPE     SIBFEVENT                               Event
    RECTYPE     TYPE     SWFERECTYP                               Name of Receiver Type
    HANDLER     TYPE     SIBFLPORB                               Local Persistent Object Reference - BOR Compatible
    EXCEPTIONS_ALLOWED     TYPE     SWEFLAGS-EXC_OK     SPACE     Checkbox
    XML_SIZE     TYPE     SWF_XMLSIZ                               Size in Bytes
    EVENT_CONTAINER     TYPE     SWF_XMLCNT                               Container as XML Stream of Fixed Width
    So that the guid can be used inorder to identify the instance.
    you can use : "sap_wapi_start_workflow" fn module.
    Hope this helps.
    Best Regards,
    Saujanya

  • How to upload the document into JAVA Webdynpro screen?

    Hi Gurus,
    I have the requirement where I need offer the document uploading option in my java webdynpro screen to the enduser's through which they will upload the supporting document which can be maximum of size 10 MB.User can upload 2 or 3 documents at a time.
    and another field has to show the number of attachments that are attached with the deleting option as button?
    Then finally,I want to upload file from web dynpro to R/3
    Can you provide me a sample code with respect to Webdynpro Java.
    Thanks in Advance,
    Dharani

    Jasmine,
    There are several methods of uploading documents. Check the following links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/7a3be0e795664cb1d8cae68042ceb7/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bb/d95a42ea221153e10000000a155106/content.htm
    James

  • How to approve the step from java program ?

    Hi all,
    I want to approve a step from java program.
    I call the store function "wf_notification.setattrtext" & "wf_notification.respond".
    It's not work.
    The notification's status become to 'CLOSE', but PO_REQUISITION_HEADERS_ALL.AUTHORIZATION_STATUS is 'IN PROCESS'.
    And I try to approve the flow from oracle web gui and it's OK !
    The notification's status become to 'CLOSE', but PO_REQUISITION_HEADERS_ALL.AUTHORIZATION_STATUS is 'APPROVED'.
    The java program as follows, and '1099999' is notification id.
    Can anyone please please please help me?
    Thanks, all.
    Gavin
    ===================================================================================================
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.rmi.*;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
    public class CommitPR
    public static void main(String[] aArgs) throws Exception
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@10.1.1.1:1521:ORA";
    String user = "user";
    String password = "password";
    Class.forName(driver).newInstance();
    String sql;
    Connection conn = null;
    Statement callStmt;
    conn = DriverManager.getConnection(url, user, password);
    conn.setAutoCommit(true);
    callStmt = conn.createStatement();
    sql = "{ CALL WF_NOTIFICATION.SETATTRTEXT ('1099999','RESULT','APPROVE') }";
    System.out.println("sql=" + sql);
    callStmt.execute(sql);
    sql = "{ CALL WF_NOTIFICATION.RESPOND ('1099999','ARRPOVED','EIP_ADMIN') }";
    System.out.println("sql=" + sql);
    callStmt.execute(sql);
    callStmt.close();
    conn.close();
    ===================================================================================================

    Hi,
    the JavaAPI didn't work with the xdo-Files. But you can create a proxy stub for the Web Service API of BI Publisher which uses the xdo's in the repository.
    regards
    Rainer

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How can i access the EJB from a Webdynpro

    Dear all,
    How can i access the ejb , from a webdynpro?.
    Is there any way to do that?.
    I want to write the entire code (business functions) within the EJB and i wan to access the entire methods from a WebDynpro Application.This is the situation.
    Please help me to , resolve this problem.(Here im using JDBC Connection .. etc.).
    I want to do the basic connection setting's and data retrieval part within the EJB and use that within the WebDynpro..
    how can i seperate this two(i mean, i want to seperate the JDBC connections and WebDynpro,i dont want to hard code any connection parameters within the webdynpro code)
    So that i want use that saet of particular function's in many webdynpro applications..
    (i dont need any help regarding webservice way.)
    If anyone can , please help me..
    I tried that javabean class , manifest file , that way (importing javabean model).
    but im getting errors.
    I cant properly utilize that..
    So please help me with steps regarding that,,
    for javabean
    and if any , for EJB also..
    with regards
    Kishor.G

    HI,
    Since webdynpros follows Model View Controller Architecture You can access EJBs in webdynpro(views/frontend) infact to connec to database uding JDBC you have to utilise EJB ( opening connection to database closing, and other Business functionality).See this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/web dynpro tutorial and sample applications.faq#q-7
    <b>How to access the Car Rental Web Service?</b>
    Regards,
    RK

  • Regarding how to pass the data from web dynpro to workflow

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Check this [thread|SAP_WAPI_START_WORKFLOW;

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

Maybe you are looking for

  • VA01 - Transaction Launcher - Orders in Agent Inbox

    Hello Experts I have configured the transaction launcher settings in the WEB UI - CIC. I can create the order (VA01), through the transaction launcher link. But i want to SEACRH , VIEW and CHANGE that order (already created VA01 - ECC Order) in AGENT

  • Using Room API inside Web DynPro

    Hello, I've developed a Web DynPro Application which uses the Room API of the KMC. Unfortunately I can not set the Service Reference variable "com.sap.netweaver.coll.shared" as mentioned in the guide. A Deploy Exception will be thrown ("Missing Argum

  • Shifting elements in multidementional array

    Hello, I'm working on a boardgame project which uses an int[][] to represent the board. The elements in this array are numbers which represent vehicles. The equal numbers are one vehicle. A vehicle can perform a step left/right, or a step up/down (if

  • Can coverflow or cover flow be sped up?

    I have an 8-core, 8 GB machine. With one Finder folder open to a directory of images, set to cover flow (or coverflow) mode, moving from one image to the next with the up/down cursor keys results in first, a blurry version of the image, and second, a

  • Flash objects in Spry Accordion?

    Hi All, can anyone help me? I would like to insert a Flash photo gallery usin an XML file for it's content into a Spry Accordion panel. Is this possible? If so please help. I have insertedf the Flash file and the container loads on access but none of